UNPKG

lavva.exalushome

Version:

Library implementing communication and abstraction layers for ExalusHome system

155 lines (154 loc) 5.38 kB
import { Progress } from "./IUpdatesService"; import { ControllerUpdateNotAvailableInfo } from "./UpdatesService"; /** * Object represents Device update */ export interface IDeviceUpdateInfo { /** * Name of updating device */ get UpdatedResourceName(): string; /** * Guid of device */ get UpdateResourceGuid(): string; /** * Protocol name that device supports (coud be ExtaLife, Portos, etc.) */ get Protocol(): string; /** * Guid of supported protocol */ get ProtocolGuid(): string; /** * Current device firmware version */ get CurrentResourceVersion(): string; /** * New device firmware version */ get NewResourceVersion(): string; /** * Flag confirms that the FW update is safe (there are no retransmitters in the network), if the flag is false, place the device as close to the controller as possible, then start the update. */ get IsUpdateSafe(): boolean; /** * Returns the description of the update, if any. As key we have language code as specified in RFC 4646. As value we have description of update in specified language. * https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-7.0 * https://www.ietf.org/rfc/rfc4646.txt * ex. pl-PL, en-US */ get UpdateDescription(): Map<string, string>; } export declare class DeviceUpdateShortInfo { DeviceGuid: string; CurrentVersion: string; NewVersion: string; } /** * Object represents the update status of the controller components * */ export declare class ControllerUpdatesInfo { /** * Array of updates associated with components that coud be update. */ UpdatesAvailable: IControllerAvailableUpdateInfo[]; /** * Rest of components that do not require updating or components that retruns some errors while checking of updates. */ UpdatesNotAvailable: ControllerUpdateNotAvailableInfo[]; } /** * Object represents controller update */ export interface IControllerAvailableUpdateInfo { /** * Unique id of update - using to install single update by InstallControllerUpdatesAsync<T extends ICustomUpdateActions>(updateIdentifier: string [...]) */ get UpdateIdentifier(): string; /** * name of update resource to inform user (eq. ExtaLife Radio 868Mhz, Portos Radio 433Mhz, Controller Software etc.) * * Default key should always exists in English (en-US) * * As key we have language code as specified in RFC 4646. As value we have description of update in specified language. * https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-7.0 * https://www.ietf.org/rfc/rfc4646.txt * ex. pl-PL, en-US */ get UpdatedResourceName(): Map<string, string>; /** * Type of update resource */ get UpdateType(): ControllerUpdateType | null; /** * Current version of resource */ get CurrentResourceVersion(): string; /** * New version of resource */ get NewResourceVersion(): string; /** * Returns the description of the update, if any. As key we have language code as specified in RFC 4646. As value we have description of update in specified language. * https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-7.0 * https://www.ietf.org/rfc/rfc4646.txt * ex. pl-PL, en-US */ get UpdateDescription(): Map<string, string>; /** * Value indicates that firmware are downloaded (100%), or already is downloading (any other %) */ get DownloadProgress(): Progress; /** * Flag informs that downloading pending */ get UpdateIsDownloading(): boolean; /** * Update creation time, value coud be null if time is not available */ get UpdateCreationTime(): string | null; get IsDownloadOnly(): boolean; } export declare class UpdateHistory { /** * name of update resource to inform user (eq. ExtaLife Radio 868Mhz, Portos Radio 433Mhz, Controller Software etc.) * * Default key should always exists in English (en-US) * * As key we have language code as specified in RFC 4646. As value we have description of update in specified language. * https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-7.0 * https://www.ietf.org/rfc/rfc4646.txt * ex. pl-PL, en-US */ UpdatedResourceName: Map<string, string>; /** * Returns the description of the update, if any. As key we have language code as specified in RFC 4646. As value we have description of update in specified language. * https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-7.0 * https://www.ietf.org/rfc/rfc4646.txt * ex. pl-PL, en-US */ UpdateDescription: Map<string, string>; /** * Update creation time, value coud be null if time is not available */ UpdateCreationTime: string | null; /** * Update version */ Version: string; /** * Update channel */ UpdateChannel: string; } export declare class ControllerVersion { Resource: string; Version: string; Type: ControllerUpdateType | null; } export declare enum ControllerUpdateType { RadioUpdate = 0, SoftwareUpdate = 1 }