extends JsonRpcBaseRequest { params?: P; }
-interface JsonRpcResponse {
+ jsonrpc: '2.0';
+ id: number;
+ method: string;
+ params?: P;
+}
+
+interface JsonRpcResponse (method: string, params?: P): Observable = { jsonrpc: '2.0', id, method, ...(params && { params }) };
- this.ws$.next(request as SnapcastWebSocketMessage);
- return this.rpcResponses$.pipe(
- filter(response => response.id === id),
- take(1),
- map(response => response as JsonRpcResponse