diff --git a/api/@ohos.bundle.appControl.d.ts b/api/@ohos.bundle.appControl.d.ts index bc1ce200b555fd36ac4692657eeed174e23f729a..66ab0dc4ac569fdc19794d055a0fd7a1152097e6 100644 --- a/api/@ohos.bundle.appControl.d.ts +++ b/api/@ohos.bundle.appControl.d.ts @@ -286,6 +286,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ export interface DisposedRuleConfiguration { /** @@ -295,18 +296,20 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ appId: string; /** * Indicates the index of clone app. * - * @type { number } + * @type { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - appIndex: number; + appIndex: int; /** * Indicates the rule for interception. @@ -315,6 +318,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ disposedRule: DisposedRule; } @@ -641,6 +645,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function setDisposedRules(disposedRuleConfigurations: Array): void; } diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index ec4528274f6cfe68c83e335b797744bb06dfad0b..f37ee52072b4c7ce1be256024d0f7b266cd1a9e4 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -43,7 +43,8 @@ import { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bun 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, - SignatureInfo as _SignatureInfo, AppCloneIdentity as _AppCloneIdentity } from './bundleManager/BundleInfo'; + SignatureInfo as _SignatureInfo, AppCloneIdentity as _AppCloneIdentity, + DynamicIconInfo as _DynamicIconInfo, BundleOptions as _BundleOptions} from './bundleManager/BundleInfo'; import { HapModuleInfo as _HapModuleInfo, PreloadItem as _PreloadItem, Dependency as _Dependency, RouterItem as _RouterItem, DataItem as _DataItem } from './bundleManager/HapModuleInfo'; import { ExtensionAbilityInfo as _ExtensionAbilityInfo } from './bundleManager/ExtensionAbilityInfo'; @@ -2469,15 +2470,16 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_ABILITY_INFO * @param { string } uri - Indicates the uri used for matching ability. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. * @returns { Promise> } Returns a list of AbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 17700003 - The ability is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - function getAbilityInfo(uri: string, abilityFlags: number): Promise>; + function getAbilityInfo(uri: string, abilityFlags: int): Promise>; /** * Query extension info of by utilizing a Want. @@ -3892,6 +3894,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function enableDynamicIcon(bundleName: string, moduleName: string, option?: BundleOptions): Promise; @@ -3933,6 +3936,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function disableDynamicIcon(bundleName: string, option?: BundleOptions): Promise; @@ -3967,6 +3971,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function getDynamicIconInfo(bundleName: string): Promise>; @@ -3978,7 +3983,7 @@ declare namespace bundleManager { * ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS need to be applied for. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } [userId] - Indicates the user id, default value is to query all users. + * @param { int } [userId] - Indicates the user id, default value is to query all users. * @returns { Promise> } Returns a list of DynamicIconInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3987,8 +3992,9 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getAllDynamicIconInfo(userId?: number): Promise>; + function getAllDynamicIconInfo(userId?: int): Promise>; /** * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. @@ -4328,7 +4334,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { string } Returns the sandbox data directory. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -4337,8 +4343,9 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getSandboxDataDir(bundleName: string, appIndex: number): string; + function getSandboxDataDir(bundleName: string, appIndex: int): string; /** * Obtains AppCloneIdentity contains bundleName and appIndex by the sandbox data directory. @@ -4348,6 +4355,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function getAppCloneIdentityBySandboxDataDir(sandboxDataDir: string): AppCloneIdentity; @@ -5016,6 +5024,17 @@ declare namespace bundleManager { */ export type DynamicIconInfo = _BundleInfo.DynamicIconInfo; + /** + * Contains dynamic icon. + * + * @typedef { _DynamicIconInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type DynamicIconInfo = _DynamicIconInfo; + /** * Contains bundle options. * @@ -5025,6 +5044,17 @@ declare namespace bundleManager { * @since 20 */ export type BundleOptions = _BundleInfo.BundleOptions; + + /** + * Contains bundle options. + * + * @typedef { _BundleOptions } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type BundleOptions = _BundleOptions; } export default bundleManager; diff --git a/api/@ohos.bundle.bundleResourceManager.d.ts b/api/@ohos.bundle.bundleResourceManager.d.ts index 396e13838630560cfd7ee2cc56c5d5438ff592fb..d817c8e4e6d77e462142667878783d3813ac42a1 100644 --- a/api/@ohos.bundle.bundleResourceManager.d.ts +++ b/api/@ohos.bundle.bundleResourceManager.d.ts @@ -27,6 +27,7 @@ import type { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from import { AsyncCallback } from './@ohos.base'; import { BundleResourceInfo as _BundleResourceInfo } from './bundleManager/BundleResourceInfo'; import { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from './bundleManager/LauncherAbilityResourceInfo'; +import bundleManager from './@ohos.bundle.bundleManager'; /*** endif */ /** @@ -260,9 +261,9 @@ declare namespace bundleResourceManager { * @param { string } bundleName - Indicates the bundle name of the application. * @param { bundleManager.ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. *
Currently only supported ExtensionAbilityType::INPUTMETHOD,ExtensionAbilityType::SHARE,ExtensionAbilityType::ACTION. - * @param { number } resourceFlags - Indicates the flag used to specify information. + * @param { int } resourceFlags - Indicates the flag used to specify information. *
Contained in the ExtensionAbilityResourceInfo object that will be returned. - * @param { number } [appIndex] - Indicates the index of the bundle. + * @param { int } [appIndex] - Indicates the index of the bundle. * @returns { Array } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -271,8 +272,9 @@ declare namespace bundleResourceManager { * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: number, appIndex?: number): 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.launcherBundleManager.d.ts b/api/@ohos.bundle.launcherBundleManager.d.ts index 09150c126bdf6a9912cfd5bd588d758dd1f425f8..71215a818969cdc4ef3244855649c59ef06ac02c 100644 --- a/api/@ohos.bundle.launcherBundleManager.d.ts +++ b/api/@ohos.bundle.launcherBundleManager.d.ts @@ -209,7 +209,7 @@ declare namespace launcherBundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { Array } the ShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -221,7 +221,7 @@ declare namespace launcherBundleManager { * @since 20 * @arkts 1.1&1.2 */ - function getShortcutInfoByAppIndex(bundleName: string, appIndex: number): Array; + function getShortcutInfoByAppIndex(bundleName: string, appIndex: int): Array; /** * Starts shortcut. @@ -257,6 +257,7 @@ declare namespace launcherBundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function startShortcutWithReason(shortcutInfo: ShortcutInfo, startReason: string, options?: StartOptions): Promise; diff --git a/api/@ohos.bundle.shortcutManager.d.ts b/api/@ohos.bundle.shortcutManager.d.ts index bc479a11a82e9b1b7024dec44e2f7a24deed0409..13b322cfff2540b9a09b2faf32fd889c11e5d667 100644 --- a/api/@ohos.bundle.shortcutManager.d.ts +++ b/api/@ohos.bundle.shortcutManager.d.ts @@ -103,6 +103,7 @@ declare namespace shortcutManager { * @throws { BusinessError } 17700070 - The specified shortcut id is illegal. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @since 20 + * @arkts 1.1&1.2 */ function setShortcutVisibleForSelf(id: string, visible: boolean): Promise; @@ -112,6 +113,7 @@ declare namespace shortcutManager { * @returns { Promise> } The LauncherShortcutInfo object. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @since 20 + * @arkts 1.1&1.2 */ function getAllShortcutInfoForSelf(): Promise>; diff --git a/api/bundleManager/BundleInfo.d.ts b/api/bundleManager/BundleInfo.d.ts index e29ef95d1bce31b54144983c5d58df2ca7b14bee..a24c6bbc23561d245d886c85babbf55d4c207d18 100644 --- a/api/bundleManager/BundleInfo.d.ts +++ b/api/bundleManager/BundleInfo.d.ts @@ -842,6 +842,7 @@ export interface AppCloneIdentity { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ export interface DynamicIconInfo { /** @@ -852,6 +853,7 @@ export interface DynamicIconInfo { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -863,30 +865,33 @@ export interface DynamicIconInfo { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ readonly moduleName: string; /** * Indicates the user id of the bundle. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - readonly userId: number; + readonly userId: int; /** * Indicates the index of the bundle. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - readonly appIndex: number; + readonly appIndex: int; } /** @@ -896,25 +901,28 @@ export interface DynamicIconInfo { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ export interface BundleOptions { /** * Indicates the user id. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - userId?: number; + userId?: int; /** * Indicates the app index. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - appIndex?: number; + appIndex?: int; } diff --git a/api/bundleManager/ShortcutInfo.d.ts b/api/bundleManager/ShortcutInfo.d.ts index 8f3c9571c59d2bc2b0e99c22395d518e97dde9c0..f19e3f3fd0115ca0717fc28df3e34927f75034f2 100644 --- a/api/bundleManager/ShortcutInfo.d.ts +++ b/api/bundleManager/ShortcutInfo.d.ts @@ -320,6 +320,7 @@ export interface ShortcutInfo { * @type { ?boolean } * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @since 20 + * @arkts 1.1&1.2 */ visible?: boolean; }