1 | import { GrpcClientOptions, ClientStubOptions } from './grpc';
|
2 | import * as gax from './gax';
|
3 | import { GoogleAuthOptions } from 'google-auth-library';
|
4 | import { BundleDescriptor, LongrunningDescriptor, PageDescriptor, StreamDescriptor } from './descriptor';
|
5 | import * as longrunning from './longRunningCalls/longrunning';
|
6 | import * as operationProtos from '../protos/operations';
|
7 | export interface ClientOptions extends GrpcClientOptions, GoogleAuthOptions, ClientStubOptions {
|
8 | libName?: string;
|
9 | libVersion?: string;
|
10 | clientConfig?: gax.ClientConfig;
|
11 | fallback?: boolean | 'rest' | 'proto';
|
12 | apiEndpoint?: string;
|
13 | }
|
14 | export interface Descriptors {
|
15 | page: {
|
16 | [name: string]: PageDescriptor;
|
17 | };
|
18 | stream: {
|
19 | [name: string]: StreamDescriptor;
|
20 | };
|
21 | longrunning: {
|
22 | [name: string]: LongrunningDescriptor;
|
23 | };
|
24 | batching?: {
|
25 | [name: string]: BundleDescriptor;
|
26 | };
|
27 | }
|
28 | export interface Callback<ResponseObject, NextRequestObject, RawResponseObject> {
|
29 | (err: Error | null | undefined, value?: ResponseObject | null, nextRequest?: NextRequestObject, rawResponse?: RawResponseObject): void;
|
30 | }
|
31 | export interface LROperation<ResultType, MetadataType> extends longrunning.Operation {
|
32 | promise(): Promise<[ResultType, MetadataType, operationProtos.google.longrunning.Operation]>;
|
33 | }
|
34 | export interface PaginationCallback<RequestObject, ResponseObject, ResponseType> {
|
35 | (err: Error | null, values?: ResponseType[], nextPageRequest?: RequestObject, rawResponse?: ResponseObject): void;
|
36 | }
|
37 | export interface PaginationResponse<RequestObject, ResponseObject, ResponseType> {
|
38 | values?: ResponseType[];
|
39 | nextPageRequest?: RequestObject;
|
40 | rawResponse?: ResponseObject;
|
41 | }
|