export type DownloadProgressCallback = (progress: DownloadProgress) => void; export type SyncStatusChangedCallback = (status: CodePush.SyncStatus) => void; export type HandleBinaryVersionMismatchCallback = (update: RemotePackage) => void; export interface UpdateCheckRequest { /** The native version, not in package.json. */ app_version: string; client_unique_id?: string; is_companion?: boolean; label?: string; package_hash?: string; } /** * Alias for a string representing a released CodePush update version. */ export type ReleaseVersion = string; /** * The interface representing the release information that the `releaseHistoryFetcher` function must return. */ export type ReleaseHistoryInterface = Record; /** * The interface that represents a single deployment history entry, which the `releaseHistoryFetcher` function should return. */ export interface ReleaseInfo { enabled: boolean; mandatory: boolean; downloadUrl: string; /** * The URL of a binary patch archive built against the JS bundle embedded in the app binary. * It is only present when the release was published together with such a patch, and a client * that cannot use it downloads the full update from `downloadUrl` instead. */ binaryPatchDownloadUrl?: string; /** * URLs of patch archives that also carry an asset diff, keyed by the packageHash of the * release each archive was diffed against. Give a key to every release worth diffing * against: a client whose installed update matches one downloads that archive first, and * every other client ignores this field. Only present when the release was published with * asset diff archives. `UpdateArchiveResult` describes what a client does with one it * cannot use. */ diffPackages?: Record; packageHash: string; /** * The minimum number of seconds the app has to have been in the background before this * release is applied, with the same meaning as `SyncOptions.minimumBackgroundDuration`. * When it is present it takes precedence over the value passed to `sync`, so a single * release can be applied sooner or later than the app asks for by default. */ minimumBackgroundDuration?: number; rollout?: number; } // from code-push SDK export interface UpdateCheckResponse { download_url?: string; /** * The URL of a binary patch archive built against the JS bundle embedded in the app binary. * It is only present when the release was published together with such a patch, and a client * that cannot use it downloads the full update from `download_url` instead. */ binary_patch_download_url?: string; /** * The URL of the asset diff archive built against the update the client is running. * It is only present when the release publishes a diff against exactly that update, and * it accompanies `binary_patch_download_url` rather than replacing it: a response can * carry both. `UpdateArchiveResult` describes the order the client tries them in. */ asset_diff_download_url?: string; description?: string; is_available: boolean; is_disabled?: boolean; target_binary_range: string; /*generated*/ label?: string; /*generated*/ package_hash?: string; package_size?: number; should_run_binary_version?: boolean; update_app_version?: boolean; is_mandatory?: boolean; /** * The minimum number of seconds the app has to have been in the background before this * update is applied. It is only present when the release asked for one of its own. */ minimum_background_duration?: number; } /** * Why an update that was published with a binary patch had to be downloaded in full * instead. These are the words every platform's applier reports, so a rollout can be * judged by them whichever platform it is running on. */ export type ArchiveFallbackReason = /** * The bundle the patch applies to could not be opened or read: the one inside the app * binary for a patch archive, the installed update's for an asset diff. */ | "base_bundle_unavailable" /** The bundle the patch applies to is not the one the patch was computed against. */ | "base_hash_mismatch" /** The manifest is missing, malformed, points outside the archive, or asks for too much. */ | "invalid_manifest" /** The patch was produced by a format or a codec this client cannot apply. */ | "unsupported_format" /** The applier refused the patch, or the restored bundle could not be written. */ | "patch_apply_failed" /** The restored bundle is not the one the manifest promised. */ | "target_verification_failed" /** The asset diff could not be merged with the installed update it was built against. */ | "asset_merge_failed" /** The update restored from the patch did not pass the checks that follow the restore. */ | "package_verification_failed"; /** * The archives on the patch path; the full archive is not one of them. There are two: the * patch archive built against the app binary's bundle, and an asset diff archive that * additionally leaves out the assets an installed base update already holds. */ export type UpdateArchive = "binary-patch" | "asset-diff"; /** * One archive tried on the patch path: which archive it was, how long the try took, and, * when it was given up on, why. */ export interface UpdateArchiveAttempt { archive: UpdateArchive; /** * Why this archive was given up on. Absent for the attempt the downloaded update came * from, and also when the attempt ended in an error none of the appliers has a word * for. */ fallbackReason?: ArchiveFallbackReason; /** * How long this attempt ran, in milliseconds, whichever way it ended: from the archive * starting to download to the try being finished with. */ durationMs: number; /** * How long the applier took to rebuild the bundle from this archive's patch, in * milliseconds. Absent when the attempt ended before the bundle was restored. */ applyDurationMs?: number; } /** * Which of an update's patch archives the download came from, and what the patch path did * on the way there. It is reported once the update has been downloaded and before the * `LocalPackage` it resolved to is installed, so nothing here speaks to how installing goes. */ export interface UpdateArchiveResult { /** * Whether one of the update's patch archives produced it, or the full archive had to be * downloaded instead. A fallback is not an error: the update arrives either way. */ status: "applied" | "fallback"; /** * The archive of the last attempt: the one the downloaded update came from when a patch * archive produced it, and the last one given up on when none did. */ archive: UpdateArchive; /** * Why the full archive had to be downloaded: the reason the last attempt ended in. * Absent when a patch archive produced the update, and also when the attempt ended in * an error none of the appliers has a word for. */ fallbackReason?: ArchiveFallbackReason; /** * How long the whole patch path took, in milliseconds: from the first archive starting * to download to the last attempt being finished with. The full download that follows a * fallback is not part of it, because that is not time the patch path spent. */ totalDurationMs: number; /** * Every archive that was tried, in the order it was tried. The full archive is never * among them, because it is downloaded only once the patch path has given up. * * Most downloads leave a single entry. A second one appears when the asset diff failed * and the patch archive was tried in its place: the diff patches the installed update's * bundle and the patch archive the app binary's, so however the diff failed, the patch * archive may still apply. */ attempts: UpdateArchiveAttempt[]; } export interface CodePushOptions extends SyncOptions { /** * The `ignoreFailedUpdates` option is only available as an option for `CodePush.sync()`. */ ignoreFailedUpdates?: never; /** * Specifies when you would like to synchronize updates with the CodePush server. * Defaults to codePush.CheckFrequency.ON_APP_START. */ checkFrequency: CodePush.CheckFrequency; /** * Specifies a function to get the release history. * * If you want to use `updateChecker`, pass no-op function like below. * But it is deprecated and will be removed in the next major version. * * ```ts * const codePushOptions: { * releaseHistoryFetcher: async () => ({}), // This will not be called * } * ``` */ releaseHistoryFetcher: (updateRequest: UpdateCheckRequest) => Promise; /** * Specify a function to perform the update check. * It can be used for self-hosting. * Defaults to AppCenter update_check REST API request. * * @deprecated It will be removed in the next major version. Please migrate to `releaseHistoryFetcher`. */ updateChecker?: (updateRequest: UpdateCheckRequest) => Promise<{ update_info: UpdateCheckResponse }>; /** * Callback function that is called when the update installation succeeds. */ onUpdateSuccess?: (label: string) => void | Promise; /** * Callback function that is called when the update rolled back. */ onUpdateRollback?: (label: string) => void | Promise; /** * Callback function that is called when download starts. */ onDownloadStart?: (label: string) => void | Promise; /** * Callback function that is called when download finished successfully. */ onDownloadSuccess?: (label: string, details: DownloadSuccessDetails) => void | Promise; /** * Callback function that is called when sync process failed. */ onSyncError?: (label: string, error: Error) => void | Promise; /** * Callback function that is called when rollout is skipped. */ onRolloutSkipped?: (label: string, error: Error) => void | Promise; } export interface DownloadSuccessDetails { /** Running OTA label before downloading, or the native app version for the embedded bundle. */ baseVersion: string; /** Final downloaded file size in bytes, excluding earlier fallback attempts. * Null when running native code that predates download size reporting. */ downloadBytes: number | null; } export interface DownloadProgress { /** * The total number of bytes expected to be received for this download. An update * published with a binary patch can be downloaded twice: when applying the patch * fails, the full archive is downloaded as a second stream with its own total. */ totalBytes: number; /** * The number of bytes downloaded thus far. */ receivedBytes: number; } export interface LocalPackage extends Package { /** * Size in bytes of the final file `RemotePackage.download` used, excluding earlier fallback attempts. * Only set on the package that call resolves with: it is not persisted in update metadata, so * `getCurrentPackage` and `getUpdateMetadata` never return it. Undefined on native code that * predates download size reporting. */ downloadBytes?: number; /** * Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app. * * @param installMode Indicates when you would like the update changes to take affect for the end-user. * @param minimumBackgroundDuration For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified. */ install(installMode: CodePush.InstallMode, minimumBackgroundDuration?: number): Promise; } export interface Package { /** * The app binary version that this update is dependent on. This is the value that was * specified via the appStoreVersion parameter when calling the CLI's release command. */ appVersion: string; /** * The deployment key that was used to originally download this update. */ deploymentKey: string; /** * The description of the update. This is the same value that you specified in the CLI when you released the update. */ description: string; /** * Indicates whether this update has been previously installed but was rolled back. */ failedInstall: boolean; /** * Indicates whether this is the first time the update has been run after being installed. */ isFirstRun: boolean; /** * Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released. */ isMandatory: boolean; /** * Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart * needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user. */ isPending: boolean; /** * The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its deployment. */ label: string; /** * The SHA hash value of the update. */ packageHash: string; /** * The size of the code contained within the update, in bytes. */ packageSize: number; } export interface RemotePackage extends Package { /** * Downloads the available update from the CodePush service. * * @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded. * @param updateArchiveResultCallback An optional callback for observing which archive an update published with a binary patch was downloaded from. It is called once when the download had such an archive to try, and only after that download has succeeded; what it says nothing about is whether installing the resolved `LocalPackage` succeeds. An archive that could not be applied is reported here and the update is downloaded in full. */ download( downloadProgressCallback?: DownloadProgressCallback, updateArchiveResultCallback?: (result: UpdateArchiveResult) => void | Promise, ): Promise; /** * The URL at which the package is available for download. */ downloadUrl: string; /** * The URL at which a binary patch archive of this package is available for download. * The patch is built against the JS bundle embedded in the app binary, so it is only * present when the release was published together with one. When it is absent, the * package is downloaded in full from `downloadUrl`. */ binaryPatchDownloadUrl?: string; /** * The URL of the asset diff archive built against the update this app is running. * It is only present when the release publishes a diff against exactly that update, and * it accompanies `binaryPatchDownloadUrl` rather than replacing it, so a package can hold * both. `download` chooses between them and reports the choice as an * `UpdateArchiveResult`. */ assetDiffDownloadUrl?: string; /** * The minimum number of seconds the app has to have been in the background before this * update is applied. It is only present when the release history entry set it, and it * then takes precedence over the `minimumBackgroundDuration` passed to `sync`. */ minimumBackgroundDuration?: number; } export interface SyncOptions { /** * Specifies the deployment key you want to query for an update against. By default, this value is derived from the Info.plist * file (iOS) and MainActivity.java file (Android), but this option allows you to override it from the script-side if you need to * dynamically use a different deployment for a specific call to sync. */ deploymentKey?: string; /** * Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory). * Defaults to codePush.InstallMode.ON_NEXT_RESTART. */ installMode?: CodePush.InstallMode; /** * Specifies when you would like to install updates which are marked as mandatory. * Defaults to codePush.InstallMode.IMMEDIATE. */ mandatoryInstallMode?: CodePush.InstallMode; /** * Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property * only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful * for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying * the update immediately after a resume or unless the app suspension is long enough to not matter, regardless how long it was in the background. * A `minimumBackgroundDuration` set on the release history entry of the update being installed takes precedence over this option. */ minimumBackgroundDuration?: number; /** * An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available, * and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to `true` * will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as * overriding one or more of the default strings. */ updateDialog?: UpdateDialog | true; /** * The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions * specified in the options). It is an "options" object used to determine whether a rollback retry should occur, and if so, what settings to use * for the rollback retry. This defaults to null, which has the effect of disabling the retry mechanism. Passing an object to this parameter enables * the rollback retry: an empty object retries with the default settings, and each value the object specifies overrides the default for that * setting. */ rollbackRetryOptions?: RollbackRetryOptions; /** * An optional callback for observing which archive an update published with a binary * patch was downloaded from: whether it came from one of its patch archives, why each * archive that was given up on was, and how long the patch work took. It is called once * per download that had such an archive to try, after that download has succeeded and * before the update is installed, with the label of the release it carries. * * Purely for observation. The library neither stores the result nor sends it anywhere - * an app that wants it in its telemetry sends it itself - and nothing about the update * depends on the callback: registering none changes nothing, and one that throws is * logged and does not fail the download it is reporting on. */ onUpdateArchiveResult?: (label: string, result: UpdateArchiveResult) => void | Promise; /** * Specifies whether to ignore the update if the installation fails. * If set to false, the update will be retried when the sync method is called, even if the previous installation attempt failed. * However, depending on the deployment strategy, if an update that cannot be successfully installed is deployed, this option could result in an infinite update retry loop. * Defaults to true. */ ignoreFailedUpdates?: boolean; } export interface UpdateDialog { /** * Indicates whether you would like to append the description of an available release to the * notification message which is displayed to the end user. Defaults to false. */ appendReleaseDescription?: boolean; /** * Indicates the string you would like to prefix the release description with, if any, when * displaying the update notification to the end user. Defaults to " Description: " */ descriptionPrefix?: string; /** * The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue". */ mandatoryContinueButtonLabel?: string; /** * The text used as the body of an update notification, when the update is specified as mandatory. * Defaults to "An update is available that must be installed.". */ mandatoryUpdateMessage?: string; /** * The text to use for the button the end user can press in order to ignore an optional update that is available. Defaults to "Ignore". */ optionalIgnoreButtonLabel?: string; /** * The text to use for the button the end user can press in order to install an optional update. Defaults to "Install". */ optionalInstallButtonLabel?: string; /** * The text used as the body of an update notification, when the update is optional. Defaults to "An update is available. Would you like to install it?". */ optionalUpdateMessage?: string; /** * The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available". */ title?: string; } export interface RollbackRetryOptions { /** * Specifies the minimum time in hours that the app will wait after the latest rollback * before attempting to reinstall same rolled-back package. Defaults to `24`. */ delayInHours?: number; /** * Specifies the maximum number of retry attempts that the app can make before it stops trying. * Cannot be less than `1`. Defaults to `1`. */ maxRetryAttempts?: number; } export interface StatusReport { /** * Whether the deployment succeeded or failed. */ status: CodePush.DeploymentStatus; /** * The version of the app that was deployed (for a native app upgrade). */ appVersion?: string; /** * Details of the package that was deployed (or attempted to). */ package?: Package; /** * Deployment key used when deploying the previous package. */ previousDeploymentKey?: string; /** * The label (v#) of the package that was upgraded from. */ previousLabelOrAppVersion?: string; } /** * Decorates a React Component configuring it to sync for updates with the CodePush server. * * @param options Options used to configure the end-user sync and update experience (e.g. when to check for updates?, show an prompt?, install the update immediately?). */ declare function CodePush(options?: CodePushOptions): (x: any) => any; declare namespace CodePush { /** * Represents the default settings that will be used by the sync method if * an update dialog is configured to be displayed. */ var DEFAULT_UPDATE_DIALOG: UpdateDialog; /** * Asks the CodePush service whether the configured app deployment has an update available. * * @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch */ function checkForUpdate(handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback): Promise; /** * Retrieves the metadata for an installed update (e.g. description, mandatory). * * @param updateState The state of the update you want to retrieve the metadata for. Defaults to UpdateState.RUNNING. */ function getUpdateMetadata(updateState?: UpdateState): Promise; /** * Notifies the CodePush runtime that an installed update is considered successful. */ function notifyAppReady(): Promise; /** * Allow CodePush to restart the app. */ function allowRestart(): void; /** * Forbid CodePush to restart the app. */ function disallowRestart(): void; /** * Clear all downloaded CodePush updates. * This is useful when switching to a different deployment which may have an older release than the current package. * Note: we don’t recommend to use this method in scenarios other than that (CodePush will call * this method automatically when needed in other cases) as it could lead to unpredictable behavior. */ function clearUpdates(): void; /** * Immediately restarts the app. * * @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update. */ function restartApp(onlyIfUpdateIsPending?: boolean): void; /** * Allows checking for an update, downloading it and installing it, all with a single call. * * @param options Options used to configure the end-user update experience (e.g. show an prompt?, install the update immediately?). * @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise. * @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded. * @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch */ function sync(options?: SyncOptions, syncStatusChangedCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback): Promise; /** * Indicates when you would like an installed update to actually be applied. */ enum InstallMode { /** * Indicates that you want to install the update and restart the app immediately. */ IMMEDIATE, /** * Indicates that you want to install the update, but not forcibly restart the app. */ ON_NEXT_RESTART, /** * Indicates that you want to install the update, but don't want to restart the app until the next time * the end user resumes it from the background. This way, you don't disrupt their current session, * but you can get the update in front of them sooner then having to wait for the next natural restart. * This value is appropriate for silent installs that can be applied on resume in a non-invasive way. */ ON_NEXT_RESUME, /** * Indicates that you want to install the update when the app is in the background, * but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default), * so that user context isn't lost unless the app suspension is long enough to not matter. */ ON_NEXT_SUSPEND } /** * Indicates the current status of a sync operation. */ enum SyncStatus { /** * The app is up-to-date with the CodePush server. */ UP_TO_DATE, /** * An available update has been installed and will be run either immediately after the * syncStatusChangedCallback function returns or the next time the app resumes/restarts, * depending on the InstallMode specified in SyncOptions */ UPDATE_INSTALLED, /** * The app had an optional update which the end user chose to ignore. * (This is only applicable when the updateDialog is used) */ UPDATE_IGNORED, /** * The sync operation encountered an unknown error. */ UNKNOWN_ERROR, /** * There is an ongoing sync operation running which prevents the current call from being executed. */ SYNC_IN_PROGRESS, /** * The CodePush server is being queried for an update. */ CHECKING_FOR_UPDATE, /** * An update is available, and a confirmation dialog was shown * to the end user. (This is only applicable when the updateDialog is used) */ AWAITING_USER_ACTION, /** * An available update is being downloaded from the CodePush server. */ DOWNLOADING_PACKAGE, /** * An available update was downloaded and is about to be installed. */ INSTALLING_UPDATE } /** * Indicates the state that an update is currently in. */ enum UpdateState { /** * Indicates that an update represents the * version of the app that is currently running. */ RUNNING, /** * Indicates that an update has been installed, but the * app hasn't been restarted yet in order to apply it. */ PENDING, /** * Indicates that an update represents the latest available * release, and can be either currently running or pending. */ LATEST } /** * Indicates the status of a deployment (after installing and restarting). */ enum DeploymentStatus { /** * The deployment failed (and was rolled back). */ FAILED, /** * The deployment succeeded. */ SUCCEEDED } /** * Indicates when you would like to check for (and install) updates from the CodePush server. */ enum CheckFrequency { /** * When the app is fully initialized (or more specifically, when the root component is mounted). */ ON_APP_START, /** * When the app re-enters the foreground. */ ON_APP_RESUME, /** * Don't automatically check for updates, but only do it when codePush.sync() is manually called inside app code. */ MANUAL } } export default CodePush; /** * Identifies the archive passed to `bundleUploader` during a release. * * `targetBinaryVersion` is the value of the release command's `--binary-version` option. * A full bundle's `packageHash` identifies its contents across target binary versions, while * binary patch and asset diff archives need the target binary version to distinguish their contents. * Asset diff archives also identify the released package they were built against. */ export type BundleUploadArtifact = { targetBinaryVersion: string; packageHash: string; } & ( | { type: 'full-bundle' } | { type: 'binary-patch' } | { type: 'asset-diff'; basePackageHash: string } ); /** Identifies the previously released full archive passed to `bundleDownloader`. */ export interface BundleDownloadInfo { downloadUrl: string; targetBinaryVersion: string; releaseVersion: ReleaseVersion; packageHash: string; } /** * Interface for the config file required for `npx code-push` CLI operation. * * Please refer to the example code for implementation guidance. */ export interface CliConfigInterface { /** * Interface that must be implemented to upload CodePush bundle files to an arbitrary infrastructure. * * Used in the `release` command, and must return a URL that allows downloading the file after the upload is completed. * The URL is recorded in the ReleaseHistory, and the CodePush runtime library downloads the bundle file from this address. * * @param source The relative path of the generated bundle file. (e.g. build/bundleOutput/1087bc338fc45a961c...) * @param platform The target platform of the bundle file. This is the string passed when executing the CLI command. ('ios'/'android') * @param artifact Information that identifies the full bundle, binary patch, or asset diff archive. The release command always supplies it; it remains optional so existing callers and three-parameter implementations stay compatible. * @return {Promise<{downloadUrl: string}>} An object containing the `downloadUrl` property, which is the URL from which the uploaded bundle file can be downloaded. This URL will be recorded in the release history. */ bundleUploader: ( source: string, platform: "ios" | "android", identifier?: string, artifact?: BundleUploadArtifact, ) => Promise<{downloadUrl: string}>; /** * Interface that must be implemented to retrieve ReleaseHistory information. * * Use `fetch`, `axios`, or similar methods to fetch the data and return it. * * @param targetBinaryVersion The target binary app version for which ReleaseHistory information is retrieved. This string is passed when executing the CLI command. (e.g., '1.0.0') * @param platform The target platform for which the information is retrieved. This string is passed when executing the CLI command. ('ios'/'android') * @param identifier An additional identifier string. This string is passed when executing the CLI command. */ getReleaseHistory: ( targetBinaryVersion: string, platform: "ios" | "android", identifier?: string, ) => Promise; /** * Interface that must be implemented to create or update ReleaseHistory information. * * Used in the `create-history`, `release`, and `update-history` commands. * The created or modified object and the JSON file path containing the result of the command execution are provided. * Implement this function to upload the file or call a REST API to update the release history. * * @param targetBinaryVersion The target binary app version for the ReleaseHistory. This string is passed when executing the CLI command. (e.g., '1.0.0') * @param jsonFilePath The absolute path to a JSON file following the `ReleaseHistoryInterface` structure. The file is created in the project's root directory and deleted when the command execution completes. * @param releaseInfo A plain object following the `ReleaseHistoryInterface` structure. * @param platform The target platform. This string is passed when executing the CLI command. ('ios'/'android') * @param identifier An additional identifier string. This string is passed when executing the CLI command. */ setReleaseHistory: ( targetBinaryVersion: string, jsonFilePath: string, releaseInfo: ReleaseHistoryInterface, platform: "ios" | "android", identifier?: string, ) => Promise; /** * Downloads a previously released update archive so the release command can compute * asset diffs against it. Receives the `downloadUrl` recorded in the release history and * must resolve with the local path of the downloaded file. * Optional: when absent, releases are published without asset diff archives. * * @param archive Information that identifies the released full archive. The release command * supplies its download URL, target binary version, release version, and package hash together. */ bundleDownloader?: ( archive: BundleDownloadInfo, platform: "ios" | "android", identifier?: string, ) => Promise<{ downloadedFilePath: string }>; }