The Public API for the deploy Plugin
IDeployPluginAPI
- checkForUpdate
- configure
- deleteVersionById
- downloadUpdate
- extractUpdate
- getAvailableVersions
- getConfiguration
- getCurrentVersion
- reloadApp
- sync
▸ 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(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(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(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(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(): 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(): 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(): 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(): 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(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.