75 lines
2.3 KiB
TypeScript
75 lines
2.3 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||
// versions:
|
||
// protoc-gen-ts_proto v2.11.8
|
||
// protoc v4.25.9
|
||
// source: search/search.proto
|
||
|
||
/* eslint-disable */
|
||
import type { Metadata } from "@grpc/grpc-js";
|
||
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||
import { Observable } from "rxjs";
|
||
|
||
export const protobufPackage = "search.v1";
|
||
|
||
export interface SearchUsersRequest {
|
||
query: string;
|
||
userId: string;
|
||
sessionId: string;
|
||
status?: string | undefined;
|
||
}
|
||
|
||
export interface SearchUserItem {
|
||
id: string;
|
||
username: string;
|
||
fullName: string;
|
||
avatarUrl: string;
|
||
status: string;
|
||
isPublic: boolean;
|
||
}
|
||
|
||
export interface SearchUsersResponse {
|
||
users: SearchUserItem[];
|
||
}
|
||
|
||
export const SEARCH_V1_PACKAGE_NAME = "search.v1";
|
||
|
||
export interface SearchServiceClient {
|
||
/**
|
||
* В будущем сюда добавятся:
|
||
* rpc SearchMessages (SearchMessagesRequest) returns (SearchMessagesResponse);
|
||
* rpc SearchTickets (SearchTicketsRequest) returns (SearchTicketsResponse);
|
||
*/
|
||
|
||
searchUsers(request: SearchUsersRequest, metadata?: Metadata): Observable<SearchUsersResponse>;
|
||
}
|
||
|
||
export interface SearchServiceController {
|
||
/**
|
||
* В будущем сюда добавятся:
|
||
* rpc SearchMessages (SearchMessagesRequest) returns (SearchMessagesResponse);
|
||
* rpc SearchTickets (SearchTicketsRequest) returns (SearchTicketsResponse);
|
||
*/
|
||
|
||
searchUsers(
|
||
request: SearchUsersRequest,
|
||
metadata?: Metadata,
|
||
): Promise<SearchUsersResponse> | Observable<SearchUsersResponse> | SearchUsersResponse;
|
||
}
|
||
|
||
export function SearchServiceControllerMethods() {
|
||
return function (constructor: Function) {
|
||
const grpcMethods: string[] = ["searchUsers"];
|
||
for (const method of grpcMethods) {
|
||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||
GrpcMethod("SearchService", method)(constructor.prototype[method], method, descriptor);
|
||
}
|
||
const grpcStreamMethods: string[] = [];
|
||
for (const method of grpcStreamMethods) {
|
||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||
GrpcStreamMethod("SearchService", method)(constructor.prototype[method], method, descriptor);
|
||
}
|
||
};
|
||
}
|
||
|
||
export const SEARCH_SERVICE_NAME = "SearchService";
|