From 4fb1943e489f2e4c98c08ee8b6fc5918180211ff Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Fri, 20 Jun 2025 17:31:00 +0800 Subject: [PATCH] arkts1.2 bms sdk Signed-off-by: lanhaoyu --- api/@ohos.bundle.bundleManager.d.ts | 68 ++++++++++++------- api/bundleManager/PluginBundleInfo.d.ts | 39 +++++++---- .../RecoverableApplicationInfo.d.ts | 24 ++++--- api/bundleManager/SharedBundleInfo.d.ts | 30 +++++--- 4 files changed, 107 insertions(+), 54 deletions(-) diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index d0af29e65a..7bb6ddb80d 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -23,11 +23,11 @@ import { Metadata as _Metadata } from './bundleManager/Metadata'; import { ElementName as _ElementName } from './bundleManager/ElementName'; import Want from './@ohos.app.ability.Want'; import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef'; +import { PluginBundleInfo as _PluginBundleInfo, PluginModuleInfo as _PluginModuleInfo} from './bundleManager/PluginBundleInfo'; +import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo'; /*** if arkts 1.1 */ import type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; -import { PluginBundleInfo as _PluginBundleInfo, PluginModuleInfo as _PluginModuleInfo} from './bundleManager/PluginBundleInfo'; -import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo'; import type { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo'; import * as _AbilityInfo from './bundleManager/AbilityInfo'; import * as _AppProvisionInfo from './bundleManager/AppProvisionInfo'; @@ -39,6 +39,7 @@ import * as _Skill from './bundleManager/Skill'; /*** if arkts 1.2 */ import { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; +import { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo'; import { AbilityInfo as _AbilityInfo, WindowSize as _WindowSize } from './bundleManager/AbilityInfo'; import { AppProvisionInfo as _AppProvisionInfo, Validity as _Validity } from './bundleManager/AppProvisionInfo'; import { BundleInfo as _BundleInfo, UsedScene as _UsedScene, ReqPermissionDetail as _ReqPermissionDetail, @@ -3145,7 +3146,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSharedBundleInfo(callback: AsyncCallback>): void; @@ -3158,7 +3160,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSharedBundleInfo(): Promise>; @@ -3176,7 +3179,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700002 - The specified moduleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSharedBundleInfo(bundleName: string, moduleName: string, callback: AsyncCallback>): void; @@ -3194,7 +3198,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700002 - The specified moduleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSharedBundleInfo(bundleName: string, moduleName: string): Promise>; @@ -3306,7 +3311,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAdditionalInfo(bundleName: string): string; @@ -3348,7 +3354,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: number): string; @@ -3365,7 +3372,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700303 - Failed to obtain extended resources. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getExtResource(bundleName: string): Promise>; @@ -3402,7 +3410,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700305 - Failed to disable the dynamic icon. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function disableDynamicIcon(bundleName: string): Promise; @@ -3450,7 +3459,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700201 - Failed to verify the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean, callback: AsyncCallback): void; @@ -3480,7 +3490,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700201 - Failed to verify the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean): Promise; @@ -3493,7 +3504,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRecoverableApplicationInfo(callback: AsyncCallback>): void; @@ -3506,7 +3518,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRecoverableApplicationInfo(): Promise>; @@ -3524,7 +3537,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700053 - The caller is not AppGallery. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAdditionalInfo(bundleName: string, additionalInfo: string): void; @@ -3552,7 +3566,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700202 - Failed to delete the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteAbc(abcPath: string): Promise; @@ -3614,7 +3629,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDeveloperIds(appDistributionType?: number): Array; @@ -3722,7 +3738,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllPluginInfo(hostBundleName: string, userId?: number): Promise>; @@ -3744,7 +3761,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700086 - System error occurred during copy execution. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function migrateData(sourcePaths: Array, destinationPath: string): Promise; @@ -4178,7 +4196,8 @@ declare namespace bundleManager { * @typedef { _SharedBundleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export type SharedBundleInfo = _SharedBundleInfo; @@ -4230,7 +4249,8 @@ declare namespace bundleManager { * @typedef { _RecoverableApplicationInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type RecoverableApplicationInfo = _RecoverableApplicationInfo; @@ -4293,7 +4313,8 @@ declare namespace bundleManager { * @typedef { _PluginBundleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PluginBundleInfo = _PluginBundleInfo; @@ -4303,7 +4324,8 @@ declare namespace bundleManager { * @typedef { _PluginModuleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PluginModuleInfo = _PluginModuleInfo; } diff --git a/api/bundleManager/PluginBundleInfo.d.ts b/api/bundleManager/PluginBundleInfo.d.ts index d3bc13ecb8..40933b54af 100644 --- a/api/bundleManager/PluginBundleInfo.d.ts +++ b/api/bundleManager/PluginBundleInfo.d.ts @@ -24,7 +24,8 @@ * @typedef PluginBundleInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PluginBundleInfo { /** @@ -34,7 +35,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label: string; @@ -45,7 +47,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly labelId: number; @@ -56,7 +59,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly icon: string; @@ -67,7 +71,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly iconId: number; @@ -78,7 +83,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly pluginBundleName: string; @@ -89,7 +95,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly versionCode: number; @@ -100,7 +107,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly versionName: string; @@ -111,7 +119,8 @@ export interface PluginBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly pluginModuleInfos: Array; } @@ -122,7 +131,8 @@ export interface PluginBundleInfo { * @typedef PluginModuleInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PluginModuleInfo { /** @@ -132,7 +142,8 @@ export interface PluginModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -143,7 +154,8 @@ export interface PluginModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly descriptionId: number; @@ -154,7 +166,8 @@ export interface PluginModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly description: string; } \ No newline at end of file diff --git a/api/bundleManager/RecoverableApplicationInfo.d.ts b/api/bundleManager/RecoverableApplicationInfo.d.ts index 62b36b0eac..29b78aed38 100644 --- a/api/bundleManager/RecoverableApplicationInfo.d.ts +++ b/api/bundleManager/RecoverableApplicationInfo.d.ts @@ -26,7 +26,8 @@ import bundleManager from './../@ohos.bundle.bundleManager'; * @typedef RecoverableApplicationInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RecoverableApplicationInfo { /** @@ -36,7 +37,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -47,7 +49,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -58,7 +61,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly labelId: number; @@ -69,7 +73,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly iconId: number; @@ -80,7 +85,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly systemApp: boolean; @@ -91,7 +97,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleType: bundleManager.BundleType; @@ -102,7 +109,8 @@ export interface RecoverableApplicationInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly codePaths: Array; } diff --git a/api/bundleManager/SharedBundleInfo.d.ts b/api/bundleManager/SharedBundleInfo.d.ts index 3e8078810f..4065fc3925 100644 --- a/api/bundleManager/SharedBundleInfo.d.ts +++ b/api/bundleManager/SharedBundleInfo.d.ts @@ -27,7 +27,8 @@ import bundleManager from '../@ohos.bundle.bundleManager'; * @typedef SharedBundleInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SharedBundleInfo { /** @@ -37,7 +38,8 @@ export interface SharedBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -48,7 +50,8 @@ export interface SharedBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly compatiblePolicy: bundleManager.CompatiblePolicy; @@ -59,7 +62,8 @@ export interface SharedBundleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly sharedModuleInfo: Array; } @@ -70,7 +74,8 @@ export interface SharedBundleInfo { * @typedef SharedModuleInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SharedModuleInfo { /** @@ -80,7 +85,8 @@ export interface SharedModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -91,7 +97,8 @@ export interface SharedModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly versionCode: number; @@ -102,7 +109,8 @@ export interface SharedModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly versionName: string; @@ -113,7 +121,8 @@ export interface SharedModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly description: string; @@ -124,7 +133,8 @@ export interface SharedModuleInfo { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly descriptionId: number; } -- Gitee