1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { AuthClient } from './fallback';
|
18 | export interface FallbackServiceStub {
|
19 | [method: string]: (request: {}, options: {}, metadata: {}, callback: (err?: Error, response?: {} | undefined) => void) => {
|
20 | cancel: () => void;
|
21 | };
|
22 | }
|
23 | export interface FetchParameters {
|
24 | headers: {
|
25 | [key: string]: string;
|
26 | };
|
27 | body: Buffer | Uint8Array | string;
|
28 | method: 'get' | 'post' | 'put' | 'patch' | 'delete';
|
29 | url: string;
|
30 | }
|
31 | export declare function generateServiceStub(rpcs: {
|
32 | [name: string]: protobuf.Method;
|
33 | }, protocol: string, servicePath: string, servicePort: number, authClient: AuthClient, requestEncoder: (rpc: protobuf.Method, protocol: string, servicePath: string, servicePort: number, request: {}) => FetchParameters, responseDecoder: (rpc: protobuf.Method, ok: boolean, response: Buffer | ArrayBuffer) => {}): FallbackServiceStub;
|