import Class from "../../../types/Class"; import IClientProxy from "../../../interfaces/Client/IClientProxy"; import HTTPClient from "./HTTPClient"; /** * HTTP proxy wrapper for service-to-service invocation. * * Provides a proxy interface for invoking remote services through the Dapr sidecar. * HTTP protocol does not support proxy creation, so all methods throw HTTPNotSupportedError. * * For gRPC-based proxy support, use {@link GRPCClientProxy} instead. * * @implements {IClientProxy} * * @internal */ export default class HTTPClientProxy implements IClientProxy { /** * Reference to the underlying HTTP client. */ client: HTTPClient; /** * Creates an HTTP proxy wrapper. * * @param client - The HTTP client instance */ constructor(client: HTTPClient); /** * Creates a type-safe proxy for service-to-service invocation. * * **Not supported for HTTP protocol.** The Dapr HTTP API does not support * typed proxy creation. Service-to-service calls must be made via the HTTP API directly. * * @typeParam T - The service interface type (unused for HTTP) * @param _cls - The service class/interface to proxy * @param _clientOptions - Optional proxy configuration (unused for HTTP) * * @returns Never - Always throws HTTPNotSupportedError * * @throws {@link HTTPNotSupportedError} Always - proxy is not supported over HTTP * * @example * ```typescript * // This will throw HTTPNotSupportedError * try { * const proxy = await client.proxy.create(MyService); * } catch (err) { * // err instanceof HTTPNotSupportedError * // Use gRPC client instead or call HTTP API directly * } * ``` * * @see {@link GRPCClientProxy} for gRPC-based proxy support * @see {@link DaprClient.proxy} for unified API */ create(_cls: Class, _clientOptions?: Record): Promise; }