chore: auto-generate protobuf files [skip ci]
This commit is contained in:
74
gen/search/search.ts
Normal file
74
gen/search/search.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
// 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";
|
||||
Reference in New Issue
Block a user