import { checkForUpdate } from "./checkForUpdate"; import { wrap } from "./wrap"; export type { CodeUpdaterConfig } from "./wrap"; export type { CodeUpdaterEvent } from "./native"; export * from "./store"; export declare const CodeUpdater: { wrap: typeof wrap; reload: () => void; getAppVersion: () => Promise; getBundleId: () => string; addListener: (eventName: T, listener: (event: import("./native").CodeUpdaterEvent[T]) => void) => () => void; checkForUpdate: typeof checkForUpdate; /** * Manually checks and applies updates for the application. * * @param {RunUpdateProcessConfig} config - Update process configuration * @param {string} config.source - Update server URL * @param {Record} [config.requestHeaders] - Request headers * @param {boolean} [config.reloadOnForceUpdate=false] - Whether to automatically reload on force update * * @example * ```ts * // Auto reload on force update * const result = await CodeUpdater.runUpdateProcess({ * source: "", * requestHeaders: { * // Add necessary headers * }, * reloadOnForceUpdate: true * }); * * // Manually handle reload on force update * const result = await CodeUpdater.runUpdateProcess({ * source: "", * reloadOnForceUpdate: false * }); * * if(result.status !== "UP_TO_DATE" && result.shouldForceUpdate) { * CodeUpdater.reload(); * } * ``` * * @returns {Promise} The result of the update process */ runUpdateProcess: ({ reloadOnForceUpdate, ...checkForUpdateConfig }: import("./runUpdateProcess").RunUpdateProcessConfig) => Promise; updateBundle: (bundleId: string, zipUrl: string | null) => Promise; };