import { sendUnaryData, ServerDuplexStream, ServerReadableStream, ServerUnaryCall, ServerWritableStream } from '@grpc/grpc-js'; import { Constructor, ControllerClass } from '@loopback/core'; import { GrpcSecureOptions } from './keys'; export declare type ControllerInstance = { [name: string]: unknown; } & object; /** * Interface that describes a GRPC Sequence */ export interface GrpcSequenceInterface { unaryCall(call: ServerUnaryCall, callback: sendUnaryData): Promise; clientStreamingCall(clientStream: ServerReadableStream, callback: sendUnaryData): Promise; processServerStream(stream: ServerWritableStream): void; processBidiStream(stream: ServerDuplexStream): void; } export interface GrpcComponentConfig { controllers?: ControllerClass[]; cwd?: string; generateProtoTs?: boolean; /** * glob pattern for proto files, default to `**\/*proto` */ protoPattern?: string; /** * An array of glob patterns to ignore for proto files, * default to ['**\/node_modules\/**] */ protoIgnores?: string[]; protoOutDir?: string; host?: string; port?: number; sequence?: Constructor; secureOptions?: GrpcSecureOptions; } export interface GrpcMethod { PROTO_NAME: string; PROTO_PACKAGE: string; SERVICE_NAME: string; METHOD_NAME: string; REQUEST_STREAM: boolean; RESPONSE_STREAM: boolean; }