Skip to content

Latest commit

 

History

History
197 lines (117 loc) · 5.06 KB

ideploypluginapi.md

File metadata and controls

197 lines (117 loc) · 5.06 KB

Cordova Plugin Ionic

Interface: IDeployPluginAPI

The Public API for the deploy Plugin

Hierarchy

IDeployPluginAPI

Index

Methods


Methods

checkForUpdate

checkForUpdate(): Promise<CheckForUpdateResponse>

description: Check for available updates for the currently configured app id and channel.

since: v5.0.0

Returns: Promise<CheckForUpdateResponse> A response describing an update if one is available.


configure

configure(config: IDeployConfig): Promise<void>

description: Update the default configuration for the plugin on the current device. The new configuration will be persisted across app close and binary updates.

since: v5.0.0

Parameters:

Name Type Description
config IDeployConfig The new configuration for the plugin on this device.

Returns: Promise<void>


deleteVersionById

deleteVersionById(versionId: string): Promise<boolean>

description: Remove the files specific to a snapshot from the device.

Parameters:

Name Type
versionId string

Returns: Promise<boolean> true if the update was deleted.


downloadUpdate

downloadUpdate(progress?: CallbackFunction<number>): Promise<boolean>

description: Download the new files from an available update found by the checkForUpdate method and prepare the update.

since: v5.0.0

Parameters:

Name Type Description
Optional progress CallbackFunction<number> A progress callback function which will be called with a number representing the percent of completion of the download and prepare.

Returns: Promise<boolean> true if the download succeeded


extractUpdate

extractUpdate(progress?: CallbackFunction<number>): Promise<boolean>

description: Extract a downloaded bundle of updated files.

since: v5.0.0

Parameters:

Name Type Description
Optional progress CallbackFunction<number> A progress callback function which will be called with a number representing the percent of completion of the extract.

Returns: Promise<boolean> true if the extract succeeded


getAvailableVersions

getAvailableVersions(): Promise<ISnapshotInfo[]>

description: Get a list of the snapshots available on the device.

since: v5.0.0

Returns: Promise<ISnapshotInfo[]> a list of available updates.


getConfiguration

getConfiguration(): Promise<ICurrentConfig>

description: Get the current configuration for the plugin on the current device.

since: v5.0.0

Returns: Promise<ICurrentConfig> The current configuration of the plugin.


getCurrentVersion

getCurrentVersion(): Promise<ISnapshotInfo | undefined>

description: Get info about the currently deployed update or undefined if none are applied.

since: v5.0.0

Returns: Promise<ISnapshotInfo | undefined> The info about the currently applied update or undefined if none is applied.


reloadApp

reloadApp(): Promise<boolean>

description: Reload the app if a more recent version of the app is available.

since: v5.0.0

Returns: Promise<boolean> true if the reload succeeded


sync

sync(syncOptions: ISyncOptions): Promise<ISnapshotInfo | undefined>

description: Check for an update, download it, and apply it in one step.

since: v5.0.0

Parameters:

Name Type Description
syncOptions ISyncOptions (Optional) Application update overrides.

Returns: Promise<ISnapshotInfo | undefined> The info about the currently applied update or undefined if none is applied.