From 72c4f5321651caecfe0107a3888a2471696933b3 Mon Sep 17 00:00:00 2001 From: Gloria Date: Thu, 6 Apr 2023 19:27:12 +0800 Subject: [PATCH] Update docs against 16633+16481 Signed-off-by: wusongqing --- .../js-apis-bundleManager-BundlePackInfo.md | 4 +- .../js-apis-bundleManager-applicationInfo.md | 1 + .../js-apis-bundleManager-hapModuleInfo.md | 23 ++++++++ .../reference/apis/js-apis-bundleManager.md | 59 ++++++++----------- .../reference/apis/js-apis-installer.md | 15 ++--- 5 files changed, 58 insertions(+), 44 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md index e6fd8bd2c8..cd0e05be26 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md @@ -63,10 +63,10 @@ The **BundlePackInfo** module provides information in the **pack.info** file. Th | ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- | | mainAbility | string | Yes| No| Name of the main ability.| | apiVersion | [ApiVersion](#apiversion) | Yes | No | API version of the module. | -| deviceType | Array\ | Yes | No | Device types supported by the module. | +| deviceTypes | Array\ | Yes | No | Device types supported by the module. | | distro | [ModuleDistroInfo](#moduledistroinfo) | Yes | No | Distribution information of the module. | | abilities | Array\<[ModuleAbilityInfo](#moduleabilityinfo)> | Yes | No | Ability information of the module. | -| extensionAbilities | Array\<[ExtensionAbilities](#extensionability)> | Yes | No | ExtensionAbility information of the module.| +| extensionAbilities | Array\<[ExtensionAbility](#extensionability)> | Yes | No | ExtensionAbility information of the module.| ## ModuleDistroInfo diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md index 8997e94099..3447ba9b6d 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md @@ -32,3 +32,4 @@ The **ApplicationInfo** module defines the application information. A system app | appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**. | | appProvisionType | string | Yes | No | Type of the application signing certificate file. The options are **debug** and **release**. | | systemApp | boolean | Yes | No | Whether the application is a system application. | +| bundleType |[BundleType](js-apis-bundleManager.md#bundletype) | Yes | No | Bundle type, which can be **APP** (common application) or **ATOMIC_SERVICE** (atomic service). | diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-hapModuleInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-hapModuleInfo.md index 146e3da560..5781ae592a 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager-hapModuleInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager-hapModuleInfo.md @@ -26,3 +26,26 @@ The **HapModuleInfo** module defines the HAP module information. A system applic | deviceTypes | Array\ | Yes | No | Types of devices where the module can run. | | installationFree | boolean | Yes | No | Whether installation-free is supported. | | hashValue | string | Yes | No | Hash value of the module. | +| moduleType | [ModuleType](js-apis-bundleManager.md#moduletype) | Yes | No | Type of the module. | +| preloads | Array\<[PreloadItem](#preloaditem)> | Yes | No | Preloaded modules in the atomic service.| +| dependencies | Array\<[Dependency](#dependency)> | Yes | No | Dynamic shared libraries on which the module depends. | + +## PreloadItem + +Describes the preloaded module information in the atomic service. + + **System capability**: SystemCapability.BundleManager.BundleFramework.Core + +| Name | Type | Readable| Writable| Description | +| --------- | -------------- | ---- | ---- | --------------------------- | +|moduleName | string | Yes | No | Name of the module automatically preloaded by the system.| + +## Dependency + +Describes the information about the dynamic shared library on which the module depends. + + **System capability**: SystemCapability.BundleManager.BundleFramework.Core + +| Name | Type | Readable| Writable| Description | +| ----------- | ------ | ---- | ---- | ---------------------- | +| moduleName | string | Yes | No | Module name of the shared bundle on which the current module depends.| diff --git a/en/application-dev/reference/apis/js-apis-bundleManager.md b/en/application-dev/reference/apis/js-apis-bundleManager.md index 1cef53613b..a0b5f7af78 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager.md @@ -186,6 +186,29 @@ Enumerates the display orientations of the ability. This attribute applies only | AUTO_ROTATION_PORTRAIT_RESTRICTED |11|Switched-determined auto rotation in the vertical direction.| | LOCKED |12|Locked.| +### ModuleType + +Enumerates the module types. + + **System capability**: SystemCapability.BundleManager.BundleFramework.Core + +| Name | Value | Description | +| ------- | ---- | -------------------- | +| ENTRY | 1 | Main module of the application. | +| FEATURE | 2 | Dynamic feature module of the application.| +| SHARED | 3 | Dynamic shared library module of the application. | + +### BundleType + +Enumerates the bundle types. + + **System capability**: SystemCapability.BundleManager.BundleFramework.Core + +| Name | Value | Description | +| -------------- | ---- | --------------- | +| APP | 0 | The bundle is a common application. | +| ATOMIC_SERVICE | 1 | The bundle is an atomic service.| + ## APIs ### bundleManager.getBundleInfoForSelf @@ -1076,7 +1099,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc | ID| Error Message | | -------- | ------------------------------------- | | 17700001 | The specified bundleName is not found. | -| 17700003 | The specified extensionAbility is not found. | +| 17700003 | The specified ability is not found. | | 17700004 | The specified userId is invalid. | | 17700026 | The specified bundle is disabled. | | 17700029 | The specified ability is disabled. | @@ -2859,37 +2882,3 @@ try { hilog.error(0x0000, 'testTag', 'getBundleInfoSync failed: %{public}s', err.message); } ``` - -## ModuleType - -Enumerates the module types. - - **System capability**: SystemCapability.BundleManager.BundleFramework.Core - -| Name | Value | Description | -| ------- | ---- | -------------------- | -| ENTRY | 1 | Main module of the application. | -| FEATURE | 2 | Dynamic feature module of the application.| -| SHARED | 3 | Dynamic shared library module of the application. | - -## BundleType - -Enumerates the bundle types. - - **System capability**: SystemCapability.BundleManager.BundleFramework.Core - -| Name | Value | Description | -| -------------- | ---- | --------------- | -| APP | 0 | The bundle is a common application. | -| ATOMIC_SERVICE | 1 | The bundle is an atomic service.| - -## AtomicServiceModuleType - -Enumerates the module types of an atomic service. - - **System capability**: SystemCapability.BundleManager.BundleFramework.Core - -| Name | Value | Description | -| ------ | ---- | --------------------------- | -| NORMAL | 0 | Page package in the atomic service. | -| MAIN | 1 | Landing page package in the atomic service.| diff --git a/en/application-dev/reference/apis/js-apis-installer.md b/en/application-dev/reference/apis/js-apis-installer.md index bd6f57d3dc..cc78480c32 100644 --- a/en/application-dev/reference/apis/js-apis-installer.md +++ b/en/application-dev/reference/apis/js-apis-installer.md @@ -3,6 +3,7 @@ The **bundle.installer** module provides APIs for you to install, uninstall, and recover bundles on devices. > **NOTE** +> > The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -163,7 +164,7 @@ Uninstalls a bundle. This API uses an asynchronous callback to return the result | Name | Type | Mandatory| Description | | ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- | | bundleName | string | Yes | Name of the target bundle. | -| installParam | [InstallParam](#installparam) | Yes | Parameters required for the installation. | +| installParam | [InstallParam](#installparam) | Yes | Parameters required for the uninstall. | | callback | AsyncCallback<void> | Yes| Callback used to return the result. If the operation is successful, **err** is undefined; otherwise, **err** is an error object.| **Error codes** @@ -220,7 +221,7 @@ Recovers a bundle. This API uses an asynchronous callback to return the result. | Name | Type | Mandatory| Description | | ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- | | bundleName | string | Yes | Name of the target bundle. | -| installParam | [InstallParam](#installparam) | Yes | Parameters required for the installation. | +| installParam | [InstallParam](#installparam) | Yes | Parameters required for the recovering. | | callback | AsyncCallback<void> | Yes| Callback used to return the result. If the operation is successful, **err** is undefined; otherwise, **err** is an error object.| **Error codes** @@ -282,8 +283,8 @@ Defines the parameters that need to be specified for bundle installation, uninst | Name | Type | Mandatory | Description | | ------------------------------ | ------------------------------ | ------------------ | ------------------ | -| userId | number | Yes | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.| -| installFlag | number | Yes | Installation flag. The value **0** means initial installation and **1** means overwrite installation.| -| isKeepData | boolean | Yes | Whether to retain the data directory during bundle uninstall.| -| hashParams | Array<[HashParam](#hashparam)> | Yes| Hash parameters. | -| crowdtestDeadline| number | Yes |End date of crowdtesting.| +| userId | number | No | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#getOsAccountLocalId) to obtain the user of the current process.| +| installFlag | number | No | Installation flag. The value **0** means initial installation and **1** means overwrite installation.| +| isKeepData | boolean | No | Whether to retain the data directory during bundle uninstall.| +| hashParams | Array<[HashParam](#hashparam)> | No| Hash parameters. | +| crowdtestDeadline| number | No |End date of crowdtesting.| -- GitLab