import type { PulseManifest, PulseUpdatesConfig, UpdateCheckResult, UpdateFetchResult } from './types'; /** * Configure pulse-updates with the given options. * * NOTE: This is now OPTIONAL. Configuration is automatically loaded from: * - iOS: Info.plist (keys: PulseUpdatesURL, PulseUpdatesEnabled, etc.) * - Android: AndroidManifest.xml metadata * * Only call this if you need to override the native configuration. */ export declare function configure(config: PulseUpdatesConfig): void; /** * Whether configure() has been called from JS. * Note: Even if false, native config may be loaded from Info.plist/AndroidManifest.xml */ export declare function isConfigured(): boolean; /** * Whether pulse-updates is enabled. */ export declare function getIsEnabled(): boolean; export declare let isEnabled: boolean; export declare let updateId: string | null; export declare let runtimeVersion: string | null; export declare let channel: string | null; export declare let isEmbeddedLaunch: boolean; export declare let isUsingEmbeddedAssets: boolean; export declare let manifest: PulseManifest | null; export declare let createdAt: Date | null; /** * A dictionary of locally available assets for the current update. * Keys are the asset keys from the manifest, values are local file:// URLs. * This can be used by asset resolvers to use locally downloaded or embedded * assets instead of fetching from remote URLs. */ export declare let localAssets: Record | null; /** * Refresh exported values from native module. * Call this at app startup to get the current state from native. * Configuration is loaded automatically from Info.plist/AndroidManifest.xml. */ export declare function refreshStateAsync(): Promise; /** * Check the server for available updates. */ export declare function checkForUpdateAsync(): Promise; /** * Download the most recent update from the server. */ export declare function fetchUpdateAsync(): Promise; /** * Reload the app using the most recently downloaded update. */ export declare function reloadAsync(): Promise; /** * Mark the current update as successfully launched. */ export declare function markAppReady(): Promise; /** * Report a launch failure to trigger rollback on next start. */ export declare function reportLaunchFailure(reason: string): Promise; /** * Get the build number from the current update's metadata. */ export declare function getUpdateBuild(): string | null; /** * Get display version string (e.g., "1.0.0" or "1.0.0.42"). */ export declare function getDisplayVersion(appVersion: string): string; /** * Get the local file path for an asset by its key. * Returns the local file:// URL if the asset is available locally, * or null if it needs to be fetched from the remote URL. */ export declare function getLocalAssetPath(assetKey: string): string | null; /** * Get all locally available assets. * Returns a copy of the localAssets map. */ export declare function getLocalAssets(): Record; export type UpdateEventType = 'updateAvailable' | 'updateDownloaded' | 'updateError' | 'noUpdateAvailable'; export interface UpdateEvent { type: UpdateEventType; manifest?: PulseManifest; error?: string; } /** * Add a listener for update events. */ export declare function addUpdateListener(listener: (event: UpdateEvent) => void): { remove: () => void; }; //# sourceMappingURL=PulseUpdates.d.ts.map