/** * Transport — izolacja protokołu komunikacyjnego. * * Widget NIGDY nie wie czy dane lecą HTTP/WS/gRPC/GraphQL — deklaruje tylko * datasource po nazwie. Mapowanie datasource → transport → endpoint żyje * w osobnym registry i jest edytowalne bez dotykania widgetów. */ import type { Observable } from 'rxjs'; /** Identyfikator kanału/endpointa w konwencji transportu (np. `rates.usdpln`, `risk.limit`). */ export type TransportChannel = string & { readonly _brand: 'TransportChannel'; }; export declare const asTransportChannel: (value: string) => TransportChannel; export interface TransportRequest { readonly channel: TransportChannel; readonly params?: Readonly>; readonly body?: unknown; readonly headers?: Readonly>; } export interface TransportResponse { readonly data: T; readonly headers: Readonly>; readonly at: number; } export interface TransportAdapter { readonly kind: string; /** One-shot request (HTTP GET/POST, gRPC unary). */ request(req: TransportRequest): Promise>; /** Strumień (WS subscribe, SSE, gRPC server-streaming). */ subscribe(req: TransportRequest): Observable>; } /** Registry transportów — runtime wybiera na podstawie deklaracji datasource w configu. */ export interface TransportRegistry { register(kind: string, adapter: TransportAdapter): void; get(kind: string): TransportAdapter; } export declare const TRANSPORT_REGISTRY: import("../index.js").EchelonToken; //# sourceMappingURL=index.d.ts.map