import type { Temperature } from "../registry/schema.js"; /** * The namespace an ErrorResponse of this type goes under: the one the table of error types lists it with * (THERMOSTAT_IS_OFF: Alexa.ThermostatController, OBSTACLE_DETECTED: Alexa.Safety), Alexa for a type the table * does not have. */ export declare function errorNamespace(type: string): string; /** Thrown by a directive handler, or built to be sent: the directive is answered with this ErrorResponse. */ export declare class AlexaError extends Error { /** "ENDPOINT_UNREACHABLE" */ readonly type: string; /** payload.message: for the log of the skill, Alexa does not read it to the user. */ readonly alexaMessage: string; /** The fields of the payload next to type and message. */ readonly extra: Record; /** The namespace of the header. */ readonly namespace: string; constructor(type: string, message: string, extra?: Record, namespace?: string); } export type CurrentDeviceMode = "ASLEEP" | "COLOR" | "DEMAND_RESPONSE" | "ECO" | "NOT_PROVISIONED" | "VACATION" | "OTHER"; export type ControlUnavailableReason = "DEEP_SLEEP_MODE" | "OUT_OF_NETWORK_CONNECTIVITY" | "NO_CONNECTIVITY_PACKAGE_ENABLED" | "UNKNOWN"; export type ChargeState = "ALREADY_CHARGED_TO_REQUIRED_LEVEL" | "CURRENTLY_CHARGING" | "FULLY_CHARGED" | "NOT_CONNECTED_TO_POWER"; export declare const AlexaErrors: { /** An error of any type. */ of(type: string, message: string, extra?: Record): AlexaError; /** The value is outside what the endpoint takes. For a temperature: temperatureOutOfRange(). */ valueOutOfRange(message: string, validRange: { minimumValue: number; maximumValue: number; }): AlexaError; temperatureOutOfRange(message: string, validRange: { minimumValue: Temperature; maximumValue: Temperature; }): AlexaError; /** A light showing a color asked for a color temperature: "COLOR". */ notSupportedInCurrentMode(message: string, currentDeviceMode: CurrentDeviceMode): AlexaError; /** percentageState: what is left of the battery, 0 to 100. */ endpointLowPower(message: string, percentageState?: number): AlexaError; endpointControlUnavailable(message: string, reason: ControlUnavailableReason): AlexaError; notSupportedWithCurrentBatteryChargeState(message: string, currentChargeState: ChargeState, currentChargeLevelInPercentage?: number): AlexaError; /** What has to be refilled. */ insufficientResource(message: string, resourceType: "WATER"): AlexaError; /** What the user has to do first. */ maintenanceRequired(message: string, maintenanceAction?: "EMPTY_BIN"): AlexaError; /** Goes under Alexa.ThermostatController. minimumTemperatureDelta: how far apart the setpoints have to be. */ setpointsTooClose(message: string, minimumTemperatureDelta?: Temperature): AlexaError; /** Goes under Alexa.SecurityPanelController. With the endpoints listed, the user can bypass them by voice. */ bypassNeeded(message: string, endpointsNeedingBypass?: Array<{ friendlyName: string; endpointId?: string; }>): AlexaError; };