From 2a696b6ed802549748bcdac550dc7fd75bdf37e8 Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Wed, 13 Aug 2025 17:09:47 +0800 Subject: [PATCH] fix bms sdk Signed-off-by: lanhaoyu --- api/@ohos.bundle.bundleManager.d.ts | 29 ++++++++++++++------- api/@ohos.bundle.bundleResourceManager.d.ts | 24 +++++++++++------ api/@ohos.bundle.installer.d.ts | 27 ++++++++++++++----- 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 2b929348ed..919f724caa 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -948,7 +948,7 @@ declare namespace bundleManager { * Indicates extension info with type of distributed * * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ DISTRIBUTED = 28, @@ -2114,7 +2114,8 @@ declare namespace bundleManager { function getBundleInfoForSelfSync(bundleFlags: int): BundleInfo; /** - * Obtains bundleInfo based on bundleName, bundleFlags. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundleInfo based on bundleName, bundleFlags. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. @@ -2131,7 +2132,8 @@ declare namespace bundleManager { function getBundleInfo(bundleName: string, bundleFlags: int, callback: AsyncCallback): void; /** - * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundleInfo based on bundleName, bundleFlags and userId. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. @@ -2151,7 +2153,8 @@ declare namespace bundleManager { bundleFlags: int, userId: int, callback: AsyncCallback): void; /** - * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundleInfo based on bundleName, bundleFlags and userId. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. @@ -2623,7 +2626,8 @@ declare namespace bundleManager { userId?: int): Array; /** - * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundle name by the given uid. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { int } uid - Indicates the UID of an application. @@ -2638,7 +2642,8 @@ declare namespace bundleManager { function getBundleNameByUid(uid: int, callback: AsyncCallback): void; /** - * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundle name by the given uid. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { int } uid - Indicates the UID of an application. @@ -2653,7 +2658,8 @@ declare namespace bundleManager { function getBundleNameByUid(uid: int): Promise; /** - * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundle name by the given uid. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { int } uid - Indicates the UID of an application. @@ -3548,7 +3554,8 @@ declare namespace bundleManager { function getApplicationInfoSync(bundleName: string, applicationFlags: int): ApplicationInfo; /** - * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundleInfo based on bundleName, bundleFlags and userId. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. @@ -3567,7 +3574,8 @@ declare namespace bundleManager { function getBundleInfoSync(bundleName: string, bundleFlags: int, userId: int): BundleInfo; /** - * Obtains bundleInfo based on bundleName, bundleFlags. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains bundleInfo based on bundleName, bundleFlags. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. @@ -4264,7 +4272,8 @@ declare namespace bundleManager { function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: int, userId?: int): Promise>; /** - * Obtains AppCloneIdentity contains bundleName and appIndex by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. + * Obtains AppCloneIdentity contains bundleName and appIndex by the given uid. + * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { int } uid - Indicates the UID of an application. diff --git a/api/@ohos.bundle.bundleResourceManager.d.ts b/api/@ohos.bundle.bundleResourceManager.d.ts index d817c8e4e6..d8dc56c1f5 100644 --- a/api/@ohos.bundle.bundleResourceManager.d.ts +++ b/api/@ohos.bundle.bundleResourceManager.d.ts @@ -118,7 +118,8 @@ declare namespace bundleResourceManager { * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the BundleResourceInfo object that will be returned. * @returns { BundleResourceInfo } Returns the BundleResourceInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -136,7 +137,8 @@ declare namespace bundleResourceManager { * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { int } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. + * @param { int } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the BundleResourceInfo object that will be returned. * @param { int } [appIndex] - Indicates the index of the bundle,The default value is 0. * @returns { BundleResourceInfo } Returns the BundleResourceInfo object. * @throws { BusinessError } 201 - Permission denied. @@ -156,7 +158,8 @@ declare namespace bundleResourceManager { * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo object that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the LauncherAbilityResourceInfo object that will be returned. * @returns { Array } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -194,7 +197,8 @@ declare namespace bundleResourceManager { * Obtains BundleResourceInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the BundleResourceInfo that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of BundleResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -210,7 +214,8 @@ declare namespace bundleResourceManager { * Obtains BundleResourceInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the BundleResourceInfo that will be returned. * @returns { Promise> } Returns a list of BundleResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -226,7 +231,8 @@ declare namespace bundleResourceManager { * Obtains LauncherAbilityResourceInfo of all launcher abilities available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the LauncherAbilityResourceInfo that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -242,7 +248,8 @@ declare namespace bundleResourceManager { * Obtains LauncherAbilityResourceInfo of all launcher abilities available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in + * the LauncherAbilityResourceInfo that will be returned. * @returns { Promise> } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -274,7 +281,8 @@ declare namespace bundleResourceManager { * @since 20 * @arkts 1.1&1.2 */ - function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: int, appIndex?: int): Array; + function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, + resourceFlags: int, appIndex?: int): Array; /** * Obtains resource info of a bundle. diff --git a/api/@ohos.bundle.installer.d.ts b/api/@ohos.bundle.installer.d.ts index f2c586bd43..99d65bb00e 100644 --- a/api/@ohos.bundle.installer.d.ts +++ b/api/@ohos.bundle.installer.d.ts @@ -814,14 +814,19 @@ declare namespace installer { * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_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 } hapFilePaths - Indicates the path where the HAP of the application is stored. * @param { InstallParam } [installParam] - Indicates other parameters required for the installation. * @returns { Promise } the promise returned by the function. * @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 verification failed. A non-system application calls a 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 } 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. @@ -859,14 +864,19 @@ declare namespace installer { * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_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 } hapFilePaths - Indicates the path where the HAP of the application is stored. * @param { InstallParam } [installParam] - Indicates other parameters required for the installation. * @returns { Promise } the promise returned by the function. * @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 verification failed. A non-system application calls a 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 } 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. @@ -905,14 +915,19 @@ declare namespace installer { * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE. * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_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 } hapFilePaths - Indicates the path where the HAP of the application is stored. * @param { InstallParam } [installParam] - Indicates other parameters required for the installation. * @returns { Promise } the promise returned by the function. * @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 verification failed. A non-system application calls a 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 } 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. -- Gitee