/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Agent } from "#endpoint/Agent.js";
import { Abort } from "#general";
import { ServerNode } from "#node/ServerNode.js";
import { ApiPath } from "./ApiPath.js";
import { ApiResource } from "./ApiResource.js";
import { LocalResponse } from "./LocalResponse.js";
import { RemoteRequest } from "./RemoteRequest.js";
import { RemoteResponse } from "./RemoteResponse.js";
/**
 * Common substrate for the network APIs.
 *
 * The logical API covers RPC and read/write semantics.  These involve a "/"-separated path and a logical operation
 * (read, write, invoke, etc.)
 *
 * This namespace provides utilities for mapping paths to resources and taking action on the resource.
 */
export declare namespace Api {
    /**
     * Retrieve the {@link ApiResource} for a path.
     */
    function resourceFor(agent: Agent, path: ApiPath): Promise<ApiResource | void>;
    function log(level: "error" | "info", facility: string, id: string | undefined, ...message: unknown[]): void;
    function logRequest(facility: string, id: string | undefined, method: string, target: string): void;
    function logResponse(facility: string, response: RemoteResponse): void;
    /**
     * Execute a {@link RemoteRequest}.
     */
    function execute(facility: string, node: ServerNode, request: RemoteRequest, signal: Abort.Signal): Promise<LocalResponse>;
    function errorResponseOf(facility: string, id: string | undefined, error: unknown): LocalResponse;
}
//# sourceMappingURL=Api.d.ts.map