From 29eb389ef0ab20748b9aa37a24cd238fd961299a Mon Sep 17 00:00:00 2001 From: wusongqing Date: Sat, 28 May 2022 16:32:40 +0800 Subject: [PATCH] fixed 55b650f from https://gitee.com/wusongqing/docs/pulls/4581 added bundle related apis Signed-off-by: wusongqing --- .../apis/js-apis-bundle-AbilityInfo.md | 45 ++++++++++++ .../apis/js-apis-bundle-ApplicationInfo.md | 41 +++++++++++ .../apis/js-apis-bundle-BundleInfo.md | 69 +++++++++++++++++++ .../apis/js-apis-bundle-CustomizeData.md | 22 ++++++ .../js-apis-bundle-ExtensionAbilityInfo.md | 31 +++++++++ .../apis/js-apis-bundle-HapModuleInfo.md | 37 ++++++++++ .../reference/apis/js-apis-bundle-Metadata.md | 22 ++++++ .../apis/js-apis-bundle-ModuleInfo.md | 21 ++++++ 8 files changed, 288 insertions(+) create mode 100644 en/application-dev/reference/apis/js-apis-bundle-AbilityInfo.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-BundleInfo.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-CustomizeData.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-ExtensionAbilityInfo.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-HapModuleInfo.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-Metadata.md create mode 100644 en/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md diff --git a/en/application-dev/reference/apis/js-apis-bundle-AbilityInfo.md b/en/application-dev/reference/apis/js-apis-bundle-AbilityInfo.md new file mode 100644 index 0000000000..962b4535a3 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-AbilityInfo.md @@ -0,0 +1,45 @@ +# AbilityInfo + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides the ability information. + + + + **System capability**: SystemCapability.BundleManager.BundleFramework + +| Name | Type | Readable| Writable| Description | +| --------------------- | -------------------------------------------------------- | ---- | ---- | ----------------------------------------- | +| bundleName | string | Yes | No | Bundle name of the application. | +| name | string | Yes | No | Ability name. | +| label | string | Yes | No | Ability name visible to users. | +| description | string | Yes | No | Ability description. | +| icon | string | Yes | No | Index of the ability icon resource file. | +| descriptionId | number | Yes | No | Ability description ID. | +| iconId | number | Yes | No | Ability icon ID. | +| moduleName | string | Yes | No | Name of the HAP file to which the ability belongs. | +| process | string | Yes | No | Process in which the ability runs. If this parameter is not set, the bundle name is used.| +| targetAbility | string | Yes | No | Target ability that the ability alias points to. | +| backgroundModes | number | Yes | No | Background service mode of the ability. | +| isVisible | boolean | Yes | No | Whether the ability can be called by other applications. | +| formEnabled | boolean | Yes | No | Whether the ability provides the service widget capability. | +| type | AbilityType | Yes | No | Ability type. | +| orientation | DisplayOrientation | Yes | No | Ability display orientation. | +| launchMode | LaunchMode | Yes | No | Ability launch mode. | +| permissions | Array\ | Yes | No | Permissions required for other applications to call the ability.| +| deviceTypes | Array\ | Yes | No | Device types supported by the ability. | +| deviceCapabilities | Array\ | Yes | No | Device capabilities required for the ability. | +| readPermission | string | Yes | No | Permission required for reading the ability data. | +| writePermission | string | Yes | No | Permission required for writing data to the ability. | +| applicationInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information. | +| uri | string | Yes | No | URI of the ability. | +| labelId | number | Yes | No | Ability label ID. | +| subType | AbilitySubType | Yes | No | Subtype of the template that can be used by the ability. | +| metaData8+ | Array\<[CustomizeData](js-apis-bundle-CustomizeData.md)> | Yes | No | Custom metadata of the ability. | +| metaData9+ | Array\<[Metadata](js-apis-bundle-Metadata.md)> | Yes | No | Metadata of the ability. | +| enabled8+ | boolean | Yes | No | Whether the ability is enabled. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md b/en/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md new file mode 100644 index 0000000000..7a32f64231 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md @@ -0,0 +1,41 @@ +# ApplicationInfo + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides the application information. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + + + +| Name | Type | Readable| Writable| Description | +| -------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------ | +| name | string | Yes | No | Application name. | +| description | string | Yes | No | Application description. | +| descriptionId | number | Yes | No | Application description ID. | +| systemApp | boolean | Yes | No | Whether the application is a system application. The default value is **false**. | +| enabled | boolean | Yes | No | Whether the application is enabled. The default value is **true**. | +| label | string | Yes | No | Application label. | +| labelId | string | Yes | No | Application label ID. | +| icon | string | Yes | No | Application icon. | +| iconId | string | Yes | No | Application icon ID. | +| process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used.| +| supportedModes | number | Yes | No | Running modes supported by the application. | +| moduleSourceDirs | Array\ | Yes | No | Relative paths for storing application resources. | +| permissions | Array\ | Yes | No | Permissions required for accessing the application. | +| moduleInfos | Array\<[ModuleInfo](js-apis-bundle-ModuleInfo.md)> | Yes | No | Application module information. | +| entryDir | string | Yes | No | Path for storing application files. | +| codePath8+ | string | Yes | No | Installation directory of the application. | +| metaData8+ | Map\> | Yes | No | Custom metadata of the application. | +| metaData9+ | Map\> | Yes | No | Metadata of the application. | +| removable8+ | boolean | Yes | No | Whether the application is removable. | +| accessTokenId8+ | number | Yes | No | Access token ID of the application. | +| uid8+ | number | Yes | No | UID of the application. | +| entityType8+ | string | Yes | No | Entity type of the application. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-BundleInfo.md b/en/application-dev/reference/apis/js-apis-bundle-BundleInfo.md new file mode 100644 index 0000000000..4b5437ad37 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-BundleInfo.md @@ -0,0 +1,69 @@ +# BundleInfo + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides the application bundle information. + + + + **System capability**: SystemCapability.BundleManager.BundleFramework + +| Name | Type | Readable| Writable| Description | +| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------ | +| name | string | Yes | No | Bundle name. | +| type | string | Yes | No | Bundle type. | +| appId | string | Yes | No | ID of the application to which the bundle belongs. | +| uid | number | Yes | No | UID of the application to which the bundle belongs. | +| installTime | number | Yes | No | Time when the HAP file was installed. | +| updateTime | number | Yes | No | Time when the HAP file was updated. | +| appInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application configuration information. | +| abilityInfos | Array\<[AbilityInfo](js-apis-bundle-AbilityInfo.md)> | Yes | No | Ability configuration information. | +| reqPermissions | Array\ | Yes | No | Permissions to request from the system for running the application. | +| reqPermissionDetails | Array\<[ReqPermissionDetail](#ReqPermissionDetail)> | Yes | No | Detailed information of the permissions to request from the system.| +| vendor | string | Yes | No | Vendor of the bundle. | +| versionCode | number | Yes | No | Version number of the bundle. | +| versionName | string | Yes | No | Version description of the bundle. | +| compatibleVersion | number | Yes | No | Earliest SDK version required for running the bundle. | +| targetVersion | number | Yes | No | Latest SDK version required for running the bundle. | +| isCompressNativeLibs | boolean | Yes | No | Whether to compress the native library of the bundle. The default value is **true**. | +| hapModuleInfos | Array\<[HapModuleInfo](js-apis-bundle-HapModuleInfo.md)> | Yes | No | Module configuration information. | +| entryModuleName | string | Yes | No | Name of the entry module. | +| cpuAbi | string | Yes | No | cpuAbi information of the bundle. | +| isSilentInstallation | string | Yes | No | Whether the application can be installed in silent mode. | +| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario. | +| entryInstallationFree | boolean | Yes | No | Whether installation-free is supported for the entry module. | +| reqPermissionStates8+ | Array\ | Yes | No | Permission grant state. | +| extensionAbilityInfo9+ | Array\<[ExtensionAbilityInfo](js-apis-bundle-ExtensionAbilityInfo.md)> | Yes | No | Extension ability information. | + + + +## ReqPermissionDetail + +Provides the detailed information of the permissions to request from the system. + + **System capability**: SystemCapability.BundleManager.BundleFramework + +| Name | Type | Readable| Writable| Description | +| --------------------- | ----------------------- | ---- | ---- | -------------------- | +| name | string | Yes | Yes | Name of the permission to request. | +| reason | string | Yes | Yes | Reason for requesting the permission. | +| reasonId9+ | number | Yes | Yes | ID of the reason for requesting the permission.| +| usedScene | [UsedScene](#UsedScene) | Yes | Yes | Application scenario and timing for using the permission.| + + + +## UsedScene + +Describes the application scenario and timing for using the permission. + + **System capability**: SystemCapability.BundleManager.BundleFramework + +| Name | Type | Readable| Writable| Description | +| --------- | -------------- | ---- | ---- | ------------------------- | +| abilities | Array\ | Yes | Yes | Abilities that use the permission.| +| when | string | Yes | Yes | Time when the permission is used. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-CustomizeData.md b/en/application-dev/reference/apis/js-apis-bundle-CustomizeData.md new file mode 100644 index 0000000000..d45e4620d5 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-CustomizeData.md @@ -0,0 +1,22 @@ +# CustomizeData + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides custom metadata. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + + + +| Name | Type | Readable| Writable| Description | +| ------------------ | ------ | ---- | ---- | ---------------- | +| name | string | Yes | Yes | Custom metadata name.| +| value | string | Yes | Yes | Custom metadata value. | +| extra8+ | string | Yes | Yes | Custom metadata resources. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-ExtensionAbilityInfo.md b/en/application-dev/reference/apis/js-apis-bundle-ExtensionAbilityInfo.md new file mode 100644 index 0000000000..ad3f411f69 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-ExtensionAbilityInfo.md @@ -0,0 +1,31 @@ +# ExtensionAbilityInfo + + + +> **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. + + + +Provides the Extension ability information. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + +| Name | Type | Readable| Writable| Description | +| -------------------- | ---------------------------------------------------- | ---- | ---- | -------------------------------------------------- | +| bundleName | string | Yes | No | Bundle name of the application. | +| moduleName | string | Yes | No | Name of the HAP file to which the Extension ability belongs. | +| name | string | Yes | No | Name of the Extension ability. | +| labelId | number | Yes | No | Label ID of the Extension ability. | +| descriptionId | number | Yes | No | Description ID of the Extension ability. | +| iconId | number | Yes | No | Icon ID of the Extension ability. | +| isVisible | boolean | Yes | No | Whether the Extension ability can be called by other applications. | +| extensionAbilityType | bundle.ExtensionAbilityType | Yes | No | Type of the Extension ability. | +| permissions | Array\ | Yes | No | Permissions required for other applications to call the Extension ability.| +| applicationInfo | [ApplicationInfo](js-apis-bundle-ApplicationInfo.md) | Yes | No | Application information of the Extension ability. | +| metaData | Array\<[Metadata](js-apis-bundle-Metadata.md)> | Yes | No | Metadata of the Extension ability. | +| enabled | boolean | Yes | No | Whether the Extension ability is enabled. | +| readPermission | string | Yes | No | Permission required for reading the Extension ability data. | +| writePermission | string | Yes | No | Permission required for writing data to the Extension ability. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-HapModuleInfo.md b/en/application-dev/reference/apis/js-apis-bundle-HapModuleInfo.md new file mode 100644 index 0000000000..708617c49c --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-HapModuleInfo.md @@ -0,0 +1,37 @@ +# HapModuleInfo + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides the HAP module information. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + + + +| Name | Type | Readable| Writable| Description | +| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | -------------------- | +| name | string | Yes | No | Module name. | +| description | string | Yes | No | Module description. | +| descriptionId | number | Yes | No | Module description ID. | +| icon | string | Yes | No | Module icon. | +| label | string | Yes | No | Module label. | +| labelId | number | Yes | No | Module label ID. | +| iconId | number | Yes | No | Module icon ID. | +| backgroundImg | string | Yes | No | Module background image. | +| supportedModes | number | Yes | No | Running modes supported by the module. | +| reqCapabilities | Array\ | Yes | No | Capabilities required for module running. | +| deviceTypes | Array\ | Yes | No | Device types supported by the module. | +| abilityInfo | Array\<[AbilityInfo](js-apis-bundle-AbilityInfo.md)> | Yes | No | Ability information. | +| moduleName | string | Yes | No | Module name. | +| mainAbilityName | string | Yes | No | Name of the main ability. | +| installationFree | boolean | Yes | No | Whether installation-free is supported. | +| mainElementName9+ | string | Yes | No | Information about the main ability. | +| extensionAbilityInfo9+ | Array\<[ExtensionAbilityInfo](js-apis-bundle-ExtensionAbilityInfo.md)> | Yes | No | Information about the Extension ability.| +| metadata9+ | Array\<[Metadata](js-apis-bundle-Metadata.md)> | Yes | No | Metadata of the ability. | diff --git a/en/application-dev/reference/apis/js-apis-bundle-Metadata.md b/en/application-dev/reference/apis/js-apis-bundle-Metadata.md new file mode 100644 index 0000000000..7c7d43b444 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-Metadata.md @@ -0,0 +1,22 @@ +# Metadata + + + +> **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. + + + +Provides the metadata information. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + + + +| Name | Type | Readable| Writable| Description | +| -------- | ------ | ---- | ---- | ---------- | +| name | string | Yes | Yes | Metadata name.| +| value | string | Yes | Yes | Metadata value. | +| resource | string | Yes | Yes | Metadata resource.| diff --git a/en/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md b/en/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md new file mode 100644 index 0000000000..71fc24ff40 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md @@ -0,0 +1,21 @@ +# ModuleInfo + + + +> **NOTE**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + + + +Provides the module information of the application. + + + +**System capability**: SystemCapability.BundleManager.BundleFramework + + + +| Name | Type | Readable| Writable| Description | +| --------------- | ------ | ---- | ---- | -------- | +| moduleName | string | Yes | No | Module name.| +| moduleSourceDir | string | Yes | No | Installation directory.| -- GitLab