X-Opaque-Id support (#997)

* Added X-Opaque-Id support

* Updated type definitions

* Updated test

* Updated docs
This commit is contained in:
Tomas Della Vedova
2019-12-02 09:21:03 +01:00
committed by delvedor
parent 3e2a823a72
commit df76154388
7 changed files with 147 additions and 2 deletions

3
lib/Transport.d.ts vendored
View File

@ -38,6 +38,7 @@ interface TransportOptions {
headers?: anyObject;
generateRequestId?: generateRequestIdFn;
name: string;
opaqueIdPrefix?: string;
}
export interface RequestEvent<T = any, C = any> {
@ -90,6 +91,7 @@ export interface TransportRequestOptions {
id?: any;
context?: any;
warnings?: [string];
opaqueId?: string;
}
export interface TransportRequestCallback {
@ -121,6 +123,7 @@ export default class Transport {
compression: 'gzip' | false;
sniffInterval: number;
sniffOnConnectionFault: boolean;
opaqueIdPrefix: string | null;
sniffEndpoint: string;
_sniffEnabled: boolean;
_nextSniff: number;