import type { ErrorResponseMessage } from "../messages/types.js"; import type { Publisher } from "../transport.js"; /** An ErrorResponse as 1.x builds it: device.getErrorMessage(token), setErrorMessage(), send(). */ export declare class AlexaErrorResponse { private readonly correlationToken; private readonly rootTopic; private readonly endpointId; private readonly publisher; private error; private namespace?; private readonly messageId; /** Where a failed publish is reported (set by the Device that built this message, 1.5.2): send() never rejects. */ onPublishError?: (err: Error) => void; constructor(correlationToken: string, rootTopic: string, endpointId: string, publisher: Publisher | null); /** * The error to answer with. otherParams are the fields the type adds to the payload (validRange). The header * carries the namespace the type is documented under, Alexa.ThermostatController for THERMOSTAT_IS_OFF; * options.namespace names another. */ setErrorMessage(type: string, message: string, otherParams?: Record, options?: { namespace?: string; }): void; toJSON(): ErrorResponseMessage; /** Resolves with the topic published to, or "" when the publish failed. Never rejects. */ send(sendAsync?: boolean): Promise; }