/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { Connection } from '@kapeta/schemas'; import { SimpleRequest, SimpleResponse } from './types'; declare class NetworkManager { private _connections; private _sources; private _targets; static toConnectionId({ provider, consumer }: Connection): string; constructor(); _ensureSystem(systemId: string): void; _ensureConnection(systemId: string, connectionId: string): Traffic[]; _ensureSource(systemId: string, sourceBlockInstanceId: string): Traffic[]; _ensureTarget(systemId: string, targetBlockInstanceId: string): Traffic[]; addRequest(systemId: string, connection: Connection, request: SimpleRequest, consumerMethodId?: string, providerMethodId?: string): Traffic; getTrafficForConnection(systemId: string, connectionId: string): Traffic[]; getTrafficForSource(systemId: string, blockInstanceId: string): Traffic[]; getTrafficForTarget(systemId: string, blockInstanceId: string): Traffic[]; } declare class Traffic { readonly id: string; readonly connectionId: string; readonly consumerMethodId: string | undefined; readonly providerMethodId: string | undefined; readonly created: number; readonly request: SimpleRequest; ended: null | number; error: null | string; response: SimpleResponse | null; constructor(connection: Connection, request: SimpleRequest, consumerMethodId?: string, providerMethodId?: string); asError(err: any): void; withResponse(response: SimpleResponse): void; } export declare const networkManager: NetworkManager; export {};