From 41f49450985a80bd0c819ec8fbcecc8f659f4ce9 Mon Sep 17 00:00:00 2001 From: Gloria Date: Mon, 6 Mar 2023 19:57:11 +0800 Subject: [PATCH] Update docs against 14586+14716 Signed-off-by: wusongqing --- .../reference/apis/Readme-EN.md | 1 + .../js-apis-bundleManager-BundlePackInfo.md | 146 ++++++++++++++++++ .../apis/js-apis-bundleManager-abilityInfo.md | 2 +- .../reference/apis/js-apis-freeInstall.md | 4 +- 4 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index 36f1627f28..497dcf4054 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -140,6 +140,7 @@ - [abilityInfo](js-apis-bundleManager-abilityInfo.md) - [applicationInfo](js-apis-bundleManager-applicationInfo.md) - [bundleInfo](js-apis-bundleManager-bundleInfo.md) + - [BundlePackInfo](js-apis-bundleManager-BundlePackInfo.md) - [dispatchInfo](js-apis-bundleManager-dispatchInfo.md) - [elementName](js-apis-bundleManager-elementName.md) - [extensionAbilityInfo](js-apis-bundleManager-extensionAbilityInfo.md) diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md new file mode 100644 index 0000000000..e6fd8bd2c8 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md @@ -0,0 +1,146 @@ +# BundlePackInfo + +The **BundlePackInfo** module provides information in the **pack.info** file. The information can be obtained using [freeInstall.getBundlePackInfo](js-apis-freeInstall.md). + +> **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. + +## BundlePackInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + + +| Name | Type | Readable| Writable| Description | +| -------- | --------------------------------------- | ---- | ---- | ------------------------- | +| packages | Array\<[PackageConfig](#packageconfig)> | Yes | No | Package configuration information in the **pack.info** file. | +| summary | [PackageSummary](#packagesummary) | Yes | No | Package summary information in the **pack.info** file.| + +## PackageConfig + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ | +| deviceTypes | Array\ | Yes | No | Device types supported by the bundle. | +| name | string | Yes | No | Bundle name. | +| moduleType | string | Yes | No | Module type of the bundle. | +| deliveryWithInstall | boolean | Yes | No | Whether the HAP file will be installed when the user installs the bundle. The value **true** means that the HAP file will be automatically installed when the user installs the bundle, and **false** means the opposite.| + +## PackageSummary + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------- | --------------------------------------------- | ---- | ---- | -------------------- | +| app | [BundleConfigInfo](#bundleconfiginfo) | Yes | No | Bundle configuration information. | +| modules | Array\<[ModuleConfigInfo](#moduleconfiginfo)> | Yes | No | Module configuration information of the bundle.| + +## BundleConfigInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ---------- | ------------------- | ---- | ---- | -------------------------------------- | +| bundleName | string | Yes | No | Bundle name. It uniquely identifies an application.| +| version | [Version](#version) | Yes | No | Bundle version. | + +## ModuleConfigInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- | +| 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. | +| 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.| + +## ModuleDistroInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------------------- | ------- | ---- | ---- | ------------------------------------------------------------ | +| deliveryWithInstall | boolean | Yes | No | Whether the HAP file will be installed when the user installs the bundle. The value **true** means that the HAP file will be automatically installed when the user installs the bundle, and **false** means the opposite.| +| installationFree | boolean | Yes | No | Whether the HAP file supports the installation-free feature. The value **true** means that the HAP file supports the installation-free feature and meets installation-free constraints, and **false** means the opposite.| +| moduleName | string | Yes | No | Module name. | +| moduleType | string | Yes | No | Module type. | + +## ModuleAbilityInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | +| name | string | Yes | No | Name of the ability. The name must be unique in the bundle. | +| label | string | Yes | No | Name of the ability displayed to users. The value is a resource index to names in multiple languages.| +| exported | boolean | Yes | No | Whether the ability can be called by other bundles. The value **true** means that the ability can be called by other bundles, and **false** means the opposite.| +| forms | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes | No | Widget information. | + +## ExtensionAbility + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ----- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | +| name | string | Yes| No| Name of the ExtensionAbility.| +| forms | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes | No | Widget information.| + +## AbilityFormInfo + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ | +| name | string | Yes | No | Widget name. | +| type | string | Yes | No | Widget type. | +| updateEnabled | boolean | Yes | No | Whether the widget supports periodic update. The value **true** means that the widget supports periodic update, and **false** means the opposite.| +| scheduledUpdateTime | string | Yes | No | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute. | +| updateDuration | number | Yes | No | Interval to update the widget. The unit is 30 minutes. The value is a multiple of 30. A widget can be updated at a specified interval (**updateDuration**) or at the scheduled time (**scheduledUpdateTime**). If both are configured, **updateDuration** takes precedence.| +| supportDimensions | Array\ | Yes | No | Dimensions of the widget. The value can be **1\*2**, **2\*2**, **2\*4**, **4\*4**, or a combination of these options. At least one option must be specified when defining the widget.| +| defaultDimension | string | Yes | No | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.| + +## ApiVersion + +**System API**: This is a system API and cannot be called by third-party applications. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ----------- | ------ | ---- | ---- | -------------------- | +| releaseType | string | Yes | No | Name of the API version. | +| compatible | number | Yes | No | Minimum API version.| +| target | number | Yes | No | Target API version. | + +## Version + +**System API**: This is a system API. + +**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall + +| Name | Type | Readable| Writable| Description | +| ------------------------ | ------ | ---- | ---- | ------------------------------------------------------------ | +| minCompatibleVersionCode | number | Yes | No | Minimum compatible version of the bundle. It is used to check whether the bundle is compatible with a version on other devices in the cross-device scenario. The value is a 32-bit non-negative integer.| +| name | string | Yes | No | Version number of the bundle visible to users. | +| code | number | Yes | No | Version number of the bundle used only for bundle management. The value is a 32-bit non-negative integer. It is used only to determine whether a version is later than another version. A larger value indicates a later version.| diff --git a/en/application-dev/reference/apis/js-apis-bundleManager-abilityInfo.md b/en/application-dev/reference/apis/js-apis-bundleManager-abilityInfo.md index cacab28b20..b15708816f 100644 --- a/en/application-dev/reference/apis/js-apis-bundleManager-abilityInfo.md +++ b/en/application-dev/reference/apis/js-apis-bundleManager-abilityInfo.md @@ -22,7 +22,7 @@ The **AbilityInfo** module defines the ability information. A system application | icon | string | Yes | No | Index of the ability icon resource file. | | iconId | number | Yes | No | ID of the ability icon. | | process | string | Yes | No | Process in which the ability runs. If this parameter is not set, the bundle name is used.| -| isVisible | boolean | Yes | No | Whether the ability can be called by other bundles. | +| exported | boolean | Yes | No | Whether the ability can be called by other bundles. | | type | [AbilityType](js-apis-bundleManager.md#abilitytype) | Yes | No | Ability type.
This attribute can be used only in the FA model.| | orientation | [DisplayOrientation](js-apis-bundleManager.md#displayorientation) | Yes | No | Ability display orientation. | | launchType | [LaunchType](js-apis-bundleManager.md#launchtype) | Yes | No | Ability launch mode. | diff --git a/en/application-dev/reference/apis/js-apis-freeInstall.md b/en/application-dev/reference/apis/js-apis-freeInstall.md index 73d618e2f6..937cc8437c 100644 --- a/en/application-dev/reference/apis/js-apis-freeInstall.md +++ b/en/application-dev/reference/apis/js-apis-freeInstall.md @@ -267,7 +267,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundlePackFlag**. This | -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | bundleName | string | Yes | Bundle name. | | bundlePackFlag | [BundlePackFlag](#bundlepackflag) | Yes | Flag of the bundle package. | -| callback | AsyncCallback<[BundlePackInfo](js-apis-bundleManager-packInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **BundlePackInfo** object obtained; otherwise, **err** is an error object.| +| callback | AsyncCallback<[BundlePackInfo](js-apis-bundleManager-BundlePackInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **BundlePackInfo** object obtained; otherwise, **err** is an error object.| **Error codes** @@ -318,7 +318,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API | Type | Description | | ---------------------------------------------------------- | ----------------------------------- | -| Promise<[BundlePackInfo](js-apis-bundleManager-packInfo.md)> | Promise used to return the **BundlePackInfo** object obtained.| +| Promise<[BundlePackInfo](js-apis-bundleManager-BundlePackInfo.md)> | Promise used to return the **BundlePackInfo** object obtained.| **Error codes** -- GitLab