1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { Duplex } from 'stream';
|
18 | import { CancellablePromise } from './call';
|
19 | import { CallOptions } from './gax';
|
20 | import { GoogleError } from './googleError';
|
21 | import { Operation } from './longRunningCalls/longrunning';
|
22 | export interface GRPCCallResult {
|
23 | cancel(): void;
|
24 | }
|
25 | export interface RequestType {
|
26 | [index: string]: string | number | RequestType | Array<string | number | RequestType>;
|
27 | }
|
28 | export declare type ResponseType = {} | null;
|
29 | export declare type NextPageRequestType = {
|
30 | [index: string]: string | number | {};
|
31 | } | null;
|
32 | export declare type RawResponseType = Operation | {} | null;
|
33 | export declare type ResultTuple = [ResponseType | [ResponseType], NextPageRequestType | undefined, RawResponseType | undefined];
|
34 | export interface SimpleCallbackFunction {
|
35 | (request: RequestType, callback: APICallback): GRPCCallResult;
|
36 | }
|
37 | export declare type APICallback = (err: GoogleError | null, response?: ResponseType, next?: NextPageRequestType, rawResponse?: RawResponseType) => void;
|
38 | export declare type UnaryCall = (argument: {}, metadata: {}, options: {}, callback: APICallback) => GRPCCallResult;
|
39 | export declare type ServerStreamingCall = (argument: {}, metadata: {}, options: {}) => Duplex & GRPCCallResult;
|
40 | export declare type ClientStreamingCall = (metadata: {}, options: {}, callback?: APICallback) => Duplex & GRPCCallResult;
|
41 | export declare type BiDiStreamingCall = (metadata: {}, options: {}) => Duplex & GRPCCallResult;
|
42 | export declare type GRPCCall = UnaryCall | ServerStreamingCall | ClientStreamingCall | BiDiStreamingCall;
|
43 | export declare type CancellableStream = Duplex & GRPCCallResult;
|
44 | export declare type GaxCallResult = CancellablePromise<ResultTuple> | CancellableStream;
|
45 | export interface GaxCallPromise {
|
46 | (argument: {}, callOptions?: CallOptions, callback?: APICallback): CancellablePromise<ResultTuple>;
|
47 | }
|
48 | export interface GaxCallStream {
|
49 | (argument: {}, callOptions?: CallOptions, callback?: APICallback): CancellableStream;
|
50 | }
|
51 | export interface GaxCall {
|
52 | (argument: {}, callOptions?: CallOptions, callback?: APICallback): GaxCallResult;
|
53 | }
|
54 | export interface GRPCCallOtherArgs {
|
55 | options?: {
|
56 | deadline?: Date;
|
57 | };
|
58 | headers?: {};
|
59 | metadataBuilder: (abTests?: {}, headers?: {}) => {};
|
60 | }
|