chore: auto-generate protobuf files [skip ci]
This commit is contained in:
56
gen/sso/ldap-auth.ts
Normal file
56
gen/sso/ldap-auth.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.11.6
|
||||
// protoc v3.21.12
|
||||
// source: sso/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";
|
||||
Reference in New Issue
Block a user