import { n as ServiceHandle, t as ServiceClientOptions } from "../service-rpc-BugpSF7V.mjs"; import { _ as OtaVersionDecision, a as OtaErrorCode, c as OtaProgress, d as OtaSource, f as OtaSourceType, g as OtaTargetInfo, h as OtaTargetIdentity, i as OtaCheckResult, l as OtaProgressOperation, m as OtaStorageConfig, n as OtaArtifactType, o as OtaHistoryEntry, p as OtaState, r as OtaAssetsState, s as OtaManifestInfo, t as OtaArtifactInfo, u as OtaProgressUnit } from "../ota-types-ihf2x5T3.mjs"; //#region src/ota/ota-client.d.ts /** Registered name (`helper::Ota::get_name()`). */ declare const OTA_SERVICE_NAME = "OTA"; /** RPC function names (`helper::Ota::FunctionId`). */ declare const OTA_FUNCTIONS: { readonly CheckUpdate: "CheckUpdate"; readonly StartUpdate: "StartUpdate"; readonly CancelUpdate: "CancelUpdate"; readonly GetState: "GetState"; readonly GetProgress: "GetProgress"; readonly GetHistory: "GetHistory"; readonly ConfirmPendingBoot: "ConfirmPendingBoot"; readonly GetAssetsState: "GetAssetsState"; readonly GetStorageConfig: "GetStorageConfig"; readonly SetStorageConfig: "SetStorageConfig"; readonly ResetFailure: "ResetFailure"; }; type OtaClientOptions = ServiceClientOptions; declare function isOtaAvailable(options?: OtaClientOptions): boolean; declare function openOta(options?: OtaClientOptions): ServiceHandle; declare function closeOta(handle: ServiceHandle, options?: OtaClientOptions): void; declare function checkUpdate(handle: ServiceHandle, source: OtaSource, options?: OtaClientOptions): OtaCheckResult; declare function startUpdate(handle: ServiceHandle, source: OtaSource, options?: OtaClientOptions): OtaProgress; declare function cancelUpdate(handle: ServiceHandle, options?: OtaClientOptions): void; declare function getOtaState(handle: ServiceHandle, options?: OtaClientOptions): OtaProgress; declare function getOtaProgress(handle: ServiceHandle, options?: OtaClientOptions): OtaProgress; declare function getOtaHistory(handle: ServiceHandle, options?: OtaClientOptions): OtaHistoryEntry[]; declare function confirmPendingBoot(handle: ServiceHandle, options?: OtaClientOptions): void; declare function getAssetsState(handle: ServiceHandle, options?: OtaClientOptions): OtaAssetsState; declare function getStorageConfig(handle: ServiceHandle, options?: OtaClientOptions): OtaStorageConfig; declare function setStorageConfig(handle: ServiceHandle, config: OtaStorageConfig, options?: OtaClientOptions): void; declare function resetOtaFailure(handle: ServiceHandle, options?: OtaClientOptions): void; //#endregion //#region src/ota/ota.d.ts type OtaModuleOptions = OtaClientOptions; /** * Inject a mock RPC host and reset the cached service handle (vitest / Node only). * * @param options - Client options, typically `{ host }` from `@brookesia/service/hosts/ota` */ declare function configure(options: OtaModuleOptions): void; declare const ota: { /** @returns `true` when OTA service is registered (not linked in PC simulator by default) */available(): boolean; /** Release the OTA service binding. */ close(): void; /** * Check for available updates from a manifest source. * * @param source - `{ type: 'LocalManifest' | 'HttpManifest', uri }` * @returns Decision with `update_available`, version info */ checkUpdate(source: OtaSource): OtaCheckResult; /** * Start downloading / applying an update. * * @param source - Same shape as {@link checkUpdate} * @returns Initial progress snapshot */ startUpdate(source: OtaSource): OtaProgress; /** Cancel an in-progress update. */ cancelUpdate(): void; /** @returns Current OTA state and progress */ getState(): OtaProgress; /** @returns Detailed progress (bytes, percent, operation) */ getProgress(): OtaProgress; /** @returns Past OTA history entries */ getHistory(): OtaHistoryEntry[]; /** Confirm boot into a pending update partition after reboot. */ confirmPendingBoot(): void; /** @returns Installed assets / resource bundle version state */ getAssetsState(): OtaAssetsState; /** @returns OTA download / staging storage configuration */ getStorageConfig(): OtaStorageConfig; /** * Update OTA storage paths / quotas. * * @param config - Storage layout for OTA artifacts */ setStorageConfig(config: OtaStorageConfig): void; /** Clear failure state after a failed update attempt. */ resetFailure(): void; }; //#endregion export { OTA_FUNCTIONS, OTA_SERVICE_NAME, type OtaArtifactInfo, type OtaArtifactType, type OtaAssetsState, type OtaCheckResult, type OtaClientOptions, type OtaErrorCode, type ServiceHandle as OtaHandle, type OtaHistoryEntry, type OtaManifestInfo, type OtaModuleOptions, type OtaProgress, type OtaProgressOperation, type OtaProgressUnit, type OtaSource, type OtaSourceType, type OtaState, type OtaStorageConfig, type OtaTargetIdentity, type OtaTargetInfo, type OtaVersionDecision, cancelUpdate, checkUpdate, closeOta, configure, confirmPendingBoot, ota as default, getAssetsState, getOtaHistory, getOtaProgress, getOtaState, getStorageConfig, isOtaAvailable, openOta, resetOtaFailure, setStorageConfig, startUpdate }; //# sourceMappingURL=index.d.mts.map