UNPKG

5.8 kBTypeScriptView Raw
1/// <reference types="node" />
2import { ClientDuplexStream, ClientReadableStream, ClientUnaryCall, ClientWritableStream, ServiceError } from './call';
3import { CallCredentials, OAuth2Client } from './call-credentials';
4import { StatusObject } from './call-interface';
5import { Channel, ChannelImplementation } from './channel';
6import { CompressionAlgorithms } from './compression-algorithms';
7import { ConnectivityState } from './connectivity-state';
8import { ChannelCredentials, VerifyOptions } from './channel-credentials';
9import { CallOptions, Client, ClientOptions, CallInvocationTransformer, CallProperties, UnaryCallback } from './client';
10import { LogVerbosity, Status, Propagate } from './constants';
11import { Deserialize, loadPackageDefinition, makeClientConstructor, MethodDefinition, Serialize, ServiceDefinition } from './make-client';
12import { Metadata, MetadataOptions, MetadataValue } from './metadata';
13import { ConnectionInjector, Server, ServerOptions, UntypedHandleCall, UntypedServiceImplementation } from './server';
14import { KeyCertPair, ServerCredentials } from './server-credentials';
15import { StatusBuilder } from './status-builder';
16import { handleBidiStreamingCall, handleServerStreamingCall, handleClientStreamingCall, handleUnaryCall, sendUnaryData, ServerUnaryCall, ServerReadableStream, ServerWritableStream, ServerDuplexStream, ServerErrorResponse } from './server-call';
17export { OAuth2Client };
18/**** Client Credentials ****/
19export declare const credentials: {
20 /**
21 * Combine a ChannelCredentials with any number of CallCredentials into a
22 * single ChannelCredentials object.
23 * @param channelCredentials The ChannelCredentials object.
24 * @param callCredentials Any number of CallCredentials objects.
25 * @return The resulting ChannelCredentials object.
26 */
27 combineChannelCredentials: (channelCredentials: ChannelCredentials, ...callCredentials: CallCredentials[]) => ChannelCredentials;
28 /**
29 * Combine any number of CallCredentials into a single CallCredentials
30 * object.
31 * @param first The first CallCredentials object.
32 * @param additional Any number of additional CallCredentials objects.
33 * @return The resulting CallCredentials object.
34 */
35 combineCallCredentials: (first: CallCredentials, ...additional: CallCredentials[]) => CallCredentials;
36 createInsecure: typeof ChannelCredentials.createInsecure;
37 createSsl: typeof ChannelCredentials.createSsl;
38 createFromSecureContext: typeof ChannelCredentials.createFromSecureContext;
39 createFromMetadataGenerator: typeof CallCredentials.createFromMetadataGenerator;
40 createFromGoogleCredential: typeof CallCredentials.createFromGoogleCredential;
41 createEmpty: typeof CallCredentials.createEmpty;
42};
43/**** Metadata ****/
44export { Metadata, MetadataOptions, MetadataValue };
45/**** Constants ****/
46export { LogVerbosity as logVerbosity, Status as status, ConnectivityState as connectivityState, Propagate as propagate, CompressionAlgorithms as compressionAlgorithms, };
47/**** Client ****/
48export { Client, ClientOptions, loadPackageDefinition, makeClientConstructor, makeClientConstructor as makeGenericClientConstructor, CallProperties, CallInvocationTransformer, ChannelImplementation as Channel, Channel as ChannelInterface, UnaryCallback as requestCallback, };
49/**
50 * Close a Client object.
51 * @param client The client to close.
52 */
53export declare const closeClient: (client: Client) => void;
54export declare const waitForClientReady: (client: Client, deadline: Date | number, callback: (error?: Error) => void) => void;
55export { sendUnaryData, ChannelCredentials, CallCredentials, Deadline, Serialize as serialize, Deserialize as deserialize, ClientUnaryCall, ClientReadableStream, ClientWritableStream, ClientDuplexStream, CallOptions, MethodDefinition, StatusObject, ServiceError, ServerUnaryCall, ServerReadableStream, ServerWritableStream, ServerDuplexStream, ServerErrorResponse, ServiceDefinition, UntypedHandleCall, UntypedServiceImplementation, VerifyOptions, };
56/**** Server ****/
57export { handleBidiStreamingCall, handleServerStreamingCall, handleUnaryCall, handleClientStreamingCall, };
58export type Call = ClientUnaryCall | ClientReadableStream<any> | ClientWritableStream<any> | ClientDuplexStream<any, any>;
59/**** Unimplemented function stubs ****/
60export declare const loadObject: (value: any, options: any) => never;
61export declare const load: (filename: any, format: any, options: any) => never;
62export declare const setLogger: (logger: Partial<Console>) => void;
63export declare const setLogVerbosity: (verbosity: LogVerbosity) => void;
64export { ConnectionInjector, Server, ServerOptions };
65export { ServerCredentials };
66export { KeyCertPair };
67export declare const getClientChannel: (client: Client) => Channel;
68export { StatusBuilder };
69export { Listener, InterceptingListener } from './call-interface';
70export { Requester, ListenerBuilder, RequesterBuilder, Interceptor, InterceptorOptions, InterceptorProvider, InterceptingCall, InterceptorConfigurationError, NextCall, } from './client-interceptors';
71export { GrpcObject, ServiceClientConstructor, ProtobufTypeDefinition, } from './make-client';
72export { ChannelOptions } from './channel-options';
73export { getChannelzServiceDefinition, getChannelzHandlers } from './channelz';
74export { addAdminServicesToServer } from './admin';
75export { ServiceConfig, LoadBalancingConfig, MethodConfig, RetryPolicy, } from './service-config';
76export { ServerListener, FullServerListener, ServerListenerBuilder, Responder, FullResponder, ResponderBuilder, ServerInterceptingCallInterface, ServerInterceptingCall, ServerInterceptor, } from './server-interceptors';
77import * as experimental from './experimental';
78export { experimental };
79import { Deadline } from './deadline';