UNPKG

@searchmoe/search-api

Version:

SearchMoe API client with generated gRPC bindings for TypeScript.

54 lines (53 loc) 2.28 kB
// @generated by protobuf-ts 2.10.0 with parameter optimize_code_size // @generated from protobuf file "search_svc.proto" (package "search_svc", syntax proto3) // tslint:disable // // Code generated with goa v3.20.1, DO NOT EDIT. // // SearchSvc protocol buffer definition // // Command: // $ goa gen github.com/searchmoe/search-service/api/design -o ../ // import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { SearchSvc } from "./search_svc"; import { stackIntercept } from "@protobuf-ts/runtime-rpc"; import type { TextSearchNewResponse } from "./search_svc"; import type { TextSearchNewRequest } from "./search_svc"; import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc"; import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; /** * Service implements streaming endpoints to initiate web searches. * * @generated from protobuf service search_svc.SearchSvc */ export interface ISearchSvcClient { /** * Requests a new text search session. * * @generated from protobuf rpc: TextSearchNew(search_svc.TextSearchNewRequest) returns (stream search_svc.TextSearchNewResponse); */ textSearchNew(input: TextSearchNewRequest, options?: RpcOptions): ServerStreamingCall<TextSearchNewRequest, TextSearchNewResponse>; } /** * Service implements streaming endpoints to initiate web searches. * * @generated from protobuf service search_svc.SearchSvc */ export class SearchSvcClient implements ISearchSvcClient, ServiceInfo { typeName = SearchSvc.typeName; methods = SearchSvc.methods; options = SearchSvc.options; constructor(private readonly _transport: RpcTransport) { } /** * Requests a new text search session. * * @generated from protobuf rpc: TextSearchNew(search_svc.TextSearchNewRequest) returns (stream search_svc.TextSearchNewResponse); */ textSearchNew(input: TextSearchNewRequest, options?: RpcOptions): ServerStreamingCall<TextSearchNewRequest, TextSearchNewResponse> { const method = this.methods[0], opt = this._transport.mergeOptions(options); return stackIntercept<TextSearchNewRequest, TextSearchNewResponse>("serverStreaming", this._transport, method, opt, input); } }