Files
contracts/gen/search/search.ts
2026-04-11 05:14:59 +00:00

75 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.6
// protoc v3.21.12
// 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";