import { Client as Client_2 } from 'openapi-fetch'; import { default as default_2 } from 'long'; export declare type AccessToken = components['schemas']['AccessToken']; export declare type AccessTokenCreateBody = components['schemas']['AccessTokensCreateRequest']; export declare interface AccessTokenCreateParams extends AccessTokenCreateBody { } export declare interface AccessTokenRevokeParams extends AccessTokenRevokePath { } export declare type AccessTokenRevokePath = operations['revokeAccessToken']['parameters']['path']; export declare type AccessTokensInfo = components['schemas']['AccessTokensInfo']; export declare type AccountBackend = components['schemas']['AccountBackend']; export declare interface AccountBackendSetParams extends AccountBackend { } export declare type AccountInfo = components['schemas']['AccountInfo']; export declare type AccountLink = components['schemas']['AccountLink']; declare class AccountMethods { /** * Get account info. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the account information. */ AccountInfoGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get account state. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the account state. */ AccountStateGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get MQTT backend configuration. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the MQTT backend configuration. */ AccountBackendGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set MQTT backend configuration. * * @param {AccountBackendSetParams} params - Parameters for setting the MQTT backend configuration. * @param {AccountBackendSetParams['server_url']} params.server_url - MQTT server URL. * @param {AccountBackendSetParams['client_cert_type']} params.client_cert_type - Client certificate type. * @param {AccountBackendSetParams['ignore_server_cert']} params.ignore_server_cert - Whether to ignore the server certificate. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ AccountBackendSet(this: BusyBar, params: AccountBackendSetParams, options?: RequestOptions): Promise; /** * Unlink device from account. Removes association with the current account. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful unlinking. */ AccountUnlink(this: BusyBar, options?: RequestOptions): Promise; /** * Link device to account. Requests account link PIN. Works only if device is connected to MQTT and is not linked to account. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the link information (e.g., PIN). */ AccountLink(this: BusyBar, options?: RequestOptions): Promise; } export declare type AccountStatus = components['schemas']['AccountStatus']; export declare type AnimationElement = components['schemas']['AnimationElement']; /** Animation. Explicit sizes, as for images. */ export declare type AnimationNode = WithSize>>; declare type ApiSemver = components['schemas']['VersionInfo']['api_semver']; export declare type AppId = components['schemas']['AppId']; export declare type AppInfo = components['schemas']['AppInfo']; export declare type AppListResult = components['schemas']['AppListResult']; export declare type AppSettingsDocument = components['schemas']['AppSettingsDocument']; export declare interface AppsInstallParams extends AppsInstallQuery { } export declare type AppsInstallQuery = operations['installApp']['parameters']['query']; declare class AppsMethods { /** * Stage a JavaScript application for installation. Uploads an application package (TGZ or TAR file) and initiates the installation process. The package is unpacked into a staging area and a single-use installation key is returned, which must then be passed to AppsInstall to complete the installation. * * @param {AppsStageParams} params - Parameters for staging. * @param {AppsStageParams['file']} params.file - Application package (TGZ or TAR) to upload. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the staging result, including the installation key and staged application info. */ AppsStage(this: BusyBar, params: AppsStageParams, options?: RequestOptions): Promise; /** * Install a staged JavaScript application using the installation key returned by AppsStage. * * @param {AppsInstallParams} params - Parameters for the installation. * @param {AppsInstallParams['install_key']} params.install_key - Single-use installation key. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves when the application is installed. */ AppsInstall(this: BusyBar, params: AppsInstallParams, options?: RequestOptions): Promise; /** * Delete a JavaScript application. Removes an installed application, keeping its settings. * * @param {AppsRemoveParams} params - Parameters for the removal. * @param {AppsRemoveParams['app_id']} params.app_id - JavaScript application id. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves when the application is removed. */ AppsRemove(this: BusyBar, params: AppsRemoveParams, options?: RequestOptions): Promise; /** * List installed JavaScript applications. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the list of installed applications. */ AppsList(this: BusyBar, options?: RequestOptions): Promise; /** * Get application settings. Returns the complete settings document; the first request materializes it from the schema defaults. * * @param {AppsSettingsGetParams} params - Parameters for the settings request. * @param {AppsSettingsGetParams['app_id']} params.app_id - JavaScript application id. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the settings document. */ AppsSettingsGet(this: BusyBar, params: AppsSettingsGetParams, options?: RequestOptions): Promise; /** * Set application settings. Replaces the settings document: every field must be present and valid, with a version matching the application settings; unknown keys are dropped. * * @param {AppsSettingsSetParams} params - Parameters for the settings update. * @param {AppsSettingsSetParams['app_id']} params.app_id - JavaScript application id. * @param {AppsSettingsSetParams['settings']} params.settings - Complete settings document to store. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves when the settings are stored. */ AppsSettingsSet(this: BusyBar, params: AppsSettingsSetParams, options?: RequestOptions): Promise; /** * Reset application settings. Resets every field to its schema default. * * @param {AppsSettingsResetParams} params - Parameters for the settings reset. * @param {AppsSettingsResetParams['app_id']} params.app_id - JavaScript application id. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves when the settings are reset. */ AppsSettingsReset(this: BusyBar, params: AppsSettingsResetParams, options?: RequestOptions): Promise; } export declare interface AppsRemoveParams extends AppsRemoveQuery { } export declare type AppsRemoveQuery = operations['removeApp']['parameters']['query']; export declare interface AppsSettingsGetParams extends AppsSettingsQuery { } export declare type AppsSettingsQuery = operations['getAppSettings']['parameters']['query']; export declare interface AppsSettingsResetParams extends AppsSettingsQuery { } export declare interface AppsSettingsSetParams extends AppsSettingsQuery { settings: AppSettingsDocument; } export declare interface AppsStageParams { file: BusyFile; } export declare type AppStageResult = components['schemas']['AppStageResult']; export declare interface AssetsDeleteParams extends AssetsDeleteQuery { } export declare type AssetsDeleteQuery = operations['deleteAppAssets']['parameters']['query']; declare class AssetsMethods { /** * Upload asset file with app ID. Upload a file to the application-specific assets directory. If the directory does not yet exist, it will be created automatically. Additionally, if the file name contains a subdirectory, it will be created as well, and the file will be placed inside of it. * * @param {AssetsUploadParams} params - Parameters for the upload. * @param {AssetsUploadParams['application_name']} params.application_name - Application name for organizing assets. * @param {AssetsUploadParams['file']} params.file - File path for the uploaded asset within the app assets directory. * @param {AssetsUploadParams['data']} params.data - File data to upload. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Result of the upload operation. */ AssetsUpload(this: BusyBar, params: AssetsUploadParams, options?: RequestOptions): Promise; /** * Delete app assets. Deletes all assets for a specific app ID. * * @param {AssetsDeleteParams} params - Parameters for the delete. * @param {AssetsDeleteParams['application_name']} params.application_name - Application name whose assets should be deleted. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Result of the delete operation. */ AssetsDelete(this: BusyBar, params: AssetsDeleteParams, options?: RequestOptions): Promise; } export declare interface AssetsUploadParams extends AssetsUploadQuery { data: BusyFile; } export declare type AssetsUploadQuery = operations['uploadAssetWithAppId']['parameters']['query']; declare class AudioMethods { /** * Play audio file. Plays a file from the app's assets directory. * * @param {AudioPlayParams} params - Parameters for audio playback. * @param {AudioPlayParams['application_name']} params.application_name - Application name. * @param {string} [params.path] - Path to the audio file within the app's assets directory. * @param {string} [params.stock_path] - Stock audio file name. Mutually exclusive with `path`. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful play command. */ AudioPlay(this: BusyBar, params: AudioPlayParams, options?: RequestOptions): Promise; /** * Stop audio playback. Stops any currently playing audio. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful stop command. */ AudioStop(this: BusyBar, options?: RequestOptions): Promise; /** * Get audio volume. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the audio volume information. */ AudioVolumeGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set audio volume. * * @param {AudioVolumeParams} params - Volume parameters: * @param {AudioVolumeParams['volume']} params.volume - Volume level (0-100). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ AudioVolumeSet(this: BusyBar, params: AudioVolumeParams, options?: RequestOptions): Promise; } export declare type AudioPlayBody = components['schemas']['PlayAudio']; export declare type AudioPlayParams = AudioPlayBody; export declare type AudioVolumeInfo = components['schemas']['AudioVolumeInfo']; export declare interface AudioVolumeParams extends AudioVolumeQuery { } export declare type AudioVolumeQuery = operations['setAudioVolume']['parameters']['query']; /** * Authentication progress (Handshake/Token refresh) */ export declare enum AuthStatus { UNAUTHENTICATED = "UNAUTHENTICATED", AUTHENTICATING = "AUTHENTICATING", AUTHENTICATED = "AUTHENTICATED", REAUTHENTICATING = "REAUTHENTICATING", FAILED = "FAILED" } export declare interface AuthStatusComponent extends StatusComponent { attempts?: number; } export declare type AutoUpdateSettings = components['schemas']['AutoupdateSettings']; /** * Base class for all StateStream connections. * Orchestrates worker communication and callback management. */ declare abstract class BaseStateStream { protected addr: string; protected token?: string; protected isBinary: boolean; protected connectTimeout: number; protected dataTimeout: number; protected maxReconnectAttempts: number; protected maxAuthAttempts: number; protected reconnectDelay: number; protected workerName?: string; protected abstract streamMode: StreamMode; private worker; private connectionTimer; private dataTimer; private startResolve?; private startReject?; private stopResolve?; private stopReject?; private workerNameResolve?; private _status; get status(): StreamStatus; /** Static map to deduplicate token refresh requests across all instances in this JS context */ private static tokenRefreshPromises; protected dataCallback?: DataCallback; protected rawDataCallback?: RawDataCallback; protected errorCallback?: ErrorCallback_2; protected statusCallback?: StatusCallback; protected deviceEventCallback?: DeviceEventCallback; constructor(options: StreamOptions, config?: StreamConfig); /** * Transforms http/https to ws/wss and prefixes with auto-inferred protocol if no protocol present. */ protected resolveProtocol(addr: string): string; /** * Starts the stream connection. * Throws an error if already running. */ start({ dataCallback, rawDataCallback, errorCallback, statusCallback }?: { dataCallback?: DataCallback; rawDataCallback?: RawDataCallback; errorCallback?: ErrorCallback_2; statusCallback?: StatusCallback; }): Promise; /** * Stops the stream connection. */ stop(): Promise; /** * Cleans up all resources. */ destroy(): void; /** * Clears all registered callbacks. */ private clearCallbacks; /** * Sends a new token to the worker (for auth or token refresh). */ protected sendToken(token: string): void; /** * Requests the worker name stored in the worker and returns it as a Promise. */ getWorkerName(): Promise; /** * Subclasses must provide their own URL normalization. */ protected abstract normalizeUrl(addr: string): string; /** * Sends a command to the worker port. */ protected sendCommand(cmd: WorkerCommand): void; private ensureWorker; /** * Processes messages from the worker. */ protected handleWorkerMessage(event: WorkerEvent): void; /** * Maps an error code to the corresponding status component */ private mapErrorToStatus; /** * Updates a single component of the status and notifies listeners */ private updateStatusComponent; /** * Safe timer cleanup */ private clearConnectionTimer; /** * Reset the data inactivity timer */ private resetDataTimer; private clearDataTimer; /** * Normalizes the raw state from the worker into a ProcessedState for the UI. * Extracts the 'state' key for each update and merges bar_id for remote mode. */ private normalizeState; /** * Internally deduplicates token refresh requests for the same address. */ private handleTokenExpiredInternal; /** * Hook for handling token expiration. * Return a promise with the new token to enable deduplication. */ protected onTokenExpired?(): Promise | void; } declare type BatteryStatus = components['schemas']['StatusPower']['state']; export declare function bgrToRgba(data: Uint8Array, width: number, height: number): Uint8Array; declare class BleMethods { /** * Enable BLE. Starts advertising. * * @param {RequestOptions} [options] - Optional parameters. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ BleEnable(this: BusyBar, options?: RequestOptions): Promise; /** * Disable BLE. Stops advertising. * * @param {RequestOptions} [options] - Optional parameters. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ BleDisable(this: BusyBar, options?: RequestOptions): Promise; /** * Remove pairing. Remove pairing with previous device. * * @param {RequestOptions} [options] - Optional parameters. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ BleUnpair(this: BusyBar, options?: RequestOptions): Promise; /** * Returns current BLE status. * * @param {RequestOptions} [options] - Optional parameters. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the BLE status. */ BleStatusGet(this: BusyBar, options?: RequestOptions): Promise; } declare type BleServiceStatus = components['schemas']['BleStatusResponse']['status']; export declare type BleStatusResponse = components['schemas']['BleStatusResponse']; export declare function blobToUint8Array(blob: Blob): Promise; /** Namespace BSB_Error. */ export declare namespace BSB_Error { /** Cause enum. */ export enum Cause { RESOURCE_LIMIT = 0 } /** Severity enum. */ export enum Severity { FATAL = 0, ERROR = 1, WARNING = 2 } /** Properties of an Error. */ export interface Error { /** Error cause */ cause?: BSB_Error.Cause | null; /** Error severity */ severity?: BSB_Error.Severity | null; } } /** Namespace BSB_Frame. */ export declare namespace BSB_Frame { /** Encoding enum. */ export enum Encoding { PLAIN = 0, RUN_LENGTH = 1, DEFLATE = 2, DEFLATE_RUN_LENGTH = 3 } /** PixelFormat enum. */ export enum PixelFormat { RGB888 = 0, L8 = 1, L4 = 2 } /** Screen enum. */ export enum Screen { FRONT = 0, BACK = 1 } /** Properties of a Frame. */ export interface Frame { /** Frame screen */ screen?: BSB_Frame.Screen | null; /** Frame width */ width?: number | null; /** Frame height */ height?: number | null; /** Frame encoding */ encoding?: BSB_Frame.Encoding | null; /** Frame pixelFormat */ pixelFormat?: BSB_Frame.PixelFormat | null; /** Frame data */ data?: Uint8Array | null; } } /** Namespace BSB_Input. */ export declare namespace BSB_Input { /** Button enum. */ export enum Button { OK = 0, BACK = 1, START = 2 } /** ButtonAction enum. */ export enum ButtonAction { PRESS = 0, RELEASE = 1 } /** SwitchPosition enum. */ export enum SwitchPosition { BUSY = 0, CUSTOM = 1, OFF = 2, APPS = 3, SETTINGS = 4 } /** Properties of a ButtonEvent. */ export interface ButtonEvent { /** ButtonEvent button */ button?: BSB_Input.Button | null; /** ButtonEvent action */ action?: BSB_Input.ButtonAction | null; } /** Properties of a SwitchEvent. */ export interface SwitchEvent { /** SwitchEvent position */ position?: BSB_Input.SwitchPosition | null; } /** Properties of an EncoderEvent. */ export interface EncoderEvent { /** EncoderEvent delta */ delta?: number | null; } /** Properties of an InputEvent. */ export interface InputEvent { /** InputEvent buttonEvent */ buttonEvent?: BSB_Input.ButtonEvent | null; /** InputEvent switchEvent */ switchEvent?: BSB_Input.SwitchEvent | null; /** InputEvent encoderEvent */ encoderEvent?: BSB_Input.EncoderEvent | null; } } /** Namespace BSB_State. */ export declare namespace BSB_State { /** Properties of a StateUpdate. */ export interface StateUpdate { /** StateUpdate deviceName */ deviceName?: BSB_State.DeviceName | null; /** StateUpdate power */ power?: BSB_State.Power | null; /** StateUpdate brightness */ brightness?: BSB_State.Brightness | null; /** StateUpdate audioVolume */ audioVolume?: BSB_State.AudioVolume | null; /** StateUpdate wifi */ wifi?: BSB_State.Wifi | null; /** StateUpdate updateState */ updateState?: BSB_Update.UpdateState | null; /** StateUpdate updateCheck */ updateCheck?: BSB_Update.CheckState | null; /** StateUpdate timezone */ timezone?: BSB_State.Timezone | null; /** StateUpdate matter */ matter?: BSB_State.Matter | null; /** StateUpdate frame */ frame?: BSB_Frame.Frame | null; /** StateUpdate input */ input?: BSB_Input.InputEvent | null; /** StateUpdate timer */ timer?: BSB_Timer.Timer | null; /** StateUpdate ble */ ble?: BSB_State.Ble.Ble | null; /** StateUpdate autoUpdateState */ autoUpdateState?: BSB_Update.AutoUpdateState | null; /** StateUpdate timerProfiles */ timerProfiles?: BSB_Timer.Profiles | null; } /** Properties of a State. */ export interface State { /** State timestamp */ timestamp?: number | default_2 | null; /** State updates */ updates?: BSB_State.StateUpdate[] | null; /** State error */ error?: BSB_Error.Error | null; } /** Properties of a DeviceName. */ export interface DeviceName { /** DeviceName name */ name?: string | null; } /** Properties of a BrightnessAutomatic. */ export interface BrightnessAutomatic { } /** Properties of a BrightnessManual. */ export interface BrightnessManual { /** BrightnessManual brightness */ brightness?: number | null; } /** Properties of a Brightness. */ export interface Brightness { /** Brightness automatic */ automatic?: BSB_State.BrightnessAutomatic | null; /** Brightness manual */ manual?: BSB_State.BrightnessManual | null; /** Brightness actualBrightness */ actualBrightness?: number | null; } /** BatteryStatus enum. */ export enum BatteryStatus { DISCHARGING = 0, CHARGING = 1, CHARGED = 2 } /** Properties of an UnknownPowerState. */ export interface UnknownPowerState { } /** Properties of a PowerState. */ export interface PowerState { /** PowerState batteryStatus */ batteryStatus?: BSB_State.BatteryStatus | null; /** PowerState batteryChargePercent */ batteryChargePercent?: number | null; /** PowerState batteryVoltageMv */ batteryVoltageMv?: number | null; /** PowerState batteryCurrentMa */ batteryCurrentMa?: number | null; /** PowerState usbVoltageMv */ usbVoltageMv?: number | null; } /** Properties of a Power. */ export interface Power { /** Power unknown */ unknown?: BSB_State.UnknownPowerState | null; /** Power known */ known?: BSB_State.PowerState | null; } /** Properties of an AudioVolume. */ export interface AudioVolume { /** AudioVolume volume */ volume?: number | null; } /** WifiConnectionStatus enum. */ export enum WifiConnectionStatus { CONNECTED = 0, CONNECTING = 1, DISCONNECTING = 2, RECONNECTING = 3 } /** WifiSecurity enum. */ export enum WifiSecurity { UNKNOWN = 0, OPEN = 1, WPA = 2, WPA2 = 3, WEP = 4, WPA_WPA2 = 5, WPA3 = 6, WPA2_WPA3 = 7 } /** IpConfigurationMethod enum. */ export enum IpConfigurationMethod { DHCP = 0, STATIC = 1 } /** IpProtocol enum. */ export enum IpProtocol { IPV4 = 0, IPV6 = 1 } /** Properties of a WifiStateUnknown. */ export interface WifiStateUnknown { } /** Properties of a WifiStateInactive. */ export interface WifiStateInactive { } /** Properties of a WifiStateActive. */ export interface WifiStateActive { /** WifiStateActive status */ status?: BSB_State.WifiConnectionStatus | null; /** WifiStateActive ssid */ ssid?: string | null; /** WifiStateActive bssid */ bssid?: string | null; /** WifiStateActive channel */ channel?: number | null; /** WifiStateActive rssi */ rssi?: number | null; /** WifiStateActive security */ security?: BSB_State.WifiSecurity | null; } /** Properties of an IpAddress. */ export interface IpAddress { /** IpAddress protocol */ protocol?: BSB_State.IpProtocol | null; /** IpAddress method */ method?: BSB_State.IpConfigurationMethod | null; /** IpAddress address */ address?: string | null; /** IpAddress gateway */ gateway?: string | null; /** IpAddress netmask */ netmask?: string | null; } /** Properties of a Wifi. */ export interface Wifi { /** Wifi unknown */ unknown?: BSB_State.WifiStateUnknown | null; /** Wifi inactive */ inactive?: BSB_State.WifiStateInactive | null; /** Wifi active */ active?: BSB_State.WifiStateActive | null; /** Wifi ipAddresses */ ipAddresses?: BSB_State.IpAddress[] | null; } /** Properties of a Timezone. */ export interface Timezone { /** Timezone name */ name?: string | null; /** Timezone offset */ offset?: number | null; /** Timezone abbr */ abbr?: string | null; } /** MatterCommissioningStatus enum. */ export enum MatterCommissioningStatus { NEVER_STARTED = 0, STARTED = 1, COMPLETED_SUCCESSFULLY = 2, FAILED = 3 } /** Properties of a MatterCommissioningState. */ export interface MatterCommissioningState { /** MatterCommissioningState status */ status?: BSB_State.MatterCommissioningStatus | null; /** MatterCommissioningState timestamp */ timestamp?: number | default_2 | null; } /** Properties of a Matter. */ export interface Matter { /** Matter fabricCount */ fabricCount?: number | null; /** Matter state */ state?: BSB_State.MatterCommissioningState | null; } /** Namespace Ble. */ export namespace Ble { /** ServiceStatus enum. */ export enum ServiceStatus { RESET = 0, INITIALIZATION = 1, READY = 2, ADVERTISING = 3, CONNECTABLE = 4, CONNECTED = 5, ERROR = 6 } /** Properties of a Ble. */ export interface Ble { /** Ble status */ status?: BSB_State.Ble.ServiceStatus | null; /** Ble remoteAddress */ remoteAddress?: string | null; } } } /** Namespace BSB_Timer. */ export declare namespace BSB_Timer { /** Properties of a Profile. */ export interface Profile { /** Profile name */ name?: string | null; /** Profile json */ json?: BSB_Util.Json | null; } /** Properties of a Profiles. */ export interface Profiles { /** Profiles profiles */ profiles?: BSB_Timer.Profile[] | null; } /** Properties of a Timer. */ export interface Timer { /** Timer json */ json?: BSB_Util.Json | null; } } /** Namespace BSB_Update. */ export declare namespace BSB_Update { /** UpdateEvent enum. */ export enum UpdateEvent { SESSION_START = 0, SESSION_STOP = 1, ACTION_BEGIN = 2, ACTION_DONE = 3, DETAIL_CHANGE = 4, ACTION_PROGRESS = 5, EVENT_NONE = 6 } /** UpdateAction enum. */ export enum UpdateAction { DOWNLOAD = 0, SHA_VERIFICATION = 1, UNPACK = 2, INSTALLATION_PREPARE = 3, INSTALLATION_APPLY = 4, ACTION_NONE = 5 } /** UpdateStatus enum. */ export enum UpdateStatus { OK = 0, BATTERY_LOW = 1, BUSY = 2, DOWNLOAD_FAILURE = 3, DOWNLOAD_ABORT = 4, SHA_MISMATCH = 5, UNPACK_CREATE_STAGING_DIRECTORY_FAILURE = 6, UNPACK_ARCHIVE_OPEN_FAILURE = 7, UNPACK_ARCHIVE_UNPACK_FAILURE = 8, INSTALLATION_PREPARE_MANIFEST_NOT_FOUND = 9, INSTALLATION_PREPARE_MANIFEST_INVALID = 10, INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE = 11, INSTALLATION_PREPARE_POINTER_SETUP_FAILURE = 12, UNKNOWN_FAILURE = 13 } /** CheckError enum. */ export enum CheckError { NOT_AVAILABLE = 0, FAILURE = 1, IDLE = 2 } /** CheckEvent enum. */ export enum CheckEvent { START = 0, STOP = 1, NONE = 2 } /** Properties of an UpdateAvailable. */ export interface UpdateAvailable { /** UpdateAvailable version */ version?: string | null; } /** Properties of an UpdateUnavailable. */ export interface UpdateUnavailable { /** UpdateUnavailable reason */ reason?: BSB_Update.CheckError | null; } /** Properties of an UpdateState. */ export interface UpdateState { /** UpdateState event */ event?: BSB_Update.UpdateEvent | null; /** UpdateState action */ action?: BSB_Update.UpdateAction | null; /** UpdateState status */ status?: BSB_Update.UpdateStatus | null; } /** Properties of a CheckState. */ export interface CheckState { /** CheckState event */ event?: BSB_Update.CheckEvent | null; /** CheckState available */ available?: BSB_Update.UpdateAvailable | null; /** CheckState unavailable */ unavailable?: BSB_Update.UpdateUnavailable | null; } /** Properties of an AutoUpdateInterval. */ export interface AutoUpdateInterval { /** AutoUpdateInterval start */ start?: number | null; /** AutoUpdateInterval end */ end?: number | null; } /** Properties of an AutoUpdateState. */ export interface AutoUpdateState { /** AutoUpdateState enabled */ enabled?: boolean | null; /** AutoUpdateState interval */ interval?: BSB_Update.AutoUpdateInterval | null; } } /** Namespace BSB_Util. */ export declare namespace BSB_Util { /** Compression enum. */ export enum Compression { PLAIN = 0, GZIP = 1 } /** Properties of a Json. */ export interface Json { /** Json compression */ compression?: BSB_Util.Compression | null; /** Json data */ data?: Uint8Array | null; } } export declare interface BusyBar extends SystemMethods, UpdateMethods, TimeMethods, AccountMethods, DisplayMethods, AudioMethods, WifiMethods, StorageMethods, SettingsMethods, BleMethods, InputMethods, AssetsMethods, AppsMethods, SmartHomeMethods, BusyMethods { } /** * Main library class for interacting with the Busy Bar API. * * @class */ export declare class BusyBar { /** * Device host address. * @type {BusyBarConfig['host']} * @readonly */ readonly addr: string; /** * Current API semantic version. * @type {ApiSemver} */ apiSemver: ApiSemver; /** * API Client instance. */ readonly apiClient: BusyBarClient; private setApiKeyFn; private setTokenFn; /** * Creates an instance of BUSY Bar. * Initializes the API client with the provided host address. * * @param {BusyBarConfig} config - BUSY Bar connection configuration * @param {BusyBarConfig['addr']} config.addr - * The device address or proxy endpoint. * * Can be: * - An IP address (e.g. `192.168.0.10`) * - A domain name * - A full URL (`http://` or `https://`) * * If no protocol is specified, `http://` will be automatically added. * * @param {BusyBarConfig['token']} config.token - * Optional authentication token. * * Must be provided when `addr` points to a secured proxy endpoint * such as `https://api.busy.app`. * * @param {BusyBarConfig['timeout']} config.timeout - * Optional default timeout for all requests in milliseconds. * * Defaults to `3000` if not provided. This value can be overridden in individual method calls. */ constructor(config?: BusyBarConfig); /** * Sets HTTP Access Password for all subsequent requests. * @param {string} key - API key to use in "X-API-Token" header. */ setHTTPAccessPassword(key: string): void; /** * Sets Bearer token for all subsequent requests. * @param {string} token - Bearer token to use in "Authorization" header. */ setToken(token: string): void; } declare type BusyBarClient = Client_2 & { execute: (requestFn: (signal?: AbortSignal) => Promise, options?: RequestOptions) => Promise; }; export declare type BusyBarConfig = { addr?: string; token?: string; timeout?: number; HTTPAccessPassword?: string; }; export declare type BusyBarSettings = components['schemas']['BusyBarSettings']; export declare type BusyFile = Buffer | Blob | File | ArrayBuffer; declare class BusyMethods { /** * Get BUSY timer snapshot. * * Gets the current state of the BUSY timer in snapshot form. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current BUSY timer snapshot. */ BusySnapshotGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set BUSY timer snapshot. * * Run the timer starting from the given snapshot. * * @param {BusySnapshotSetParams} params - Snapshot to set. * @param {BusySnapshotSetParams['snapshot']} params.snapshot - Timer snapshot data. * @param {BusySnapshotSetParams['snapshot_timestamp_ms']} params.snapshot_timestamp_ms - Snapshot timestamp in milliseconds. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successfully set snapshot. */ BusySnapshotSet(this: BusyBar, params: BusySnapshotSetParams, options?: RequestOptions): Promise; /** * Get BUSY timer profile. * * Gets the BUSY timer profile under specified slot. * * @param {BusyProfileGetParams} params - Profile lookup parameters. * @param {BusyProfileGetParams['slot']} params.slot - Profile slot. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} BUSY timer profile for the given slot. */ BusyProfileGet(this: BusyBar, params: BusyProfileGetParams, options?: RequestOptions): Promise; /** * Set BUSY timer profile. * * Sets the BUSY timer profile under specified slot. * * @param {BusyProfileSetParams} params - Profile to set. * @param {BusyProfileSetParams['slot']} params.slot - Profile slot. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successfully set profile. */ BusyProfileSet(this: BusyBar, params: BusyProfileSetParams, options?: RequestOptions): Promise; } export declare type BusyProfile = components['schemas']['BusyProfile']; export declare interface BusyProfileGetParams { slot: BusyProfileSlot; } export declare interface BusyProfileSetParams extends BusyProfile { slot: BusyProfileSlot; } export declare type BusyProfileSlot = components['schemas']['BusyProfileSlot']; export declare type BusySnapshot = components['schemas']['BusySnapshot']; export declare type BusySnapshotInfinite = components['schemas']['BusySnapshotInfinite']; export declare type BusySnapshotInterval = components['schemas']['BusySnapshotInterval']; export declare type BusySnapshotNotStarted = components['schemas']['BusySnapshotNotStarted']; export declare interface BusySnapshotSetParams extends BusySnapshot { } export declare type BusySnapshotSimple = components['schemas']['BusySnapshotSimple']; export declare type BusySnapshotState = BusySnapshot['snapshot']; export declare type BusyTimerInfiniteSettings = components['schemas']['BusyTimerInfiniteSettings']; export declare type BusyTimerIntervalSettings = components['schemas']['BusyTimerIntervalSettings']; export declare type BusyTimerSettings = BusyProfile['timer_settings']; export declare type BusyTimerSimpleSettings = components['schemas']['BusyTimerSimpleSettings']; declare type ByType = Extract; /** * Where a capital sits on the line, and how tall it is, in visible pixels. * * Unlike `lineHeight` and `fontBaseline`, this covers only lit rows, so lines stacked by it sit the asked-for distance apart. Descenders hang below the box. */ export declare function capBox(font: DeviceFont): { top: number; height: number; }; declare type CheckError = 'not_available' | 'failure' | 'idle'; declare type CheckEvent = 'start' | 'stop' | 'none'; export declare type ClearDisplayQuery = NonNullable; /** * Hex (#RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB) or a name (none, black, white, red, green, blue, yellow, cyan, magenta, gray, grey). */ export declare type ColorValue = string; /** Children in a column, top to bottom. */ export declare function column(props: ContainerProps, children: Node_2[]): ColumnNode; /** Children in a column, top to bottom. */ export declare type ColumnNode = ContainerBase & { type: 'column'; children: Node_2[]; }; declare interface components { schemas: { SuccessResponse: { /** * @description Success status message * @example OK */ result: string; }; /** @example { * "error": "Invalid parameter", * "error_code": "invalid_parameter" * } */ Error: { /** @description Error message */ error: string; /** @description Error code */ error_code?: string; }; AccountLink: { /** @example ABCD */ code?: string; /** @example 1761060863 */ expires_at?: number; }; AccountInfo: { /** @example true */ linked?: boolean; /** @example 12345678-9abc-def0-1234-56789abcdef0 */ id?: string; /** @example name@example.com */ email?: string; /** @example 12345678-9abc-def0-1234-56789abcdef0 */ user_id?: string; }; AccountStatus: { /** * @example connected * @enum {string} */ status?: 'error' | 'disconnected' | 'connected'; }; AccountBackend: { /** @description MQTT server url to connect to */ server_url: string; /** * @description Client certificate type to use * @enum {string} */ client_cert_type: 'default' | 'custom' | 'none'; /** @description Whether to ignore the server certificate */ ignore_server_cert: boolean; }; /** * @description JavaScript application id * @example app.author.example_app */ AppId: string; AppStageResult: { /** * @description Operation result * @example OK */ result: string; /** * @description Single-use installation key * @example 123456789 */ install_key: number; /** @description Staged application info */ staged: components['schemas']['AppInfo']; /** @description If an application with the same ID is already installed, its info */ installed?: components['schemas']['AppInfo']; }; AppInfo: { /** * @description Application ID * @example com.example.useful-app */ id: string; /** * @description Human-readable application name * @example A Useful App */ name: string; /** * @description Application version * @example 1.0.0 */ version: string; /** * @description Application author * @example Erika Mustermann */ author: string; /** * @description Application description * @example An app to assist in my daily routine */ description: string; /** * @description Application icon path * @example /ext/apps_assets/shared/images/unknown_app_front_8x8.image */ icon_path: string; /** * @description A flag indicating that this app only shows up in debug mode * @example false */ is_debug: boolean; }; AppListResult: { apps: components['schemas']['AppInfo'][]; }; AppSettingsDocument: { /** * @description Settings version of the application schema * @example 1 */ version: number; /** * @description Setting values keyed by field id, with groups as nested objects * @example { * "volume": 5 * } */ values: { [key: string]: unknown; }; }; /** @example my_app */ ApplicationName: string; AssetsPath: string; StockPath: string; /** @example { * "application_name": "my_app", * "led_notification_color": "#FF0000FF", * "elements": [ * { * "id": "0", * "timeout": 10, * "align": "center", * "x": 36, * "y": 10, * "type": "text", * "text": "Hello, World! Long text", * "font": "normal", * "color": "#FFFFFFFF", * "width": 72, * "scroll_rate": 1000, * "scroll_start_delay": 1000, * "scroll_repeat_delay": 2500, * "display": "front" * }, * { * "id": "1", * "timeout": 6, * "align": "top_mid", * "x": 36, * "y": 0, * "type": "text", * "text": "top_mid", * "font": "small", * "color": "#AAFF00FF", * "display": "front" * } * ] * } */ DisplayElements: { /** @description Application name for organizing assets */ application_name: components['schemas']['ApplicationName']; /** * @description Draw priority in the range [1, 100] inclusive. A draw request is accepted when its priority is greater than or equal to (>=) the priority of the currently running system app. Equal-priority requests from a different application_name override whatever is on screen. System app priority levels: stub/poweroff apps = 0 (always preemptable), any standard built-in app = 10, active BUSY/CUSTOM work session = 90. The draw API only accepts values 1–100; 0 is reserved for internal use. * @default 50 */ priority?: number; /** * @description Color to blink the status LED, in #RRGGBBAA format. If not specified, the LED will not blink. * @example #FF0000FF */ led_notification_color?: string; /** @description Array of elements to display */ elements: (components['schemas']['TextElement'] | components['schemas']['ImageElement'] | components['schemas']['AnimationElement'] | components['schemas']['CountdownElement'] | components['schemas']['RectangleElement'] | components['schemas']['XpmBitmapElement'])[]; }; DisplayElement: { /** @description Unique identifier for the element */ id: string; /** @description Time in seconds the element should be displayed (0 for no timeout). Mutually exclusive with display_until. */ timeout?: number; /** @description The element will be hidden when system time reaches the specified Unix timestamp (in seconds). Mutually exclusive with timeout. */ display_until?: string; /** * @description Type of display element * @enum {string} */ type: 'text' | 'image' | 'animation' | 'countdown' | 'rectangle' | 'xpmbitmap'; /** * @description X coordinate of selected anchor point relative to top-left of display * @default 0 */ x?: number; /** * @description Y coordinate of selected anchor point relative to top-left of display * @default 0 */ y?: number; /** * @description Which display to show the element on (for dual-display devices) * @default front * @enum {string} */ display?: 'front' | 'back'; /** * @description Anchor point of element. Also use `x` and `y` to position element. * @enum {string} */ align?: 'top_left' | 'top_mid' | 'top_right' | 'mid_left' | 'center' | 'mid_right' | 'bottom_left' | 'bottom_mid' | 'bottom_right'; /** @description Order of the element. Elements with higher Z-indexes are drawn on top of those with lower ones. */ z_index?: number; }; TextElement: Omit & { /** @description Text content to display (printable ASCII only; fonts are bitmap ASCII) */ text: string; /** * @description One of the available fonts to display the text in * @enum {string} */ font: 'tiny' | 'small' | 'normal' | 'condensed' | 'bold' | 'large' | 'extra_large' | 'global' | 'superscript'; /** * @description Color to display the text in, in #RRGGBBAA format * @default #FFFFFFFF */ color?: string; /** @description Width of the label */ width?: number; /** @description Scroll rate in pixels per minute */ scroll_rate?: number; /** @description Delay in milliseconds before the scroll animation begins */ scroll_start_delay?: number; /** @description Pause duration in milliseconds between successive scroll cycles */ scroll_repeat_delay?: number; } & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'text'; }; ImageElement: Omit & (({ /** @description Path to the image file in the app's assets */ path: components['schemas']['AssetsPath']; } | { /** @description Stock image file name */ stock_path: components['schemas']['StockPath']; }) & { /** * @description Opacity of the image in percentage (0-100) * @default 100 */ opacity?: number; }) & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'image'; }; AnimationElement: Omit & (({ /** @description Path to the animation file in the app's assets */ path?: components['schemas']['AssetsPath']; } | { /** @description Stock animation file name */ stock_path?: components['schemas']['StockPath']; }) & { /** * @description Whether to loop the requested part of the animation * @default false */ loop?: boolean; /** * @description If the element has been created before and this flag is true, the previous range will finish before the requested one starts. * @default false */ await_previous_end?: boolean; /** @description Name of the section to play back. Specifying "default" selects the entire animation. */ section?: string; /** * @description Opacity of the animated image in percentage (0-100) * @default 100 */ opacity?: number; }) & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'animation'; }; CountdownElement: Omit & { /** @description Seconds-based Unix UTC timestamp to count down or up to. Note: it's a number in a string. */ timestamp: string; /** * @description Color to display the text in, in #RRGGBBAA format * @default #FFFFFFFF */ color?: string; /** * @description Whether to count up or down * @enum {string} */ direction: 'time_left' | 'time_since'; /** * @description When to show the hours position * @enum {string} */ show_hours: 'when_non_zero' | 'always'; } & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'countdown'; }; RectangleElement: Omit & { /** @description Width of the rectangle in pixels */ width: number; /** @description Height of the rectangle in pixels */ height: number; /** @description Corner radius of the rectangle in pixels (0 for sharp corners) */ radius?: number; /** * @description Fill style of the rectangle * @default none * @enum {string} */ fill?: 'none' | 'solid' | 'gradient_h' | 'gradient_v'; /** * @description Colors used for filling the rectangle. For solid fill, provide one color. For gradient fill, provide two colors. * @default [ * "#FFFFFFFF", * "#00000000" * ] */ fill_colors?: string[]; /** * @description Width of the rectangle border in pixels (0 for no border) * @default 1 */ border_width?: number; /** * @description Color of the rectangle border in #RRGGBBAA format * @default #FFFFFFFF */ border_color?: string; } & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'rectangle'; }; XpmBitmapElement: Omit & { /** @description XPM2 source as plain text: must begin with a "! XPM2" signature line, followed by a "width height ncolors cpp" header line, then ncolors color lines, then height pixel rows. Each color line is " " where visual is c (color), g/g4 (grayscale), m (monochrome), or s (symbolic). Values can be hex (#RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB), or named (none, black, white, red, green, blue, yellow, cyan, magenta, gray, grey). Limits: ncolors <= 32, cpp <= 4, and width/height must not exceed the target display dimensions (see the "display" field). */ data: string; /** * @description Opacity of the image in percentage (0-100) * @default 100 */ opacity?: number; } & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'xpmbitmap'; }; PlayAudio: { /** @description Application name for organizing assets */ application_name: components['schemas']['ApplicationName']; } & ({ /** @description Path to audio file within app's assets directory */ path: components['schemas']['AssetsPath']; } | { /** @description Stock audio file name */ stock_path: components['schemas']['StockPath']; }); DeletionParameters: { /** * @description Fill in this field for a sanity check that you actually own these elements. Omit it to delete them anyway. * @example my_app */ application_name?: components['schemas']['ApplicationName']; /** @description Unique identifiers of elements that should be deleted. Omit this field to delete all elements. */ element_ids?: string[]; }; BleStatusResponse: { /** * @example connected * @enum {string} */ status: 'reset' | 'initialization' | 'disabled' | 'enabled' | 'connectable' | 'connected' | 'internal error'; /** * @description Remote device address. Only present when status is "connected". * @example 50:DA:D6:FE:DD:A9 */ address?: string; }; BusySnapshot: { snapshot: (components['schemas']['BusySnapshotNotStarted'] | components['schemas']['BusySnapshotInfinite'] | components['schemas']['BusySnapshotSimple'] | components['schemas']['BusySnapshotInterval']) & { busy_bar_settings: components['schemas']['BusyBarSettings']; }; /** @example 1761582532251 */ snapshot_timestamp_ms: number; }; BusySnapshotNotStarted: { /** @constant */ type: 'NOT_STARTED'; }; BusySnapshotInfinite: { /** @constant */ type: 'INFINITE'; /** * Format: uuid * @example 00000000-0000-0000-0000-000000000000 */ card_id: string; /** @example false */ is_paused: boolean; }; BusySnapshotSimple: { /** @constant */ type: 'SIMPLE'; /** * Format: uuid * @example 00000000-0000-0000-0000-000000000000 */ card_id: string; /** @example 9000 */ time_left_ms: number; /** @example false */ is_paused: boolean; }; BusySnapshotInterval: { /** @constant */ type: 'INTERVAL'; /** * Format: uuid * @example 00000000-0000-0000-0000-000000000000 */ card_id: string; /** @example 1 */ current_interval: number; /** @example 60000 */ current_interval_time_total_ms: number; /** @example 42690 */ current_interval_time_left_ms: number; /** @example false */ is_paused: boolean; interval_settings: components['schemas']['BusyTimerIntervalSettings']; }; BusyProfile: { /** @example -1 */ sort_order: number; /** @example study */ title: string; /** * Format: uuid * @example 00000000-0000-0000-0000-000000000000 */ id: string; timer_settings: components['schemas']['BusyTimerInfiniteSettings'] | components['schemas']['BusyTimerSimpleSettings'] | components['schemas']['BusyTimerIntervalSettings']; busy_bar_settings: components['schemas']['BusyBarSettings']; /** @example 1761582532251 */ profile_timestamp_ms: number; }; /** * @example busy * @enum {string} */ BusyProfileSlot: 'busy' | 'custom'; BusyTimerInfiniteSettings: { /** @constant */ type: 'INFINITE'; }; BusyTimerSimpleSettings: { /** @constant */ type: 'SIMPLE'; /** @example 300000 */ total_time_ms: number; }; BusyTimerIntervalSettings: { /** @constant */ type: 'INTERVAL'; /** @example 120000 */ interval_work_ms: number; /** @example 60000 */ interval_rest_ms: number; /** @example 3 */ interval_work_cycles_count: number; /** @example false */ is_autostart_enabled: boolean; }; BusyBarSettings: { /** @example on_air */ theme: string; /** @example false */ show_work_phase_only: boolean; /** @example true */ trigger_smart_home: boolean; }; HttpAccessInfo: { /** * @description Access mode * @example key * @enum {string} */ mode?: 'disabled' | 'enabled' | 'key'; /** * @description Access key was set and is valid * @example true */ key_valid?: boolean; }; AccessToken: { /** * @description Short ID of the access token. Matches the first 8 characters of the token. * @example AAMTBO0f */ short_id?: string; /** * @description Long ("display") ID of the access token. Matches the first 8 characters and last 6 characters of the token. * @example AAMTBO0f…Wn4fID */ display_id?: string; /** * @description User-assigned name of the token * @example My Script Name */ name?: string; /** * @description Unix millisecond timestamp of when the token was created. Note: it's a number in a string. * @example 1785812863582 */ created_at?: string; /** * @description Unix millisecond timestamp of when the token was used to make any request. Note: it's a number in a string. * @example 1785812891337 */ last_used_at?: string; /** * @description Full access token. Can be used in place of the access key in "X-API-Token" header. Only shown once when generated, never again. * @example AAMTBO0fvAxB5ZO8ds8bA1JofGWn4fID */ token?: string; }; AccessTokensInfo: { tokens?: components['schemas']['AccessToken'][]; }; AccessTokensCreateRequest: { /** * @description Arbitrary name to differentiate this token from others * @example My Script Name */ name: string; }; /** @example { * "name": "BUSY bar" * } */ NameInfo: { /** * @description Device name (letters, digits, spaces and common punctuation; no backtick or tilde) * @example BUSY bar */ name: string; }; DisplayBrightnessInfo: { /** * @description Displays brightness (0-100/auto) * @example auto */ value?: string; }; AudioVolumeInfo: { /** * @description Audio volume value (0-100) * @example 50 */ volume?: number; }; SmartHomePairingInfo: { /** * @description Number of smart homes (Matter "fabrics") that this device is paired with ("commissioned into") * @example 1 */ fabric_count?: number; latest_pairing_status?: { /** * @description Latest state of smart home pairing (Matter "commissioning") process. Note: "never_started" only refers to the current power cycle of the device; this status is not recorded across reboots. * @example completed_successfully * @enum {string} */ value?: 'never_started' | 'started' | 'completed_successfully' | 'failed'; /** * @description UTC Unix second timestamp of latest state update. Only present when a status update has occurred. * @example 1769436711 */ timestamp?: number; }; }; /** @description Set of information for pairing with a Matter smart home */ SmartHomePairingPayload: { /** * @description Pairing with ("commissioning into") a Matter smart home using the provided payload is possible before this UTC Unix millisecond timestamp. Note: it's a number in a string. * @example 1769437579000 */ available_until?: string; /** * @description Payload of the QR code for pairing with ("commissioning into") a smart home * @example MT:YNDA0-O913..VV7I000 */ qr_code?: string; /** * @description Manual code for pairing with ("commissioning into") a smart home * @example 1155-360-0377 */ manual_code?: string; }; SmartHomeSwitchState: { /** * @description State of emulated switch. * @example false */ state?: boolean; /** * @description State of emulated switch on startup. Never sent by the server, but can be specified by the client. * @enum {string} */ startup?: 'off' | 'on' | 'toggle' | 'last'; }; /** @example { * "list": [ * { * "type": "file", * "name": "test.png", * "size": 65535 * }, * { * "type": "dir", * "name": "assets" * } * ] * } */ StorageList: { /** @description Array of elements to display */ list: components['schemas']['StorageListElement'][]; }; StorageStatus: { /** @example 123456 */ used_bytes?: number; /** @example 654321 */ free_bytes?: number; /** * @description Total size of the partition * @example 777777 */ total_bytes?: number; }; StorageListElement: { /** * @description Element type * @enum {string} */ type: 'file' | 'dir'; /** @description File or directory name */ name: string; }; StorageFileElement: Omit & { /** @description File size in bytes */ size: number; } & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'file'; }; StorageDirElement: Omit & Record & { /** * @description discriminator enum property added by openapi-typescript * @enum {string} */ type: 'dir'; }; /** * Format: binary * @description Binary data upload */ BinaryUpload: string; FileUpload: { /** * Format: binary * @description File to upload */ file: string; }; /** * Format: base64 * @description Frame for requested display encoded in base64 */ ScreenResponse: string; /** @example { * "api_semver": "0.0.0" * } */ VersionInfo: { /** * @description API SemVer * @example 0.0.0 */ api_semver: string; }; /** @example { * "type": "usb" * } */ NetworkInterfaceInfo: { /** * @description Connection type * @example usb * @enum {string} */ type: 'usb' | 'wifi'; }; Status: { device?: components['schemas']['StatusDevice']; firmware?: components['schemas']['StatusFirmware']; system?: components['schemas']['StatusSystem']; power?: components['schemas']['StatusPower']; }; StatusDevice: { /** * @description Device serial number * @example 203638485431500400123456 */ serial_number: string; /** * @description MAC of USB ethernet device * @example 0c:fa:22:21:2a:31 */ usb_mac: string; /** * @description WIFI MAC * @example 0c:fa:22:21:2a:31 */ wifi_mac?: string; /** * @description BLE MAC * @example 0c:fa:22:21:2a:31 */ ble_mac?: string; /** * @description Is OTP data valid * @example true */ otp_valid: boolean; /** * @description Device model code * @example BB.1 */ otp_model?: string; /** * @description Production timestamp * @example 1767225600 */ otp_timestamp?: number; /** * @description Summary of firmware signature protection derived from the wireless coprocessor (Si917) NWP and M4 signature state. "secure" - both NWP and M4 firmware signature verification active; "insecure" - neither active; "other" - mixed state (exactly one active); "unknown" - coprocessor info not ready yet. * * @example secure * @enum {string} */ firmware_security: 'secure' | 'insecure' | 'other' | 'unknown'; }; StatusFirmware: { /** * @description Firmware version * @example 1.0.0 */ version: string; /** * @description Firmware target code * @example 22 */ target: number; /** * @description Git branch name * @example main */ branch: string; /** * @description Build date * @example 2024-01-01 */ build_date: string; /** * @description Git commit hash (may include -dirty suffix) * @example abc123def456-dirty */ commit_hash: string; /** * @description Intercom handshake version string (forced version, git hash, or "intercom" if check disabled) * @example abc123de */ intercom_version: string; /** * @description Radio firmware version * @example 1711.2.14.5.2.0.7 */ nwp_version?: string; /** * @description Matter version * @example 1.0 */ matter_version?: string; }; StatusSystem: { /** * @description API SemVer * @example 0.0.0 */ api_semver: string; /** * @description System uptime * @example 00d 00h 04m 13s */ uptime: string; /** * @description System boot timestamp * @example 1767225600 */ boot_time: number; /** * @description Is auto-update enabled * @example true */ auto_update_enabled: boolean; }; StatusPower: { /** * @description Power state * @example discharging * @enum {string} */ state: 'discharging' | 'charging' | 'charged'; /** * @description Battery charge percent * @example 99 */ battery_charge: number; /** * @description Battery voltage in mV * @example 4183 */ battery_voltage: number; /** * @description Battery current in mA * @example -180 */ battery_current: number; /** * @description USB voltage in mV * @example 4843 */ usb_voltage: number; }; TimestampInfo: { /** * @description ISO 8601 formatted timestamp with timezone * @example 2025-10-02T14:30:45+04:00 */ timestamp: string; }; TimezoneInfo: { /** * @description Time zone name * @example Bangalore */ name: string; /** * @description Time zone offset from UTC * @example +05:30 */ offset: string; /** * @description Time zone abbreviation * @example IST */ abbr: string; }; TimezoneListResponse: { list?: components['schemas']['TimezoneInfo'][]; }; /** @example { * "install": { * "is_allowed": true, * "event": "none", * "action": "none", * "status": "ok", * "detail": "", * "download": { * "speed_bytes_per_sec": 0, * "received_bytes": 0, * "total_bytes": 0 * } * }, * "check": { * "available_version": "1.2.3", * "event": "stop", * "status": "available" * } * } */ UpdateStatus: { install?: { /** @description Whether update installation is allowed (battery check) */ is_allowed?: boolean; /** * @description Current update event * @enum {string} */ event?: 'session_start' | 'session_stop' | 'action_begin' | 'action_done' | 'detail_change' | 'action_progress' | 'none'; /** * @description Current update action * @enum {string} */ action?: 'download' | 'sha_verification' | 'unpack' | 'prepare' | 'apply' | 'none'; /** * @description Current or last operation status * @enum {string} */ status?: 'ok' | 'battery_low' | 'busy' | 'download_failure' | 'download_abort' | 'sha_mismatch' | 'unpack_staging_dir_failure' | 'unpack_archive_open_failure' | 'unpack_archive_unpack_failure' | 'install_manifest_not_found' | 'install_manifest_invalid' | 'install_session_config_failure' | 'install_pointer_setup_failure' | 'unknown_failure'; /** @description Optional status detail string */ detail?: string; download?: { /** @description Current download speed in bytes per second */ speed_bytes_per_sec?: number; /** @description Bytes received so far */ received_bytes?: number; /** @description Total download size in bytes */ total_bytes?: number; }; }; check?: { /** @description Version of available update (empty if none) */ available_version?: string; /** * @description Current check event * @enum {string} */ event?: 'start' | 'stop' | 'none'; /** * @description Check result status * @enum {string} */ status?: 'available' | 'not_available' | 'failure' | 'none'; }; }; /** @description Autoupdate configuration settings. All fields are optional for POST requests. */ AutoupdateSettings: { /** * @description Whether automatic updates are enabled * @example true */ is_enabled?: boolean; /** * @description Start of autoupdate window in HH:MM format (e.g., "08:00") * @example 00:00 */ interval_start?: string; /** * @description End of autoupdate window in HH:MM format (e.g., "23:59") * @example 08:00 */ interval_end?: string; }; ConnectRequestConfig: { /** @example Your_WIFI_SSID */ ssid?: string; /** @example Your_WIFI_Pass */ password?: string; security?: components['schemas']['WifiSecurityMethod']; ip_config?: { ip_method?: components['schemas']['WifiIpMethod']; /** @example 192.168.50.5 */ address?: string; /** @example 255.255.255.0 */ mask?: string; /** @example 192.168.50.1 */ gateway?: string; }; }; NetworkResponse: { /** @example 1 */ count?: number; networks?: components['schemas']['Network'][]; }; /** * @example WPA3 * @enum {string} */ WifiSecurityMethod: 'Open' | 'WPA' | 'WPA2' | 'WEP' | 'WPA/WPA2' | 'WPA3' | 'WPA2/WPA3' | 'Unsupported'; /** * @example dhcp * @enum {string} */ WifiIpMethod: 'dhcp' | 'static'; /** * @example ipv4 * @enum {string} */ WifiIpType: 'ipv4' | 'ipv6'; Network: { /** @example 42 */ ssid?: string; security?: components['schemas']['WifiSecurityMethod']; /** @example -58 */ rssi?: number; }; /** @description Wi-Fi status. Only `state` is always present. * Fields `ssid`, `bssid`, `channel`, `rssi`, `security`, and `ip_config` are only included when state is "connected". * */ StatusResponse: { /** * @example disconnected * @enum {string} */ state: 'unknown' | 'disconnected' | 'connected' | 'connecting' | 'disconnecting' | 'reconnecting'; /** * @description Only present when connected * @example Your_WIFI_SSID */ ssid?: string; /** * @description Only present when connected * @example EC:5A:00:0B:55:1D */ bssid?: string; /** * @description Only present when connected * @example 3 */ channel?: number; /** * @description Only present when connected * @example -43 */ rssi?: number; /** @description Only present when connected */ security?: components['schemas']['WifiSecurityMethod']; /** @description Only present when connected */ ip_config?: { ip_method?: components['schemas']['WifiIpMethod']; ip_type?: components['schemas']['WifiIpType']; /** @example 192.168.50.5 */ address?: string; }; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } /** Computed by the engine; not set by hand. */ declare type Computed = 'x' | 'y' | 'align'; /** * Detailed WebSocket connection state */ export declare enum ConnectionStatus { DISCONNECTED = "DISCONNECTED", CONNECTING = "CONNECTING", CONNECTED = "CONNECTED", RECONNECTING = "RECONNECTING" } export declare interface ConnectionStatusComponent extends StatusComponent { attempts?: number; } export declare type ContainerBase = Offset & { /** Gap between children along the main axis. */ gap?: number; padding?: Padding; justify?: MainAlign; align?: CrossAlign; /** Fixed size. Defaults to fitting the content. */ width?: number; height?: number; }; declare type ContainerNode = RowNode | ColumnNode | StackNode; /** Props for row/column. */ declare type ContainerProps = ContainerBase; declare interface ConvertedBle { status: BleServiceStatus | null; remoteAddress?: string | null; } declare interface ConvertedCheckState { event?: CheckEvent | null; available?: BSB_Update.UpdateAvailable | null; unavailable?: { reason: CheckError | null; } | null; } declare interface ConvertedMatter { fabricCount?: number | null; state?: (Omit & { status: MatterCommissioningStatus | null; }) | null; } declare interface ConvertedPower { unknown?: BSB_State.UnknownPowerState | null; known?: (Omit & { batteryStatus: BatteryStatus | null; }) | null; } declare interface ConvertedStateUpdate { deviceName?: BSB_State.DeviceName | null; power?: ConvertedPower | null; brightness?: BSB_State.Brightness | null; audioVolume?: BSB_State.AudioVolume | null; wifi?: ConvertedWifi | null; updateState?: ConvertedUpdateState | null; updateCheck?: ConvertedCheckState | null; timezone?: BSB_State.Timezone | null; matter?: ConvertedMatter | null; frame?: BSB_Frame.Frame | null; input?: BSB_Input.InputEvent | null; timer?: BSB_Timer.Timer | null; ble?: ConvertedBle | null; autoUpdateState?: BSB_Update.AutoUpdateState | null; timerProfiles?: BSB_Timer.Profiles | null; } declare interface ConvertedUpdateState { event: UpdateEvent | null; action: UpdateAction | null; status: UpdateStatusValue | null; } declare interface ConvertedWifi { unknown?: BSB_State.WifiStateUnknown | null; disconnected?: BSB_State.WifiStateInactive | null; connected?: (Omit & { status: WifiConnectionStatus | null; security: WifiSecurityMethod_2 | null; }) | null; ipAddresses?: (Omit & { protocol: WifiIpType_2 | null; method: WifiIpMethod_2 | null; })[] | null; } export declare function convertL4toRGBA(data: Uint8Array, width: number, height: number): Uint8ClampedArray; export declare function convertL8toRGBA(data: Uint8Array, width: number, height: number): Uint8ClampedArray; export declare function convertRGB888toRGBA(data: Uint8Array, width: number, height: number): Uint8ClampedArray; export declare type CountdownElement = components['schemas']['CountdownElement']; /** Countdown. Explicit size: the text is rendered by the firmware. */ export declare type CountdownNode = WithSize>>; /** Alignment along the container's cross axis. */ export declare type CrossAlign = 'start' | 'center' | 'end' /** On the text baseline. Behaves as `end` for non-text nodes. */ | 'baseline'; /** * Callbacks for the main thread */ export declare type DataCallback = (data: ProcessedState) => void; /** * Data throughput state */ export declare enum DataStatus { NONE = "NONE", ACTIVE = "ACTIVE", STALE = "STALE" } /** Required in busy-lib's types, but defaulted by the schema. */ declare type Defaulted = 'display' | 'color' | 'opacity' | 'fill' | 'fill_colors' | 'border_width' | 'border_color'; export declare type DeletionParameters = components['schemas']['DeletionParameters']; declare const DEVICE_EVENT_TYPES: readonly ["device.linked", "device.name-updated", "device.unlinked"]; export declare interface DeviceEvent { type: DeviceEventType; device: RemoteDevice; } export declare type DeviceEventCallback = (event: DeviceEvent) => void; export declare type DeviceEventType = (typeof DEVICE_EVENT_TYPES)[number]; /** Fonts available in DisplayDraw. */ export declare type DeviceFont = 'tiny' | 'small' | 'normal' | 'condensed' | 'bold' | 'large' | 'extra_large' | 'global' | 'superscript'; export declare enum Display { FRONT = 0, BACK = 1 } export declare type DisplayBrightnessInfo = components['schemas']['DisplayBrightnessInfo']; export declare interface DisplayBrightnessParams { value: number | 'auto'; } export declare interface DisplayClearParams extends ClearDisplayQuery, DeletionParameters { } export declare interface DisplayDrawParams extends DisplayElements { } export declare type DisplayElement = components['schemas']['DisplayElement']; export declare type DisplayElements = components['schemas']['DisplayElements']; declare class DisplayMethods { /** * Draw on display. Sends drawing data to the display. Supports JSON-defined display elements. * * @param {DisplayDrawParams} params - Parameters for the draw operation. * @param {string} params.application_name - Application ID for organizing assets. * @param {Array} params.elements - Display elements to draw. * @param {number} [params.priority=50] - Draw priority in the range [1, 100]. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful draw command. */ DisplayDraw(this: BusyBar, params: DisplayDrawParams, options?: RequestOptions): Promise; /** * Clear display. Deletes display elements drawn via this API. * * @param {DisplayClearParams} [params] - Optional parameters. * @param {DisplayClearParams['application_name']} [params.application_name] - Fill in this field for a sanity check that you actually own these elements. Omit it to delete them anyway. * @param {DisplayClearParams['element_ids']} [params.element_ids] - Unique identifiers of elements that should be deleted. Omit this field to delete all elements. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful clear command. */ DisplayClear(this: BusyBar, params?: DisplayClearParams, options?: RequestOptions): Promise; /** * Get single frame for requested screen. * * @param {ScreenFrameGetParams} params - Parameters for the frame request. * @param {ScreenFrameGetParams['display']} params.display - Type of the display (Front = 0, Back = 1). * @param {ScreenFrameGetOptions} [options] - Options for the response format and request. * @param {ScreenFrameGetOptions['dataType']} [options.dataType='blob'] - Data type of the response. Use 'binary' to get Uint8Array instead of Blob. * @param {ScreenFrameGetOptions['format']} [options.format] - Pixel format, only applicable when dataType is 'binary'. 'raw' returns device-native format, 'rgba' converts to RGBA. * @param {ScreenFrameGetOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {ScreenFrameGetOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the screen frame as a Blob. * @returns {Promise} A promise that resolves to the screen frame as an ArrayBuffer when dataType is 'arrayBuffer'. */ DisplayScreenFrameGet(this: BusyBar, params: ScreenFrameGetParams, options?: T): Promise>; /** * Get display brightness. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the brightness information. */ DisplayBrightnessGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set display brightness. * * @param {DisplayBrightnessParams} params - Brightness parameters. * @param {DisplayBrightnessParams['value']} params.value - Brightness (0-100 or "auto"). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ DisplayBrightnessSet(this: BusyBar, params: DisplayBrightnessParams, options?: RequestOptions): Promise; } declare type Element_2 = NonNullable[number]; declare type Element_3 = Elements[number]; declare type Element_4 = NonNullable[number]; declare type Elements = NonNullable; declare type Error_2 = components['schemas']['Error']; export { Error_2 as Error } declare type ErrorCallback_2 = (error: StateStreamError) => void; export { ErrorCallback_2 as ErrorCallback } /** Distance from the top of the line to where glyphs sit (`ascent`). */ export declare function fontBaseline(font: DeviceFont): number; export declare type FrameOptions = { /** Screen for every element in the frame. Defaults to `front`. */ display?: 'front' | 'back'; /** Size of the layout area. Defaults to the whole screen. */ width?: number; height?: number; }; /** Builds XPM2 from a palette and a character grid. */ export declare function generateXpm2({ palette, grid }: Xpm2Spec): string; export declare function getDisplayDimensions(display: Display): { width: number; height: number; }; export declare type HttpAccessInfo = components['schemas']['HttpAccessInfo']; export declare interface HttpAccessParams extends HttpAccessQuery { } export declare type HttpAccessQuery = operations['setHttpAccess']['parameters']['query']; export declare type ImageElement = components['schemas']['ImageElement']; /** Image. Sizes are explicit: the device doesn't report them. */ export declare type ImageNode = WithSize>>; export declare interface InputKeyParams extends InputKeyQuery { } export declare type InputKeyQuery = operations['setInputKey']['parameters']['query']; declare class InputMethods { /** * Send input event. Send single key press event. * * @param {InputKeyParams} params - Button press parameters: * @param {InputKeyParams['key']} params.key - Key name. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ InputSend(this: BusyBar, params: InputKeyParams, options?: RequestOptions): Promise; } /** A DisplayDraw leaf without computed fields and with defaults optional. */ declare type Leaf = T extends unknown ? Optional, Defaulted> : never; /** A leaf: what becomes a DisplayDraw element. */ export declare type LeafNode = Offset & (TextNode | ImageNode | AnimationNode | RectangleNode | CountdownNode | XpmBitmapNode); /** Render options for the front LED screen (rounded-pixel grid look). */ export declare interface LedRenderOptions { /** 0–1, size of each cell within its grid slot. */ pixelSize?: number; /** 0–1, corner radius of each pixel. */ radius?: number; /** 0-1, pixels darker than this are rendered transparent. */ darkThreshold?: number; } /** Font line height (ascent − descent). Wider than the visible pixels. */ export declare function lineHeight(font: DeviceFont): number; /** * Builds the list. * * @param props - What the list holds and how it is drawn. * @returns The elements for DisplayDraw, in drawing order. */ export declare function list(props: ListProps): Element_4[]; export declare interface ListProps { /** Prefix for every element id, so several lists can share a screen. */ id: string; /** The entries, in full; only those in view are drawn. */ items: readonly string[]; /** Index into `items` of the selected entry. The list scrolls to hold it in the middle. */ selected: number; /** Where the list starts, from the screen's top-left. */ x: number; y: number; /** How much room the list has, scrollbar included. */ width: number; height: number; /** Font for every entry. */ font: DeviceFont; /** Blank pixels between one entry and the next. */ gap?: number; /** Colours of the entries. */ style: ListStyle; /** Which edge the scrollbar sits on. The entries take the room left over beside it, and start at its far edge. Defaults to the right. */ scrollbar?: 'right' | 'left' | 'none'; /** Colors of the scrollbar. Required unless it is turned off. */ scrollbarStyle?: ScrollbarStyle; /** Clear pixels between the entries and the scrollbar. */ scrollbarGap?: number; /** Width of the scrollbar. Defaults to a single pixel. */ scrollbarWidth?: number; /** Drawn above whatever shares the screen with the list. As `z_index` on the elements. */ z_index?: number; display?: 'front' | 'back'; } export declare interface ListStyle { /** Colour of every entry, in #RRGGBBAA. */ color: string; /** Colour of the selected entry. */ activeColor: string; } /** * Connection for local BUSY Bar devices via direct IP. * Uses ws:// and binary protobuf protocol. */ export declare class LocalStateStream extends BaseStateStream { protected streamMode: StreamMode; constructor(options?: LocalStreamOptions, config?: StreamConfig); /** * Normalizes the address to use ws:// protocol and adds default path if missing. * Adds x-api-token query parameter if token is provided. */ protected normalizeUrl(addr: string): string; } /** * Options for local device connections */ export declare interface LocalStreamOptions extends Omit { HTTPAccessPassword?: string; } export declare interface LogDumpParams extends Partial { } export declare type LogDumpQuery = NonNullable; export declare type LogDumpResponse = operations['dumpLog']['responses'][200]['content']['application/json']; /** Distribution along the container's main axis. */ export declare type MainAlign = 'start' | 'center' | 'end' /** Equal gaps between children, the outermost flush with the edges. */ | 'between'; declare type MatterCommissioningStatus = NonNullable['value']>; /** * Measures the tree bottom-up. Containers without an explicit size fit their content; a row's height is (max above the baseline) + (max below it). */ export declare function measure(node: Node_2): Measured; /** A node with its size computed. The tree is measured bottom-up. */ export declare type Measured = { node: Node_2; /** Size of the visible pixels. */ width: number; height: number; /** Empty rows above the first visible pixel. 0 for non-text. */ inkTop: number; /** Font baseline relative to the top of the visible pixels; null for non-text. */ baseline: number | null; /** Measured children (empty for a leaf). */ children: Measured[]; }; export declare type NameInfo = components['schemas']['NameInfo']; export declare interface NameParams extends NameInfo { } export declare type NetworkInterfaceInfo = components['schemas']['NetworkInterfaceInfo']; declare type Node_2 = LeafNode | ContainerNode; export { Node_2 as Node } /** Manual offset from where the container placed the node. */ declare type Offset = { dx?: number; dy?: number; }; /** Render options for the back OLED screen. */ export declare type OledRenderOptions = Record; declare interface operations { unlinkAccount: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Done successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; }; }; linkAccount: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Data retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccountLink']; }; }; /** @description Bad request */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description PIN request timeout */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getAccountInfo: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Data retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccountInfo']; }; }; }; }; getAccountStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Data retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccountStatus']; }; }; }; }; getAccountBackend: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Data retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccountBackend']; }; }; /** @description Failed to serialize MQTT configuration */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setAccountBackend: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['AccountBackend']; }; }; responses: { /** @description Set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Bad request */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; stageApp: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/octet-stream': string; }; }; responses: { /** @description Application staged successfully. */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AppStageResult']; }; }; /** @description Invalid parameters, invalid package file, or installation preparation failed. */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Application package too large. */ 413: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to save the application package. */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; installApp: { parameters: { query: { /** * @description Installation key * @example 123456789 */ install_key: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Application installed successfully. */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid parameters. */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; removeApp: { parameters: { query: { app_id: components['schemas']['AppId']; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Done successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Missing application id */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description App with given ID was not found */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; listApps: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Done successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AppListResult']; }; }; }; }; getAppSettings: { parameters: { query: { app_id: components['schemas']['AppId']; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Settings document */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AppSettingsDocument']; }; }; /** @description Invalid application identifier */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Unknown application or no settings */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Invalid settings schema or failed to build the document */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Storage error */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setAppSettings: { parameters: { query: { app_id: components['schemas']['AppId']; }; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['AppSettingsDocument']; }; }; responses: { /** @description Settings stored */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid application identifier or document */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Unknown application or no settings */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Invalid settings schema */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Storage error */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; resetAppSettings: { parameters: { query: { app_id: components['schemas']['AppId']; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Settings reset */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid application identifier */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Unknown application or no settings */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Invalid settings schema */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Storage error */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; uploadAssetWithAppId: { parameters: { query: { /** @description Application name for organizing assets */ application_name: components['schemas']['ApplicationName']; /** * @description File path for the uploaded asset within the app assets directory * @example file.png */ file: components['schemas']['AssetsPath']; }; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/octet-stream': string; }; }; responses: { /** @description File uploaded successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid parameters or upload failed */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description File too large */ 413: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to write uploaded file */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; deleteAppAssets: { parameters: { query: { /** @description Application ID whose assets should be deleted */ application_name: components['schemas']['ApplicationName']; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Assets deleted successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid request parameters */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Delete failed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; drawOnDisplay: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['DisplayElements']; }; }; responses: { /** @description Drawing command executed successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid drawing data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Requested priority level is below that of currently active app */ 409: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; clearDisplay: { parameters: { query?: { /** @description Application identifier */ application_name?: components['schemas']['ApplicationName']; }; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { 'application/json': components['schemas']['DeletionParameters']; }; }; responses: { /** @description Display or some elements cleared successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid deletion data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; playAudio: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['PlayAudio']; }; }; responses: { /** @description Audio playback started successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid file path */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Audio file not found or is unplayable */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; stopAudio: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Audio playback stopped successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description No audio is playing */ 410: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Audio system error */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getBusySnapshot: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Got snapshot successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['BusySnapshot']; }; }; /** @description Error getting snapshot */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setBusySnapshot: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['BusySnapshot']; }; }; responses: { /** @description Snapshot successfully set */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Error setting snapshot */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getBusyProfile: { parameters: { query?: never; header?: never; path: { slot: components['schemas']['BusyProfileSlot']; }; cookie?: never; }; requestBody?: never; responses: { /** @description Got profile successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['BusyProfile']; }; }; /** @description Error getting profile */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setBusyProfile: { parameters: { query?: never; header?: never; path: { slot: components['schemas']['BusyProfileSlot']; }; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['BusyProfile']; }; }; responses: { /** @description Profile successfully set */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Error setting profile */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setInputKey: { parameters: { query: { /** * @description Key name * @example ok */ key: 'up' | 'down' | 'ok' | 'back' | 'start' | 'busy' | 'custom' | 'off' | 'apps' | 'settings'; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Input event sent successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid request data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getHttpAccess: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['HttpAccessInfo']; }; }; }; }; setHttpAccess: { parameters: { query: { /** * @description Access mode * @example key */ mode: 'disabled' | 'enabled' | 'key'; /** * @description Access key (4-10 digits length). Required when mode is "key". * @example 12345678 */ key?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid request data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getAccessTokens: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccessTokensInfo']; }; }; /** @description Request forbidden */ 403: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; createAccessToken: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['AccessTokensCreateRequest']; }; }; responses: { /** @description Retrieved information about access tokens */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AccessToken']; }; }; /** @description Invalid request data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Request forbidden */ 403: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; deleteAllAccessTokens: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Deleted all access tokens */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Request forbidden */ 403: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; revokeAccessToken: { parameters: { query?: never; header?: never; path: { short_id: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Deleted corresponding access token */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Request forbidden */ 403: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Specified token not found */ 404: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getDisplayBrightness: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['DisplayBrightnessInfo']; }; }; }; }; setDisplayBrightness: { parameters: { query: { /** * @description Displays brightness (0-100/auto) * @example 50 */ value: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Brightness set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid request data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getAudioVolume: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AudioVolumeInfo']; }; }; }; }; setAudioVolume: { parameters: { query: { /** * @description Audio volume (0-100) * @example 50 */ volume: number; /** * @description Set volume silently (0 - play volume change sound(default), 1 - do not play sound) * @example 1 */ silent?: 0 | 1; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Volume set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid request data */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getSmartHomeCommissioningStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Successfully got smart home commissioning status */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SmartHomePairingInfo']; }; }; }; }; startSmartHomePairing: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Successfully started smart home pairing */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SmartHomePairingPayload']; }; }; /** @description Internal smart home service is broken */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; writeStorageFile: { parameters: { query: { /** * @description Path for the uploaded file * @example /ext/test.png */ path: string; /** * @description Append to the file instead of replacing it (0 - replace (default), 1 - append; the file is created if it does not exist) * @example 1 */ append?: 0 | 1; }; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/octet-stream': string; }; }; responses: { /** @description File uploaded successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid parameters or upload failed */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description File too large */ 413: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to write uploaded file */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; readStorageFile: { parameters: { query: { /** * @description Path to the file * @example /ext/test.png */ path: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description File downloaded successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/octet-stream': string; }; }; /** @description Invalid parameters or file not exists */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; listStorageFiles: { parameters: { query: { /** * @description Path to the file * @example /ext */ path: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Directory contents read successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StorageList']; }; }; /** @description Invalid parameters or directory does not exist */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; removeStorageFile: { parameters: { query: { /** * @description Path of a file to remove * @example /ext/test.png */ path: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description File deleted successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid path or deletion failed */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; createStorageDir: { parameters: { query: { /** * @description Path to a new directory * @example /ext/newdir */ path: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Directory created successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid path or creation failed */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; RenameStorageFile: { parameters: { query: { /** * @description Old location path * @example /ext/old_name.txt */ path: string; /** * @description New location path * @example /ext/new_name.txt */ new_path: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Renamed successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid path or operation failed */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getStorageStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Storage status queried successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StorageStatus']; }; }; /** @description Invalid parameters or storage doesn't exist */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; connectWebSocket: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description WebSocket connection established */ 101: { headers: { [name: string]: unknown; }; content?: never; }; /** @description Exceed max clients count */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getVersion: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Version information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['VersionInfo']; }; }; }; }; getTransport: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['NetworkInterfaceInfo']; }; }; }; }; getStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Status']; }; }; /** @description Failed to retrieve status */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getStatusDevice: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StatusDevice']; }; }; /** @description Failed to retrieve status */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getStatusFirmware: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StatusFirmware']; }; }; /** @description Failed to retrieve status */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getStatusSystem: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StatusSystem']; }; }; /** @description Failed to retrieve status */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getStatusPower: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StatusPower']; }; }; /** @description Failed to retrieve status */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; dumpLog: { parameters: { query?: { /** * @description Destination file name (without extension) * @example log */ filename?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Log dumped successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': { /** @example OK */ result: string; /** * @description Full path to the written log file * @example /ext/log.txt */ path: string; }; }; }; /** @description Invalid filename */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to dump logs */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getTime: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Timestamp retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['TimestampInfo']; }; }; }; }; setTimeTimestamp: { parameters: { query: { /** * @description ISO 8601 timestamp (e.g., 2025-10-02T14:30:45+02:00 for local time or 2025-10-02T14:30:45Z for UTC) * @example 2025-10-02T14:30:45+0100 */ timestamp: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Timestamp set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid timestamp format or value */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getTimeTimezone: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Timezone got successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['TimezoneInfo']; }; }; /** @description Invalid timezone offset */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; setTimeTimezone: { parameters: { query: { /** * @description Timezone name (use /time/tzlist to get available names) * @example Berlin */ timezone: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Timezone set successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid timezone offset */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getTimeTzlist: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Got the list successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['TimezoneListResponse']; }; }; /** @description Error getting time zone list */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; updateFirmware: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/octet-stream': string; }; }; responses: { /** @description Update initiated successfully. The device will reboot. */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid parameters, invalid TAR file, or update preparation failed. */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Upload received on a closed or invalid update context. */ 409: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Update package too large. */ 413: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to save the update package. */ 508: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; checkFirmwareUpdate: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Update check started successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Update check already in progress */ 409: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to start update check */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getFirmwareUpdateStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Status retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['UpdateStatus']; }; }; }; }; getUpdateChangelog: { parameters: { query: { /** * @description Firmware version to get changelog for * @example 1.2.3 */ version: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Changelog retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': { /** @description Changelog text */ changelog?: string; }; }; }; /** @description Version parameter missing, update not available, or version mismatch */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; installFirmwareUpdate: { parameters: { query: { /** * @description Firmware version to install * @example 1.2.3 */ version: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Update installation started successfully in background */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Version parameter missing, update not available, or version mismatch */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error'] & { /** @enum {string} */ error_code?: 'version_missing' | 'not_available' | 'version_mismatch'; }; }; }; /** @description Update already in progress */ 409: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error'] & { /** @enum {string} */ error_code?: 'busy'; }; }; }; /** @description Battery too low or installation failed to start */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error'] & { /** @enum {string} */ error_code?: 'battery_low'; }; }; }; }; }; abortFirmwareDownload: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Abort signal sent successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; }; }; getAutoupdateSettings: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Settings retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['AutoupdateSettings']; }; }; }; }; setAutoupdateSettings: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['AutoupdateSettings']; }; }; responses: { /** @description Settings updated successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid time format (expected HH:MM) */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Failed to apply settings */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; getWifiNetworks: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['NetworkResponse']; }; }; /** @description Scan not possible when connected */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Wi-Fi operation failed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; } /** Makes the listed fields optional. */ declare type Optional = Omit & Partial>>; /** Padding inside a container. A number applies to all sides. */ export declare type Padding = number | { top?: number; right?: number; bottom?: number; left?: number; }; /** * Color of a palette symbol. A string is shorthand for visual `c`; an object gives several, e.g. `{ c: '#FF0000', m: 'white' }`. */ export declare type PaletteEntry = ColorValue | Partial>; /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ declare interface paths { '/account': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Unlink device from account * @description Removes account linking data */ delete: operations['unlinkAccount']; options?: never; head?: never; patch?: never; trace?: never; }; '/account/link': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Link device to account * @description Requests account link PIN. Works only if device is connected to MQTT and is not linked to account */ post: operations['linkAccount']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/account/info': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get linked account info * @description Retrieves linked account data */ get: operations['getAccountInfo']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/account/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get MQTT status info * @description Retrieves MQTT status */ get: operations['getAccountStatus']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/account/backend': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get MQTT configuration * @description Retrieves MQTT backend configuration */ get: operations['getAccountBackend']; /** * Set MQTT configuration * @description Sets MQTT backend configuration */ put: operations['setAccountBackend']; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/apps/stage': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Stage a JavaScript application for installation * @description Uploads an application package (TGZ or TAR file) and initiates the installation process. */ post: operations['stageApp']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/apps/install': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Install a staged JavaScript application * @description Installs a staged JavaScript application using the installation key */ post: operations['installApp']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/apps': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete a JavaScript application * @description Removes an installed JavaScript application, keeping its settings */ delete: operations['removeApp']; options?: never; head?: never; patch?: never; trace?: never; }; '/apps/list': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List installed JavaScript applications * @description Lists installed JavaScript applications */ get: operations['listApps']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/apps/settings': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get application settings * @description Returns the complete settings document; the first request materializes it from the schema defaults. * */ get: operations['getAppSettings']; /** * Set application settings * @description Replaces the settings document: every field must be present and valid, with a version matching the application settings; unknown keys are dropped. * */ put: operations['setAppSettings']; post?: never; /** * Reset application settings * @description Resets every field to its schema default. */ delete: operations['resetAppSettings']; options?: never; head?: never; patch?: never; trace?: never; }; '/assets/upload': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Upload asset file with app ID * @description Upload a file to the application-specific assets directory. If the directory does not yet exist, it will be created automatically. * Additionally, if the file name contains a subdirectory, it will be created as well, and the file will be placed inside of it. * */ post: operations['uploadAssetWithAppId']; /** * Delete app assets * @description Deletes all assets for a specific app ID */ delete: operations['deleteAppAssets']; options?: never; head?: never; patch?: never; trace?: never; }; '/display/draw': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Draw on display * @description Sends drawing data to the display. * Supports JSON-defined display elements. * */ post: operations['drawOnDisplay']; /** * Clear display * @description Deletes display elements drawn via this API. This operation can be selective - see the request body type. */ delete: operations['clearDisplay']; options?: never; head?: never; patch?: never; trace?: never; }; '/audio/play': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Play audio file * @description Plays an audio file from the assets directory. * Supported formats include .snd files. * */ post: operations['playAudio']; /** * Stop audio playback * @description Stops any currently playing audio */ delete: operations['stopAudio']; options?: never; head?: never; patch?: never; trace?: never; }; '/ble/enable': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Enable BLE * @description Enables BLE module and starts advertising */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description BLE enabled */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Unable to start BLE */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/ble/disable': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Disable BLE * @description Stops advertising */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description BLE disabled */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Unable to stop BLE */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/ble/pairing': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Remove pairing * @description Remove pairing with previous device */ delete: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Pairing removed, now device is discoverable */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Failed to remove because BLE is not initialized or pairing was already removed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; options?: never; head?: never; patch?: never; trace?: never; }; '/ble/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get BLE status * @description Returns current BLE status */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['BleStatusResponse']; }; }; /** @description Failed to get BLE status, because of an error */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/busy/snapshot': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get BUSY timer snapshot * @description Gets the current state of the BUSY timer in snapshot form */ get: operations['getBusySnapshot']; /** * Set BUSY timer snapshot * @description Run the timer starting from the given snapshot */ put: operations['setBusySnapshot']; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/busy/profiles/{slot}': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get BUSY timer profile * @description Gets the BUSY timer profile under specified slot */ get: operations['getBusyProfile']; /** * Set BUSY timer profile * @description Sets the BUSY timer profile under specified slot */ put: operations['setBusyProfile']; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/input': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Send input event * @description Send single key press event */ post: operations['setInputKey']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/access': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get HTTP API access over Wi-Fi configuration * @description Get HTTP API access over Wi-Fi configuration */ get: operations['getHttpAccess']; put?: never; /** * Set HTTP API access over Wi-Fi configuration * @description Set HTTP API access over Wi-Fi configuration */ post: operations['setHttpAccess']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/access/tokens': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all access tokens * @description Provides basic information all access tokens (IDs, names and timestamps) */ get: operations['getAccessTokens']; put?: never; /** * Create a new access token * @description Generates a new access token for authorization alongside the access key */ post: operations['createAccessToken']; /** * Revoke all access tokens * @description Removes all access tokens all at once */ delete: operations['deleteAllAccessTokens']; options?: never; head?: never; patch?: never; trace?: never; }; '/access/tokens/{short_id}': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Revoke an access token * @description Removes the access token with the specified short ID */ delete: operations['revokeAccessToken']; options?: never; head?: never; patch?: never; trace?: never; }; '/name': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get current device name * @description Get current device name */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Information retrieved successfully */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['NameInfo']; }; }; }; }; put?: never; /** * Set new device name * @description Set new device name */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['NameInfo']; }; }; responses: { /** @description New name successfully set */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Invalid name parameter, or failed to store new name */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/display/brightness': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get display brightness * @description Get brightness value for displays */ get: operations['getDisplayBrightness']; put?: never; /** * Set display brightness * @description Set brightness for one or both displays * */ post: operations['setDisplayBrightness']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/audio/volume': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get audio volume * @description Get audio volume value */ get: operations['getAudioVolume']; put?: never; /** * Set audio volume * @description Set audio volume value */ post: operations['setAudioVolume']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/smart_home/pairing': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Smart home commissioning status * @description Retrieves the number of commissioned fabrics and the latest smart home pairing status */ get: operations['getSmartHomeCommissioningStatus']; put?: never; /** * Link device to a smart home * @description Starts the commissioning process and returns onboarding data like QR code and manual pairing code to link the device with a smart home system */ post: operations['startSmartHomePairing']; /** * Erase all smart home links * @description Removes all existing smart home pairings (fabrics) and automatically reboots the device to apply the reset */ delete: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Successfully erased all smart home pairing info, device restart is needed */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Internal smart home service is broken */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; options?: never; head?: never; patch?: never; trace?: never; }; '/smart_home/switch': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get state of emulated smart home switch * @description Returns the current state of the virtual switch emulated by the device */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Successfully got state of emulated smart home switch */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SmartHomeSwitchState']; }; }; /** @description Internal smart home service is broken */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; put?: never; /** * Set state of emulated smart home switch * @description Updates the current state and/or startup mode of the emulated smart home switch */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['SmartHomeSwitchState']; }; }; responses: { /** @description Successfully set state of emulated smart home switch */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Internal smart home service is broken */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/write': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Upload file to internal storage * @description Uploads a file to a specified path */ post: operations['writeStorageFile']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/read': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Download file from internal storage * @description Downloads a file from a specified path */ get: operations['readStorageFile']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/list': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List files on internal storage * @description Returns a list of all files and directories located inside the specified storage path */ get: operations['listStorageFiles']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/remove': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Remove a file on internal storage * @description Removes a file with a specified path */ delete: operations['removeStorageFile']; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/mkdir': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Create a directory on internal storage * @description Creates a new directory with a specified path */ post: operations['createStorageDir']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/rename': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Rename/move a file * @description Moves a file to a new location */ post: operations['RenameStorageFile']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/storage/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Show storage usage * @description Retrieves information about storage partition capacity, including total, used, and free space in bytes */ get: operations['getStorageStatus']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status/ws': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Device status streaming WebSocket endpoint * @description WebSocket connection for real-time device status and screen streaming. * Upgrade from HTTP to WebSocket protocol is required. * After connection, client must enable streaming by sending JSON: {"enable": true} * */ get: operations['connectWebSocket']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/screen': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get single frame for requested screen * @description Captures and returns a single static image frame of the specified display (Front or Back) */ get: { parameters: { query: { /** * @description Type of the display Front = 0, Back = 1 * @example 0 */ display: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { 'image/bmp': components['schemas']['ScreenResponse']; }; }; /** @description Wrong display */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/version': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get API version information * @description Retrieves API version */ get: operations['getVersion']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/transport': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get device network connection info * @description Retrieves device transport type (usb/wifi) */ get: operations['getTransport']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get device status * @description Get device status */ get: operations['getStatus']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status/device': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get device info * @description Get device info */ get: operations['getStatusDevice']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status/firmware': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get firmware info * @description Get firmware info */ get: operations['getStatusFirmware']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status/system': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get system status * @description Get system status */ get: operations['getStatusSystem']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/status/power': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get power status * @description Get power status */ get: operations['getStatusPower']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/log_dump': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Dump captured log * @description Snapshot the in-memory log buffer to a file (defaults to /ext/log.txt) */ post: operations['dumpLog']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/time': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get current timestamp with timezone * @description Retrieves the current timestamp from RTC with timezone in ISO 8601 format */ get: operations['getTime']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/time/timestamp': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Set current timestamp * @description Sets the RTC timestamp in ISO 8601 format. Time zone qualifier (e.g. Z of UTC or +hh:mm for local time) is required. * */ post: operations['setTimeTimestamp']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/time/timezone': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get timezone * @description Get current timezone name */ get: operations['getTimeTimezone']; put?: never; /** * Set timezone * @description Sets the timezone name. Use /time/tzlist to get available names list. */ post: operations['setTimeTimezone']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/time/tzlist': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get list of supported time zones * @description Retrieves the list of time zones accepted by /time/timezone */ get: operations['getTimeTzlist']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Update firmware * @description Uploads a firmware update package (TAR file) and initiates the update process. */ post: operations['updateFirmware']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/check': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Start firmware update check * @description Initiates an asynchronous check for available firmware updates. */ post: operations['checkFirmwareUpdate']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get firmware update status * @description Returns current update and check status including progress information. */ get: operations['getFirmwareUpdateStatus']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/changelog': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get update changelog * @description Returns the changelog for a specific firmware version. */ get: operations['getUpdateChangelog']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/install': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Install firmware update * @description Starts asynchronous firmware installation from a remote URL. * The update process (download, SHA verification, unpack, prepare, reboot) runs in the background. * Use /update/status to monitor progress. * */ post: operations['installFirmwareUpdate']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/abort_download': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Abort ongoing firmware download * @description Signals the updater to abort an ongoing download operation. */ post: operations['abortFirmwareDownload']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/update/autoupdate': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get autoupdate settings * @description Returns current autoupdate configuration */ get: operations['getAutoupdateSettings']; put?: never; /** * Set autoupdate settings * @description Updates autoupdate configuration. All fields are optional - only provided fields are updated. */ post: operations['setAutoupdateSettings']; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/wifi/status': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get Wi-Fi connection status * @description Returns the current connection state of the Wi-Fi module, along with network details like SSID, RSSI, and IP address if connected */ get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['StatusResponse']; }; }; /** @description Wi-Fi operation failed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/wifi/connect': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Attempts to connect to Wi-Fi using config */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody: { content: { 'application/json': components['schemas']['ConnectRequestConfig']; }; }; responses: { /** @description Network connection established */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Already connected */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Wi-Fi operation failed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/wifi/disconnect': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Disconnects from Wi-Fi */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Network connection terminated */ 200: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['SuccessResponse']; }; }; /** @description Already disconnected */ 400: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; /** @description Wi-Fi operation failed */ 503: { headers: { [name: string]: unknown; }; content: { 'application/json': components['schemas']['Error']; }; }; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; '/wifi/networks': { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Scan for available Wi-Fi networks * @description Scans to discover nearby available Wi-Fi networks and returns their SSIDs, security styles, and signal strengths */ get: operations['getWifiNetworks']; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } /** * Helper to force TypeScript to expand complex types in tooltips. * It maps over each property and "flattens" the type. */ declare type Prettify = { [K in keyof T]: T[K]; } & {}; /** * Frame with RGBA support after worker processing */ export declare type ProcessedFrame = Prettify & { data?: Uint8Array | Uint8ClampedArray | null; }>; /** * Protobuf State with processed updates. */ export declare type ProcessedSchemaState = Prettify & { updates?: ProcessedUpdate[] | null; }>; /** * Final state structure passed to callers. */ export declare type ProcessedState = Prettify; /** * StateUpdate with mapped enum fields and an optional 'state' key identifying the active module. */ export declare type ProcessedUpdate = Prettify & { state?: StateUpdateKey; frame?: ProcessedFrame | null; }>; export declare type RawDataCallback = (data: Uint8Array | string) => void; declare type RawRemoteState = Prettify<{ bar_id: string; state: RawSchemaState; }>; declare type RawSchemaState = Prettify & { updates?: BSB_State.StateUpdate[] | null; }>; export declare type RectangleElement = components['schemas']['RectangleElement']; /** Rectangle: width/height are already element fields. */ export declare type RectangleNode = Leaf>; /** Makes a font measurable. Each map in maps/ holds one. */ export declare function registerFontMaps(extra: { fonts: Record; }): void; /** * Device info from remote server events */ export declare interface RemoteDevice { id: string; hardware_id: string; name: string | null; } /** * Wrapped structure for Remote mode */ export declare type RemoteState = Prettify<{ bar_id: string; state: ProcessedSchemaState; }>; /** * Connection for remote BUSY Bar devices via Remote. * Uses wss:// and provides subscription management. */ export declare class RemoteStateStream extends BaseStateStream { protected streamMode: StreamMode; private tokenProvider?; protected maxAuthAttempts: number; constructor(options: RemoteStreamOptions, config?: RemoteStreamConfig); start({ deviceEventCallback, ...rest }?: { dataCallback?: DataCallback; rawDataCallback?: RawDataCallback; errorCallback?: ErrorCallback_2; statusCallback?: StatusCallback; deviceEventCallback?: DeviceEventCallback; }): Promise; /** * Subscribes to updates for a specific device GUID. */ subscribe(guid: string): void; /** * Unsubscribes from updates for a specific device GUID. */ unsubscribe(guid: string): void; /** * Standardizes the address to use wss:// or ws:// protocol. */ protected normalizeUrl(addr: string): string; /** * Handles token expiration by invoking the tokenProvider. * Returns the promise for deduplication. */ protected onTokenExpired(): Promise | void; } export declare interface RemoteStreamConfig extends StreamConfig { maxAuthAttempts?: number; } /** * Options for remote connections */ export declare interface RemoteStreamOptions extends StreamOptions { addr: string; tokenProvider?: () => Promise; } /** Lays out the tree and returns the elements for DisplayDraw. */ export declare function render(root: Node_2, options?: FrameOptions): Element_3[]; /** Frame payload, shared across all displays. */ export declare interface RenderParams { canvas: HTMLCanvasElement; data: Uint8Array | Uint8ClampedArray; width: number; height: number; } export declare interface RequestOptions { timeout?: number; signal?: AbortSignal; } declare type RequiredIpConfig = RequireKeys, 'ip_method'>; declare type RequireKeys = Required> & Omit; /** Children in a row, left to right. */ export declare function row(props: ContainerProps, children: Node_2[]): RowNode; /** Children in a row, left to right. */ export declare type RowNode = ContainerBase & { type: 'row'; children: Node_2[]; }; /** * Scales a grid by `factor` on both axes. * * @param cpp symbol length, if the grid uses more than one character */ export declare function scaleGrid(grid: string[], factor: number, cpp?: number): string[]; /** BUSY Bar screen; FRONT and BACK share this size. */ export declare const SCREEN: { readonly width: 72; readonly height: 16; }; export declare type ScreenFrameGetOptions = RequestOptions & ({ dataType: 'binary'; format?: 'raw' | 'rgba'; } | { dataType?: 'blob'; format?: never; }); export declare interface ScreenFrameGetParams extends ScreenQuery { } export declare type ScreenFrameGetResult = T extends { dataType: 'binary'; } ? Uint8Array | undefined : Blob | undefined; export declare type ScreenQuery = paths['/screen']['get']['parameters']['query']; export declare const ScreenRenderer: ScreenRenderer_2; /** * ScreenRenderer - Facade for rendering device screens. * Routes by {@link Display}. Currently the front (LED) screen is supported; * the back (OLED) screen will be added later. */ declare class ScreenRenderer_2 { private front; private backWarned; /** Renders a frame to the front LED screen. */ renderFrame(display: Display.FRONT, params: RenderParams, options?: LedRenderOptions): void; /** Renders a frame to the back OLED screen. */ renderFrame(display: Display.BACK, params: RenderParams, options?: OledRenderOptions): void; } export declare type ScreenResponse = components['schemas']['ScreenResponse']; export declare interface ScrollbarStyle { /** Colour of the full-height track behind the thumb, in #RRGGBBAA. */ trackColor: string; /** Colour of the thumb. */ thumbColor: string; } export declare type SetTimezoneQuery = operations['setTimeTimezone']['parameters']['query']; declare class SettingsMethods { /** * Get HTTP API access over Wi-Fi configuration. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the access configuration. */ SettingsAccessGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set HTTP API access over Wi-Fi configuration. * * @param {HttpAccessParams} params - Access parameters: * @param {HttpAccessParams['mode']} params.mode - Enable/disable access. * @param {HttpAccessParams['key']} [params.key] - Access key (4-10 digits). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SettingsAccessSet(this: BusyBar, params: HttpAccessParams, options?: RequestOptions): Promise; /** * Get current device name. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the device name. */ SettingsNameGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set device name. * * @param {NameParams} params - Name parameters: * @param {NameParams['name']} params.name - New device name (max 64 chars). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SettingsNameSet(this: BusyBar, params: NameParams, options?: RequestOptions): Promise; /** * List all access tokens. * * Provides basic information about all access tokens (IDs, names and timestamps). * The full token value is never returned here - it is only shown once on creation. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the list of access tokens. */ SettingsAccessTokensGet(this: BusyBar, options?: RequestOptions): Promise; /** * Create a new access token. * * The returned `token` field is only present in this response and cannot be retrieved later. * * @param {AccessTokenCreateParams} params - Token parameters: * @param {AccessTokenCreateParams['name']} params.name - Arbitrary name to differentiate this token from others. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the created token. */ SettingsAccessTokenCreate(this: BusyBar, params: AccessTokenCreateParams, options?: RequestOptions): Promise; /** * Revoke all access tokens at once. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SettingsAccessTokensDelete(this: BusyBar, options?: RequestOptions): Promise; /** * Revoke a single access token. * * @param {AccessTokenRevokeParams} params - Token parameters: * @param {AccessTokenRevokeParams['short_id']} params.short_id - Short ID of the token (first 8 characters). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SettingsAccessTokenRevoke(this: BusyBar, params: AccessTokenRevokeParams, options?: RequestOptions): Promise; } declare class SmartHomeMethods { /** * Smart home commissioning status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the pairing info. */ SmartHomePairingGet(this: BusyBar, options?: RequestOptions): Promise; /** * Link device to a smart home. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the pairing payload. */ SmartHomePair(this: BusyBar, options?: RequestOptions): Promise; /** * Erase all smart home links. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SmartHomeErase(this: BusyBar, options?: RequestOptions): Promise; /** * Get state of emulated smart home switch. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the switch state. */ SmartHomeSwitchStateGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set state of emulated smart home switch. * * @param {SmartHomeSwitchStateParams} params - Switch state. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ SmartHomeSwitchStateSet(this: BusyBar, params: SmartHomeSwitchStateParams, options?: RequestOptions): Promise; } export declare type SmartHomePairingInfo = components['schemas']['SmartHomePairingInfo']; export declare type SmartHomePairingPayload = components['schemas']['SmartHomePairingPayload']; export declare type SmartHomeSwitchState = components['schemas']['SmartHomeSwitchState']; export declare interface SmartHomeSwitchStateParams extends SmartHomeSwitchState { } /** Children stacked on top of each other; the last one is on top. */ export declare function stack(props: StackProps, children: Node_2[]): StackNode; /** * Children overlapping in one coordinate space; array order is draw order, so the last child is on top. `justify` is horizontal, `align` vertical. */ export declare type StackNode = StackProps & { type: 'stack'; children: Node_2[]; }; /** Stack props: a container without gap. */ export declare type StackProps = Omit; /** * Custom error class for StateStream with machine-readable codes */ export declare class StateStreamError extends Error { readonly code: StateStreamErrorCode; readonly data?: any | undefined; constructor(code: StateStreamErrorCode, message: string, data?: any | undefined); } /** * Error codes for StateStream */ export declare enum StateStreamErrorCode { CONNECTION_FAILED = "CONNECTION_FAILED", RECONNECT_FAILED = "RECONNECT_FAILED", CONNECTION_LOST = "CONNECTION_LOST", CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT", AUTH_FAILED = "AUTH_FAILED", AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED", DEVICE_ERROR = "DEVICE_ERROR", DECODE_ERROR = "DECODE_ERROR", FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR", STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED", WORKER_INIT_FAILED = "WORKER_INIT_FAILED", UNKNOWN_ERROR = "UNKNOWN_ERROR" } /** * All possible keys in BSB_State.StateUpdate, automatically inferred from the schema. */ export declare type StateUpdateKey = keyof BSB_State.StateUpdate & string; export declare type Status = components['schemas']['Status']; export declare type StatusCallback = (status: StreamStatus) => void; /** * Generic container for status and error, reused across components */ export declare interface StatusComponent { status: E; lastError?: StateStreamError; } export declare type StatusDevice = components['schemas']['StatusDevice']; export declare type StatusFirmware = components['schemas']['StatusFirmware']; export declare type StatusPower = components['schemas']['StatusPower']; export declare type StatusSystem = components['schemas']['StatusSystem']; export declare interface StorageCreateDirectoryParams extends StorageCreateDirQuery { } export declare type StorageCreateDirQuery = operations['createStorageDir']['parameters']['query']; export declare type StorageDirElement = components['schemas']['StorageDirElement']; export declare interface StorageDownloadFileOptions extends RequestOptions { as_array_buffer?: boolean; } export declare interface StorageDownloadFileParams extends StorageReadQuery { } export declare type StorageFileElement = components['schemas']['StorageFileElement']; export declare type StorageList = components['schemas']['StorageList']; export declare type StorageListElement = components['schemas']['StorageListElement']; export declare type StorageListQuery = operations['listStorageFiles']['parameters']['query']; declare class StorageMethods { /** * Upload file to internal storage. Uploads a file to a specified path. * * @param {StorageUploadFileParams} params - Upload parameters: * @param {StorageUploadFileParams['path']} params.path - Destination path. * @param {StorageUploadFileParams['file']} params.file - File content. * @param {StorageUploadFileParams['append']} [params.append] - Append to the file instead of replacing it (0 - replace (default), 1 - append; the file is created if it does not exist). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful upload. */ StorageWrite(this: BusyBar, params: StorageUploadFileParams, options?: RequestOptions): Promise; /** * Download file from internal storage. Downloads a file from a specified path. * * @param {StorageDownloadFileParams} params - Download parameters: * @param {StorageDownloadFileParams['path']} params.path - Path to the file. * @param {StorageDownloadFileOptions} [options] - Optional request options. * @param {StorageDownloadFileOptions['as_array_buffer']} [options.as_array_buffer] - Whether to return ArrayBuffer instead of Blob. * @param {StorageDownloadFileOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {StorageDownloadFileOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the file content (Blob or ArrayBuffer). */ StorageRead(this: BusyBar, params: StorageDownloadFileParams, options?: StorageDownloadFileOptions): Promise; /** * List files on internal storage. * * @param {StorageReadDirectoryParams} params - List parameters: * @param {StorageReadDirectoryParams['path']} params.path - Path to the directory. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to a list of files and directories. */ StorageListGet(this: BusyBar, params: StorageReadDirectoryParams, options?: RequestOptions): Promise; /** * Remove a file on internal storage. Removes a file with a specified path. * * @param {StorageRemoveParams} params - Remove parameters: * @param {StorageRemoveParams['path']} params.path - Path to the file to remove. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful removal. */ StorageRemove(this: BusyBar, params: StorageRemoveParams, options?: RequestOptions): Promise; /** * Create a directory on internal storage. Creates a new directory with a specified path. * * @param {StorageCreateDirectoryParams} params - Directory creation parameters: * @param {StorageCreateDirectoryParams['path']} params.path - Path to the new directory. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful creation. */ StorageMkdir(this: BusyBar, params: StorageCreateDirectoryParams, options?: RequestOptions): Promise; /** * Show storage usage. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the storage status. */ StorageStatusGet(this: BusyBar, options?: RequestOptions): Promise; /** * Rename/move a file. Moves a file to a new location. * * @param {StorageRenameParams} params - Rename parameters: * @param {StorageRenameParams['path']} params.path - Current path of the file or directory. * @param {StorageRenameParams['new_path']} params.new_path - New path for the file or directory. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful rename. */ StorageRename(this: BusyBar, params: StorageRenameParams, options?: RequestOptions): Promise; } export declare interface StorageReadDirectoryParams extends StorageListQuery { } export declare type StorageReadQuery = operations['readStorageFile']['parameters']['query']; export declare type StorageReadResponse = ArrayBuffer | Blob; export declare interface StorageRemoveParams extends StorageRemoveQuery { } export declare type StorageRemoveQuery = operations['removeStorageFile']['parameters']['query']; export declare interface StorageRenameParams extends StorageRenameQuery { } export declare type StorageRenameQuery = operations['RenameStorageFile']['parameters']['query']; export declare type StorageStatus = components['schemas']['StorageStatus']; export declare interface StorageUploadFileParams extends StorageWriteQuery { file: BusyFile; } export declare type StorageWriteQuery = operations['writeStorageFile']['parameters']['query']; /** * Global configuration for the stream behavior */ export declare interface StreamConfig { /** Connection timeout in milliseconds. Default: 5000ms */ timeout?: number; /** Data inactivity timeout in milliseconds. Default: 15000ms */ dataTimeout?: number; maxReconnectAttempts?: number; reconnectDelay?: number; workerName?: string; } /** * High-level lifecycle of the StateStream class instance */ export declare enum StreamLifecycle { IDLE = "IDLE", STARTING = "STARTING", RUNNING = "RUNNING", STOPPED = "STOPPED", FAILED = "FAILED" } /** * Generic container for status and error, reused across components */ declare type StreamMode = 'local' | 'remote'; /** * Base internal options for connections */ declare interface StreamOptions { addr?: string; token?: string; isBinary?: boolean; } /** * The unified StateStream status object */ export declare interface StreamStatus { main: StatusComponent; connection: ConnectionStatusComponent; auth: AuthStatusComponent; data: StatusComponent & { lastActivity?: number; }; worker: StatusComponent; } export declare type SuccessResponse = components['schemas']['SuccessResponse']; declare class SystemMethods { /** * Get API version information. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to an object containing the `api_semver` string. */ SystemVersionGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get full status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current status of the device. */ SystemStatusGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get system status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current system status. */ SystemInfoGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get power status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current power status. */ SystemStatusPowerGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get device status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current device status. */ SystemStatusDeviceGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get firmware status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current firmware status. */ SystemStatusFirmwareGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get device transport information. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} Current transport info (usb/wifi). */ SystemTransportGet(this: BusyBar, options?: RequestOptions): Promise; /** * Dump captured log. Snapshot the in-memory log buffer to a file (defaults to /ext/log.txt). * * @param {LogDumpParams} [params] - Optional parameters. * @param {LogDumpParams['filename']} [params.filename] - Destination file name without extension (defaults to `log`). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the result and the full path to the written log file. */ SystemLogDump(this: BusyBar, params?: LogDumpParams, options?: RequestOptions): Promise; } export declare type TextElement = components['schemas']['TextElement']; /** * Vertical metrics in visible pixel coordinates, taken from the string's own characters. Subtract `top` to put the pixels on a given row. Zeros for an empty string. */ export declare function textInk(text: string, font: DeviceFont): { top: number; height: number; }; /** * Layout box: from the top of the visible pixels to the baseline. Unlike `textInk`, descenders hang outside it. */ export declare function textLayoutBox(text: string, font: DeviceFont): { top: number; height: number; }; /** Text. The engine measures it using the element's own `font`. */ export declare type TextNode = Leaf>; /** String width in pixels. Advances include letter spacing; no kerning. */ export declare function textWidth(text: string, font: DeviceFont): number; declare class TimeMethods { /** * Get current timestamp info. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the timestamp information. */ TimeGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set system timestamp. * * @param {TimeTimestampParams} params - Parameters for setting the timestamp. * @param {TimeTimestampParams['timestamp']} params.timestamp - Unix timestamp to set. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ TimeTimestampSet(this: BusyBar, params: TimeTimestampParams, options?: RequestOptions): Promise; /** * Get current timezone. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the timezone information. */ TimeTimezoneGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set system timezone. * * @param {TimeTimezoneParams} params - Parameters for setting the timezone. * @param {TimeTimezoneParams['timezone']} params.timezone - Timezone string to set (e.g., "Europe/Moscow"). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on success. */ TimeTimezoneSet(this: BusyBar, params: TimeTimezoneParams, options?: RequestOptions): Promise; /** * Get list of supported timezones. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to a list of timezone items. */ TimeTzListGet(this: BusyBar, options?: RequestOptions): Promise; } export declare type TimestampInfo = components['schemas']['TimestampInfo']; export declare interface TimeTimestampParams extends TimestampInfo { } export declare interface TimeTimezoneParams extends SetTimezoneQuery { } export declare type TimezoneInfo = components['schemas']['TimezoneInfo']; export declare type TimezoneItem = NonNullable[number]; export declare type TimezoneList = components['schemas']['TimezoneListResponse']; declare type UpdateAction = NonNullable; export declare interface UpdateAutoUpdateParams extends AutoUpdateSettings { } export declare type UpdateChangelog = operations['getUpdateChangelog']['responses']['200']['content']['application/json']; export declare interface UpdateChangelogParams extends UpdateChangelogQuery { } export declare type UpdateChangelogQuery = operations['getUpdateChangelog']['parameters']['query']; declare type UpdateEvent = NonNullable; export declare interface UpdateFromFileParams { file: BusyFile; } export declare interface UpdateInstallParams extends UpdateInstallQuery { } export declare type UpdateInstallQuery = operations['installFirmwareUpdate']['parameters']['query']; declare class UpdateMethods { /** * Upload firmware update package. * * @param {UpdateFromFileParams} params - Update parameters. * @param {UpdateFromFileParams['file']} params.file - Firmware TAR file to upload. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves when upload is complete. */ UpdateFromFile(this: BusyBar, params: UpdateFromFileParams, options?: RequestOptions): Promise; /** * Start firmware update check. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the update check result. */ UpdateCheck(this: BusyBar, options?: RequestOptions): Promise; /** * Get firmware update status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the update status. */ UpdateStatusGet(this: BusyBar, options?: RequestOptions): Promise; /** * Get firmware update changelog. * * @param {UpdateChangelogParams} params - Parameters for the changelog request. * @param {UpdateChangelogParams['version']} params.version - Version string to get the changelog for. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the changelog content. */ UpdateChangelogGet(this: BusyBar, params: UpdateChangelogParams, options?: RequestOptions): Promise; /** * Start firmware update installation. * * @param {UpdateInstallParams} params - Parameters for the installation. * @param {UpdateInstallParams['version']} params.version - Version string to install. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful initiation. */ UpdateInstall(this: BusyBar, params: UpdateInstallParams, options?: RequestOptions): Promise; /** * Abort firmware update download. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful abort. */ UpdateAbort(this: BusyBar, options?: RequestOptions): Promise; /** * Get current auto-update settings. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the current auto-update settings. */ UpdateAutoUpdateGet(this: BusyBar, options?: RequestOptions): Promise; /** * Set auto-update settings. * * @param {UpdateAutoUpdateParams} params - Parameters for auto-update settings. * @param {UpdateAutoUpdateParams['is_enabled']} params.is_enabled - Whether auto-update is enabled. * @param {UpdateAutoUpdateParams['interval_start']} params.interval_start - Auto-update interval start time (HH:mm). * @param {UpdateAutoUpdateParams['interval_end']} params.interval_end - Auto-update interval end time (HH:mm). * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful update of settings. */ UpdateAutoUpdateSet(this: BusyBar, params: UpdateAutoUpdateParams, options?: RequestOptions): Promise; } export declare type UpdateStatus = components['schemas']['UpdateStatus']; declare type UpdateStatusSchema = NonNullable; declare type UpdateStatusValue = NonNullable; export declare type VersionInfo = components['schemas']['VersionInfo']; /** * `c` color, `g` grayscale, `g4` 4-level grayscale, `m` monochrome, `s` symbolic name. A symbol may carry several; the device picks the one matching its display. */ export declare type Visual = 'c' | 'g' | 'g4' | 'm' | 's'; declare type WifiConnectionStatus = components['schemas']['StatusResponse']['state']; export declare type WifiConnectParams = RequireKeys & { ip_config: RequiredIpConfig; }, 'ssid' | 'security' | 'ip_config'>; export declare type WifiConnectRequestConfig = components['schemas']['ConnectRequestConfig']; export declare type WifiIpMethod = components['schemas']['WifiIpMethod']; declare type WifiIpMethod_2 = components['schemas']['WifiIpMethod']; export declare type WifiIpType = components['schemas']['WifiIpType']; declare type WifiIpType_2 = components['schemas']['WifiIpType']; declare class WifiMethods { /** * Returns current Wi-Fi status. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to the Wi-Fi status. */ WifiStatusGet(this: BusyBar, options?: RequestOptions): Promise; /** * Connects to Wi-Fi network. * * @param {WifiConnectParams} params - Connection parameters: * @param {WifiConnectParams['ssid']} params.ssid - Network SSID. * @param {WifiConnectParams['password']} params.password - Network password. * @param {WifiConnectParams['security']} params.security - Security method. * @param {WifiConnectParams['ip_config']} [params.ip_config] - IP configuration. * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful connection initiation. */ WifiConnect(this: BusyBar, params: WifiConnectParams, options?: RequestOptions): Promise; /** * Disconnects from Wi-Fi. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves on successful disconnection. */ WifiDisconnect(this: BusyBar, options?: RequestOptions): Promise; /** * Scans environment for available Wi-Fi networks. * * @param {RequestOptions} [options] - Optional request options. * @param {RequestOptions['timeout']} [options.timeout] - Request timeout in milliseconds. * @param {RequestOptions['signal']} [options.signal] - AbortSignal to cancel the request. * @returns {Promise} A promise that resolves to a list of available networks. */ WifiNetworksGet(this: BusyBar, options?: RequestOptions): Promise; } export declare type WifiNetwork = components['schemas']['Network']; export declare type WifiNetworkResponse = components['schemas']['NetworkResponse']; export declare type WifiSecurityMethod = components['schemas']['WifiSecurityMethod']; declare type WifiSecurityMethod_2 = components['schemas']['WifiSecurityMethod']; export declare type WifiStatusResponse = components['schemas']['StatusResponse']; /** A size the engine can't measure itself. Distributive to preserve unions. */ declare type WithSize = T extends unknown ? T & { width: number; height: number; } : never; /** * Worker Commands (Sent from main thread to worker) */ declare type WorkerCommand = { type: 'START'; addr: string; token?: string; isBinary: boolean; mode: StreamMode; maxReconnectAttempts: number; maxAuthAttempts: number; reconnectDelay: number; workerName?: string; } | { type: 'STOP'; } | { type: 'UPDATE_TOKEN'; token: string; } | { type: 'SUBSCRIBE'; guid: string; } | { type: 'UNSUBSCRIBE'; guid: string; } | { type: 'GET_WORKER_NAME'; }; /** * Worker Events (Sent from worker to main thread) */ declare type WorkerEvent = { type: 'CONNECTED'; } | { type: 'DISCONNECTED'; } | { type: 'STOPPED'; wasClean: boolean; error?: string; } | { type: 'TOKEN_EXPIRED'; } | { type: 'ERROR'; code: StateStreamErrorCode; message: string; data?: any; } | { type: 'RAW_DATA'; data: Uint8Array | string; } | { type: 'DATA'; data: RawSchemaState | RawRemoteState; } | { type: 'DEVICE_EVENT'; data: DeviceEvent; } | { type: 'WORKER_NAME'; workerName: string | undefined; } | { type: 'STATUS_UPDATE'; connection?: ConnectionStatus; connectionAttempts?: number; auth?: AuthStatus; authAttempts?: number; worker?: WorkerStatus; }; /** * Internal Worker/Infrastructure state */ export declare enum WorkerStatus { OFF = "OFF", INITIALIZING = "INITIALIZING", READY = "READY", ERROR = "ERROR" } export declare interface Xpm2Spec { /** Symbol → color. Same symbols as in grid. */ palette: Record; /** Pixel rows, top to bottom. One character per pixel. */ grid: string[]; } export declare type XpmBitmapElement = components['schemas']['XpmBitmapElement']; /** Image from XPM2 source in `data`. Explicit sizes, as for images. */ declare type XpmBitmapNode = WithSize>>; export { } /** * The font maps the app draws with. * * In a `@busy-app/cli` build the font-maps plugin serves this specifier with only the fonts the app names, since all nine are 48 KB of metrics. Anywhere else Node resolves it through the package's `imports` map to font-maps-stub.js, which is empty, and maps are registered by hand: * * import { registerFontMaps } from '@busy-app/busy-lib' * import { bold } from '@busy-app/busy-lib/fonts' * registerFontMaps(bold) */ declare module '#font-maps' { /** One entry per bundled font, in the shape the JSON maps have. */ export const MAPS: { fonts: Record }[]; }