feat(): include flag for parsed WS API responses
This commit is contained in:
@@ -57,6 +57,7 @@ interface WSClientEventMap<WsKey extends string> {
|
|||||||
export interface EmittableEvent<TEvent = any> {
|
export interface EmittableEvent<TEvent = any> {
|
||||||
eventType: 'response' | 'update' | 'exception' | 'authenticated';
|
eventType: 'response' | 'update' | 'exception' | 'authenticated';
|
||||||
event: TEvent;
|
event: TEvent;
|
||||||
|
isWSAPIResponse?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type safety for on and emit handlers: https://stackoverflow.com/a/61609010/880837
|
// Type safety for on and emit handlers: https://stackoverflow.com/a/61609010/880837
|
||||||
|
|||||||
@@ -717,6 +717,7 @@ export class WebsocketClient extends BaseWebsocketClient<WsKey> {
|
|||||||
results.push({
|
results.push({
|
||||||
eventType: 'exception',
|
eventType: 'exception',
|
||||||
event: parsed,
|
event: parsed,
|
||||||
|
isWSAPIResponse: true,
|
||||||
});
|
});
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
@@ -743,6 +744,7 @@ export class WebsocketClient extends BaseWebsocketClient<WsKey> {
|
|||||||
results.push({
|
results.push({
|
||||||
eventType: 'response',
|
eventType: 'response',
|
||||||
event: parsed,
|
event: parsed,
|
||||||
|
isWSAPIResponse: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|||||||
Reference in New Issue
Block a user