diff --git a/src/content/docs/docs/plugin/api.md b/src/content/docs/docs/plugin/api.md index c756d107..3badc82f 100644 --- a/src/content/docs/docs/plugin/api.md +++ b/src/content/docs/docs/plugin/api.md @@ -14,30 +14,31 @@ See the Github [Readme](https://github.com/Cap-go/capacitor-updater) for more in CapacitorUpdater can be configured with these options: -| Prop | Type | Description | Default | Since | -| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------- | -| **`appReadyTimeout`** | number | Configure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS. | 10000 // (10 seconds) | | -| **`responseTimeout`** | number | Configure the number of milliseconds the native plugin should wait before considering API timeout. Only available for Android and iOS. | 20 // (20 second) | | -| **`autoDeleteFailed`** | boolean | Configure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS. | true | | -| **`autoDeletePrevious`** | boolean | Configure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS. | true | | -| **`autoUpdate`** | boolean | Configure whether the plugin should use Auto Update via an update server. Only available for Android and iOS. | true | | -| **`resetWhenUpdate`** | boolean | Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Only available for Android and iOS. | true | | -| **`updateUrl`** | string | Configure the URL / endpoint to which update checks are sent. Only available for Android and iOS. | https://api.capgo.app/updates | | -| **`statsUrl`** | string | Configure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to "" to disable stats reporting. | https://api.capgo.app/stats | | -| **`privateKey`** | string | Configure the private key for end to end live update encryption. Only available for Android and iOS. | undefined | | -| **`publicKey`** | string | Configure the public key for end to end live update encryption Version 2 Only available for Android and iOS. | undefined | 6.2.0 | -| **`version`** | string | Configure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code. Only available for Android and iOS. | undefined | 4.17.48 | -| **`directUpdate`** | boolean | Make the plugin direct install the update when the app what just updated/installed. Only for autoUpdate mode. Only available for Android and iOS. | undefined | 5.1.0 | -| **`periodCheckDelay`** | number | Configure the delay period for period update check. the unit is in seconds. Only available for Android and iOS. Cannot be less than 600 seconds (10 minutes). | 600 // (10 minutes) | | -| **`localS3`** | boolean | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | -| **`localHost`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | -| **`localWebHost`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | -| **`localSupa`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | -| **`localSupaAnon`** | string | Configure the CLI to use a local server for testing. | undefined | 4.17.48 | -| **`localApi`** | string | Configure the CLI to use a local api for testing. | undefined | 6.3.3 | -| **`localApiFiles`** | string | Configure the CLI to use a local file api for testing. | undefined | 6.3.3 | -| **`allowModifyUrl`** | boolean | Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side. | false | 5.4.0 | -| **`defaultChannel`** | string | Set the default channel for the app in the config. | undefined | 5.5.0 | +| Prop | Type | Description | Default | Since | +| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------- | +| **`appReadyTimeout`** | number | Configure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS. | 10000 // (10 seconds) | | +| **`responseTimeout`** | number | Configure the number of milliseconds the native plugin should wait before considering API timeout. Only available for Android and iOS. | 20 // (20 second) | | +| **`autoDeleteFailed`** | boolean | Configure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS. | true | | +| **`autoDeletePrevious`** | boolean | Configure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS. | true | | +| **`autoUpdate`** | boolean | Configure whether the plugin should use Auto Update via an update server. Only available for Android and iOS. | true | | +| **`resetWhenUpdate`** | boolean | Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Only available for Android and iOS. | true | | +| **`updateUrl`** | string | Configure the URL / endpoint to which update checks are sent. Only available for Android and iOS. | https://api.capgo.app/updates | | +| **`channelUrl`** | string | Configure the URL / endpoint for channel operations. Only available for Android and iOS. | https://api.capgo.app/channel_self | | +| **`statsUrl`** | string | Configure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to "" to disable stats reporting. | https://api.capgo.app/stats | | +| **`privateKey`** | string | Configure the private key for end to end live update encryption. Only available for Android and iOS. | undefined | | +| **`publicKey`** | string | Configure the public key for end to end live update encryption Version 2 Only available for Android and iOS. | undefined | 6.2.0 | +| **`version`** | string | Configure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code. Only available for Android and iOS. | undefined | 4.17.48 | +| **`directUpdate`** | boolean | Make the plugin direct install the update when the app what just updated/installed. Only for autoUpdate mode. Only available for Android and iOS. | undefined | 5.1.0 | +| **`periodCheckDelay`** | number | Configure the delay period for period update check. the unit is in seconds. Only available for Android and iOS. Cannot be less than 600 seconds (10 minutes). | 600 // (10 minutes) | | +| **`localS3`** | boolean | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | +| **`localHost`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | +| **`localWebHost`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | +| **`localSupa`** | string | Configure the CLI to use a local server for testing or self-hosted update server. | undefined | 4.17.48 | +| **`localSupaAnon`** | string | Configure the CLI to use a local server for testing. | undefined | 4.17.48 | +| **`localApi`** | string | Configure the CLI to use a local api for testing. | undefined | 6.3.3 | +| **`localApiFiles`** | string | Configure the CLI to use a local file api for testing. | undefined | 6.3.3 | +| **`allowModifyUrl`** | boolean | Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side. | false | 5.4.0 | +| **`defaultChannel`** | string | Set the default channel for the app in the config. | undefined | 5.5.0 | ## Examples @@ -54,6 +55,7 @@ In `capacitor.config.json`: "autoUpdate": false, "resetWhenUpdate": false, "updateUrl": https://example.com/api/auto_update, + "channelUrl": https://example.com/api/channel, "statsUrl": https://example.com/api/stats, "privateKey": undefined, "publicKey": undefined, @@ -91,6 +93,7 @@ const config: CapacitorConfig = { autoUpdate: false, resetWhenUpdate: false, updateUrl: https://example.com/api/auto_update, + channelUrl: https://example.com/api/channel, statsUrl: https://example.com/api/stats, privateKey: undefined, publicKey: undefined,