/** * Access to the Govee app's *content* APIs — the per-device scene library, the user's * DIY effects, saved snapshots, and the capability list that tells us which modes a * device actually has. * * These sit alongside `govee-api.ts` (account and device endpoints) and reuse the same * bearer token and client id. They are consumed both by the plugin at runtime and by * the custom config UI server, so they are plain functions rather than a class. * * These are the unofficial endpoints the Govee Home app itself calls. They can change * without notice, so every caller must be able to carry on without them. */ export declare const GOVEE_CONTENT_URLS: { /** Per-device scene library, including icon URLs and effect payloads. */ readonly scenes: "https://app2.govee.com/appsku/v2/scences"; /** The account's saved scenes for a device. */ readonly ownScenes: "https://app2.govee.com/appsku/v1/scences"; /** The account's DIY effects, grouped. */ readonly diys: "https://app2.govee.com/bff-app/v1/diy/list"; /** Saved snapshots for a device. */ readonly snapshots: "https://app2.govee.com/bff-app/v1/devices/snapshots"; /** Which modes/functions a device supports. */ readonly functionSupport: "https://app2.govee.com/bff-app/v1/devices/detail/function-support"; }; export interface GoveeDeviceRef { sku: string; device: string; goodsType?: number; versionSoft?: string; versionHard?: string; wifiVersionSoft?: string; wifiVersionHard?: string; pactType?: number; pactCode?: number; } interface RawSpecialEffect { scenceParamId?: number; scenceParam?: string; sceneCode?: number; sceneType?: number; supportSku?: string[]; } interface RawLightEffect { scenceParamId?: number; scenceName?: string; scenceParam?: string; sceneCode?: number; sceneType?: number; specialEffect?: RawSpecialEffect[]; speedInfo?: { supSpeed?: boolean; }; supportDirections?: number[]; } interface RawScene { sceneId?: number; sceneName?: string; analyticName?: string; sceneNameNew?: Record; iconUrls?: string[]; sceneCode?: number; sceneType?: number; lightEffects?: RawLightEffect[]; } interface RawCategory { categoryId?: number; categoryName?: string; scenes?: RawScene[]; } /** * One selectable effect within a scene. Most scenes have a single variant; where a * scene ships several, they are the speed/style alternatives the Govee app offers. */ export interface SceneVariant { /** `scenceParamId` — stable identity for the variant. */ id: number; name: string; /** Comma-separated base64 frames, ready for the `rgbScene` command. */ code: string; supportsSpeed: boolean; supportedDirections: number[]; } export interface SceneEntry { sceneId: number; name: string; category: string; /** Icon shown in the config UI; light and dark variants when Govee provides both. */ iconUrl?: string; iconUrlDark?: string; variants: SceneVariant[]; /** Convenience: the code of the first variant. */ code: string; } export interface SceneCategory { id: number; name: string; scenes: SceneEntry[]; } export interface SceneLibrary { sku: string; device: string; categories: SceneCategory[]; /** Where the data came from, so the UI can say so. */ source: 'cloud' | 'offline'; } export interface DiyEntry { diyId: number; name: string; group?: string; iconUrl?: string; code: string; } export interface SnapshotEntry { snapshotId: number; name: string; iconUrl?: string; } /** Modes the Govee app can show for a device, keyed by its internal mode id. */ export declare const GOVEE_MODES: Record; export interface FunctionSupport { /** Mode names the device supports, e.g. `['scene', 'music', 'diy']`. */ modes: string[]; /** Raw ids, for diagnostics and forward compatibility. */ modeIds: number[]; } /** * Convert a raw scene-library response into the normalised, already-encoded form the * config UI and the device handler both consume. */ export declare function normaliseSceneLibrary(categories: RawCategory[], sku: string, device: string, source?: SceneLibrary['source']): SceneLibrary; /** * Fetch the scene library Govee offers for one device. * * Throws if the request fails — callers decide whether to fall back to the bundled * offline catalogue. */ export declare function goveeGetSceneLibrary(token: string, clientId: string, ref: GoveeDeviceRef): Promise; /** * Fetch the account's DIY effects that apply to a device. */ export declare function goveeGetDiyEffects(token: string, clientId: string, ref: GoveeDeviceRef): Promise; /** * Fetch a device's saved snapshots. Snapshots are applied through the Govee cloud * rather than by a byte payload, so only their identity is returned. */ export declare function goveeGetSnapshots(token: string, clientId: string, ref: GoveeDeviceRef): Promise; /** * Ask Govee which modes a device supports, so the config UI can offer only those. */ export declare function goveeGetFunctionSupport(token: string, clientId: string, ref: GoveeDeviceRef): Promise; export {};