/** * @license * Copyright 2025-2026 Open Home Foundation * SPDX-License-Identifier: Apache-2.0 */ /** * WebSocket protocol types. * * Canonical type definitions live in @matter-server/ws-client. * This module re-exports them for backward compatibility and adds server-only types. */ export { type AccessControlEntry, type AccessControlTarget, type APICommands, type APIEvents, type ArgsOf, type AttributesData, type AttributeWriteResult, type BindingTarget, type CommandMessage, type CommissionableNodeData, type CommissioningParameters, type ErrorResultMessage, type EventMessage, type EventTypes, type LogLevelResponse, type LogLevelString, type SettableLogLevelString, type MatterFabricData, type MatterNodeEvent, type NodePingResult, type NotificationType, type ResponseOf, type ResultMessageBase, type ServerInfoMessage, type SuccessResultMessage, type MatterSoftwareVersion, type WebSocketConfig, TEST_NODE_START, UpdateSource, } from "@matter-server/ws-client"; export type { MatterNodeData as MatterNode } from "@matter-server/ws-client"; /** * Error codes matching Python Matter Server for API compatibility. * @see https://github.com/home-assistant-libs/python-matter-server/blob/main/matter_server/common/errors.py */ export declare enum ServerErrorCode { /** Generic/unknown error */ UnknownError = 0, /** Node commissioning failed */ NodeCommissionFailed = 1, /** Node interview failed */ NodeInterviewFailed = 2, /** Node is not ready (offline or not yet interviewed) */ NodeNotReady = 3, /** Node not resolving (CASE session establishment failed) */ NodeNotResolving = 4, /** Node does not exist */ NodeNotExists = 5, /** SDK version mismatch */ VersionMismatch = 6, /** SDK/Stack error */ SDKStackError = 7, /** Invalid command arguments */ InvalidArguments = 8, /** Invalid/unknown command */ InvalidCommand = 9, /** OTA update check failed */ UpdateCheckError = 10, /** OTA update failed */ UpdateError = 11 } /** * Custom error class for server errors with typed error codes. * Use this to throw errors that will be properly mapped to Python-compatible error codes. */ export declare class ServerError extends Error { readonly code: ServerErrorCode; constructor(code: ServerErrorCode, message: string, cause?: Error); static unknownError(message: string, cause?: Error): ServerError; static nodeCommissionFailed(message: string, cause?: Error): ServerError; static nodeInterviewFailed(message: string, cause?: Error): ServerError; static nodeNotReady(nodeId: number | bigint, cause?: Error): ServerError; static nodeNotResolving(nodeId: number | bigint, cause?: Error): ServerError; static nodeNotExists(nodeId: number | bigint): ServerError; static versionMismatch(message: string): ServerError; static sdkStackError(message: string, cause?: Error): ServerError; static invalidArguments(message: string): ServerError; static invalidCommand(command: string): ServerError; static updateCheckError(message: string, cause?: Error): ServerError; static updateError(message: string, cause?: Error): ServerError; } //# sourceMappingURL=WebSocketMessageTypes.d.ts.map