mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 09:22:53 +00:00
!10977 [包管理] [能力增强] 支持洗白机安装管控
Merge pull request !10977 from chthollystar/master
This commit is contained in:
commit
7bef207c20
139
api/@ohos.bundle.installer.d.ts
vendored
139
api/@ohos.bundle.installer.d.ts
vendored
@ -110,8 +110,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
@ -151,8 +150,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
@ -187,6 +185,47 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 11
|
||||
*/
|
||||
/**
|
||||
* Install HAPs for an application.
|
||||
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
|
||||
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
|
||||
* 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
|
||||
* @throws { BusinessError } 17700004 - The specified user ID is not found.
|
||||
* @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
|
||||
* @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
|
||||
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
|
||||
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
|
||||
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
|
||||
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
|
||||
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
|
||||
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
|
||||
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
|
||||
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
|
||||
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
|
||||
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
|
||||
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
|
||||
* (required APL: system_basic or system_core).
|
||||
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
|
||||
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
|
||||
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
|
||||
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
|
||||
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
|
||||
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
|
||||
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 12
|
||||
*/
|
||||
install(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
@ -225,8 +264,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
|
||||
@ -262,8 +300,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
|
||||
@ -294,6 +331,45 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 11
|
||||
*/
|
||||
/**
|
||||
* Install HAPs for an application.
|
||||
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
|
||||
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
|
||||
* 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
|
||||
* @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
|
||||
* @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
|
||||
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
|
||||
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
|
||||
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
|
||||
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
|
||||
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
|
||||
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
|
||||
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
|
||||
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
|
||||
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
|
||||
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
|
||||
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
|
||||
* (required APL: system_basic or system_core).
|
||||
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
|
||||
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
|
||||
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
|
||||
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
|
||||
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
|
||||
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
|
||||
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 12
|
||||
*/
|
||||
install(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
@ -334,8 +410,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @returns { Promise<void> }
|
||||
@ -375,8 +450,7 @@ declare namespace installer {
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or
|
||||
* ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
|
||||
* @returns { Promise<void> }
|
||||
@ -411,6 +485,47 @@ declare namespace installer {
|
||||
* @systemapi
|
||||
* @since 11
|
||||
*/
|
||||
/**
|
||||
* Install haps for an application.
|
||||
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
|
||||
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
|
||||
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
|
||||
* To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
|
||||
*
|
||||
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE
|
||||
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
|
||||
* @param { InstallParam } [installParam] - Indicates other parameters required for the installation.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
|
||||
* 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
|
||||
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature; 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
|
||||
* @throws { BusinessError } 17700004 - The specified user ID is not found.
|
||||
* @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
|
||||
* @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
|
||||
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
|
||||
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
|
||||
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
|
||||
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
|
||||
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
|
||||
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
|
||||
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
|
||||
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
|
||||
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
|
||||
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
|
||||
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
|
||||
* (required APL: system_basic or system_core).
|
||||
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
|
||||
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
|
||||
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
|
||||
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
|
||||
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
|
||||
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
|
||||
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @systemapi
|
||||
* @since 12
|
||||
*/
|
||||
install(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user