diff --git a/BUILD.gn b/BUILD.gn index 5cdbddc5e7d0576f63d9ba33f73ee4167fb6c074..cf189966f70dc9cd3e36351f129f66397131cd1a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -137,6 +137,16 @@ ohos_copy("common_api") { module_install_name = "" } +ohos_copy("bundle_api") { + sources = [ + "api/bundle/bundleFlag.d.ts", + "api/bundle/bundleStatusCallback.d.ts", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} + template("ohos_declaration_template") { forward_variables_from(invoker, "*") action_with_pydeps(target_name) { diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index d63c553cd36b2782a8af95f2d8be6aa0bf9e7782..2c977e8e71e615a7cd8009efdec10c20dd6c8756 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -43,7 +43,23 @@ declare namespace bundle { enum BundleFlag { GET_BUNDLE_DEFAULT = 0x00000000, GET_BUNDLE_WITH_ABILITIES = 0x00000001, + GET_ABILITY_INFO_WITH_PERMISSION = 0x00000002, + GET_ABILITY_INFO_WITH_APPLICATION = 0x00000004, GET_APPLICATION_INFO_WITH_PERMISSION = 0x00000008, + GET_BUNDLE_WITH_REQUESTED_PERMISSION = 0x00000010, + GET_ALL_APPLICATION_INFO = 0xFFFF0000, + /** + * @since 8 + */ + GET_ABILITY_INFO_WITH_METADATA = 0x00000020, + /** + * @since 8 + */ + GET_APPLICATION_INFO_WITH_METADATA = 0x00000040, + /** + * @since 8 + */ + GET_ABILITY_INFO_SYSTEMAPP_ONLY = 0x00000080, } /** @@ -194,6 +210,7 @@ declare namespace bundle { STATUS_UNINSTALL_FAILURE_CONFLICT = 10, STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT = 0x0B, STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED = 0x0C, + STATUS_RECOVER_FAILURE_INVALID = 0x0D, STATUS_ABILITY_NOT_FOUND = 0x40, STATUS_BMS_SERVICE_ERROR = 0x41 } @@ -270,7 +287,8 @@ declare namespace bundle { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO */ function queryAbilityByWant(want: Want, bundleFlags: number, userId: number, callback: AsyncCallback>): void; - function queryAbilityByWant(want: Want, bundleFlags: number, userId:number): Promise>; + function queryAbilityByWant(want: Want, bundleFlags: number, callback: AsyncCallback>): void; + function queryAbilityByWant(want: Want, bundleFlags: number, userId?:number): Promise>; /** * Obtains BundleInfo of all bundles available in the system. @@ -360,6 +378,50 @@ declare namespace bundle { */ function getModuleUsageRecords(maxNum: number, callback: AsyncCallback>): void; function getModuleUsageRecords(maxNum: number): Promise>; + + /** + * Clears cache data of a specified application. + * + * @devices phone, tablet, tv, wearable, car + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param bundleName Indicates the bundle name of the application whose cache data is to be cleared. + * @param callback Indicates the callback to be invoked for returning the operation result. + * @permission ohos.permission.REMOVE_CACHE_FILES + * @systemapi Hide this for inner system use + */ + function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback): void; + function cleanBundleCacheFiles(bundleName: string): Promise; + + /** + * Sets whether to enable a specified application. + * + * @devices phone, tablet, tv, wearable, car + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param bundleName Indicates the bundle name of the application. + * @param isEnabled Specifies whether to enable the application. The value true means to enable it, and the + * value false means to disable it. + * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE + * @systemapi Hide this for inner system use + */ + function setApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback): void; + function setApplicationEnabled(bundleName: string, isEnable: boolean): Promise; + + /** + * Sets whether to enable a specified ability. + * + * @devices phone, tablet, tv, wearable, car + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param abilityInfo Indicates information about the ability to set. + * @param isEnabled Specifies whether to enable the ability. The value true means to enable it, and the + * value false means to disable it.. + * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE + * @systemapi Hide this for inner system use + */ + function setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback): void; + function setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise; } -export default bundle; +export default bundle; \ No newline at end of file diff --git a/api/@ohos.bundle.innerBundleManager.d.ts b/api/@ohos.bundle.innerBundleManager.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1485e16ec96802bad507590d16d080233b5f4de3 --- /dev/null +++ b/api/@ohos.bundle.innerBundleManager.d.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback, Callback } from './basic'; +import { BundleStatusCallback } from './bundle/bundleStatusCallback'; +import { LauncherAbilityInfo} from './bundle/launcherAbilityInfo'; +import { ShortcutInfo } from './bundle/shortcutInfo'; + +/** + * inner bundle manager. + * @name innerBundleManager + * @since 8 + * @sysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable + * @permission NA + * @systemapi Hide this for inner system use + */ + +declare namespace innerBundleManager { + /** + * Obtains based on a given bundleName and userId. + * + * @devices phone, tablet, tv, wearable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param bundleName Indicates the application bundle name to be queried. + * @param userId Indicates the id for the user. + * @return Returns the LauncherAbilityInfo object. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @systemapi Hide this for inner system use + */ + function getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback>) : void; + function getLauncherAbilityInfos(bundleName: string, userId: number) : Promise>; + + /** + * Register Callback. + * + * @devices phone, tablet, tv, wearable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param type Indicates the command should be implement. + * @param LauncherStatusCallback Indicates the callback to be register. + * @return Returns the result or error maeeage. + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @systemapi Hide this for inner system use + */ + function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback) : void; + function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Promise; + + /** + * UnRegister Callback. + * + * @devices phone, tablet, tv, wearable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param type Indicates the command should be implement. + * @return Returns the result or error maeeage. + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @systemapi Hide this for inner system use + */ + function off(type:"BundleStatusChange", callback: AsyncCallback) : void; + function off(type:"BundleStatusChange"): Promise; + + /** + * Obtains based on a given userId. + * + * @devices phone, tablet, tv, wearable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param userId Indicates the id for the user. + * @return Returns the LauncherAbilityInfo object. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @systemapi Hide this for inner system use + */ + function getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback>) : void; + function getAllLauncherAbilityInfos(userId: number) : Promise>; + + /** + * Obtains based on a given bundleName. + * + * @devices phone, tablet, tv, wearable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @param bundleName Indicates the application bundle name to be queried. + * @return Returns the LauncherShortcutInfo object. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @systemapi Hide this for inner system use + */ + function getShortcutInfos(bundleName :string, callback: AsyncCallback>) : void; + function getShortcutInfos(bundleName : string) : Promise>; +} + +export default innerBundleManager; \ No newline at end of file diff --git a/api/bundle/abilityInfo.d.ts b/api/bundle/abilityInfo.d.ts index 7e6904ab2e9b5334be520f325e11a744210dd70b..a7cf71866bcd08b934e02b1cf224f4d6624c853f 100644 --- a/api/bundle/abilityInfo.d.ts +++ b/api/bundle/abilityInfo.d.ts @@ -241,4 +241,11 @@ export interface AbilityInfo { * @SysCap SystemCapability.Appexecfwk */ customizeData: Map>; + + /** + * @default Indicates the metadata of ability + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly metaData: Array; } diff --git a/api/bundle/applicationInfo.d.ts b/api/bundle/applicationInfo.d.ts index 4820474ef88f0c61f354a0d1d1d1c1cd6068d7bc..d57fbd7bc891e561202c1dbc797aa4d1e09fb394 100644 --- a/api/bundle/applicationInfo.d.ts +++ b/api/bundle/applicationInfo.d.ts @@ -129,10 +129,31 @@ export interface ApplicationInfo { */ readonly entryDir: string; + /** + * @default Indicates the application source code path + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly codePath: string; + /** * @default Indicates the custom metadata of the application * @since 7 * @SysCap SystemCapability.Appexecfwk */ customizeData: Map; + + /** + * @default Indicates the metadata of module + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly metaData: Map>; + + /** + * @default Indicates whether or not this application may be removable + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly removable: boolean; } \ No newline at end of file diff --git a/api/bundle/bundleFlag.d.ts b/api/bundle/bundleFlag.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2c8c8cadc290158089c543d2ba876dedfc845a5 --- /dev/null +++ b/api/bundle/bundleFlag.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +declare enum BundleFlag { + GET_BUNDLE_DEFAULT = 0x00000000, + GET_BUNDLE_WITH_ABILITIES = 0x00000001, + GET_ABILITY_INFO_WITH_PERMISSION = 0x00000002, + GET_ABILITY_INFO_WITH_APPLICATION = 0x00000004, + GET_APPLICATION_INFO_WITH_PERMISSION = 0x00000008, + GET_BUNDLE_WITH_REQUESTED_PERMISSION = 0x00000010, + GET_ALL_APPLICATION_INFO = 0xFFFF0000, + /** + * @since 8 + */ + GET_ABILITY_INFO_WITH_METADATA = 0x00000020, + /** + * @since 8 + */ + GET_APPLICATION_INFO_WITH_METADATA = 0x00000040, + /** + * @since 8 + */ + GET_ABILITY_INFO_SYSTEMAPP_ONLY = 0x00000080, + } \ No newline at end of file diff --git a/api/bundle/bundleInstaller.d.ts b/api/bundle/bundleInstaller.d.ts index 5cdfc48f780c946ee46ceef7d3c1c80c08aab26f..8e4e1b8737ce1c18d1fea4b25467a5970b8bb732 100644 --- a/api/bundle/bundleInstaller.d.ts +++ b/api/bundle/bundleInstaller.d.ts @@ -104,4 +104,18 @@ export interface BundleInstaller { * @permission ohos.permission.INSTALL_BUNDLE */ uninstall(bundleName: string, param: InstallParam, callback: AsyncCallback): void; + + /** + * recover an application. + * + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @param bundleName Indicates the bundle name of the application to be recovered. + * @param installParam Indicates other parameters required for the recover. + * @return InstallStatus + * @permission ohos.permission.INSTALL_BUNDLE + * @systemapi Hide this for inner system use + */ + recover(bundleName: string, param: InstallParam, callback: AsyncCallback): void; } \ No newline at end of file diff --git a/api/bundle/bundleStatusCallback.d.ts b/api/bundle/bundleStatusCallback.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..50a88315d1f5d4d3ae771818e34a9f6f1151a8cd --- /dev/null +++ b/api/bundle/bundleStatusCallback.d.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Contains basic Ability information, which uniquely identifies an launcher StatusCallback. + * You can use this class to obtain values of the fields set in an callback function, + * such as the add, update, remove. + * @name Contains basic launcher status callback information, which uniquely identifies an LauncherStatusCallback + * @since 8 + * @sysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @systemapi Hide this for inner system use + */ +export interface BundleStatusCallback { + /** + * @name Obtains add callback about an launcherStatusCallback. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @devices phone, tablet, tv, wearable, car + * @systemapi Hide this for inner system use + */ + add: (bundleName : string, userId: number) => void; + + /** + * @name Obtains update callback about an launcherStatusCallback. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @devices phone, tablet, tv, wearable, car + * @systemapi Hide this for inner system use + */ + update: (bundleName : string, userId: number) => void; + + /** + * @name Obtains remove callback about an launcherStatusCallback. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission ohos.permission.LISTEN_BUNDLE_CHANGE + * @devices phone, tablet, tv, wearable, car + * @systemapi Hide this for inner system use + */ + remove: (bundleName : string, userId: number) => void; +} \ No newline at end of file diff --git a/api/bundle/customizeData.d.ts b/api/bundle/customizeData.d.ts index 17393229f1f5d422e1f3414d622b81f5ed62f950..66b03f5941c3c103a130cc8c688a0aaf2d197042 100644 --- a/api/bundle/customizeData.d.ts +++ b/api/bundle/customizeData.d.ts @@ -20,18 +20,25 @@ * @permission NA * @devices phone, tablet, tv, wearable, car */ -export interface CustomizeData { - /** - * @default Indicates the custom metadata name - * @since 7 + export interface CustomizeData { + /** + * @default Indicates the custom metadata name + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + name: string; + + /** + * @default Indicates the custom metadata value + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + value: string; + + /** + * @default Indicates the custom metadata resource + * @since 8 * @SysCap SystemCapability.Appexecfwk */ - name: string; - - /** - * @default Indicates the custom metadata value - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - value: string; -} \ No newline at end of file + extra: string; + } \ No newline at end of file diff --git a/api/bundle/elementName.d.ts b/api/bundle/elementName.d.ts index 68fe8ddda30ce97a540b5385085f530008f6cba2..dc99f856a460174a04404894a87ebdb36e29c7eb 100644 --- a/api/bundle/elementName.d.ts +++ b/api/bundle/elementName.d.ts @@ -23,7 +23,7 @@ * @devices phone, tablet, tv, wearable, car * @permission N/A */ -export interface ElementName { + export interface ElementName { /** * device id * @default - diff --git a/api/bundle/launcherAbilityInfo.d.ts b/api/bundle/launcherAbilityInfo.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df270c97d913d77ae5ce589cda35b31d0cd96be0 --- /dev/null +++ b/api/bundle/launcherAbilityInfo.d.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Contains basic Ability information, which uniquely identifies an ability. + * You can use this class to obtain values of the fields set in an AbilityInfo, + * such as the application Info , elementName, labelId, iconId, userId, installTime. + * @name Contains basic launcher Ability information, which uniquely identifies an LauncherAbilityInfo + * @since 8 + * @sysCap SystemCapability.Appexecfwk + * @devices phone, tablet, tv, wearable, car + * @permission N/A + * @systemapi Hide this for inner system use + */ + +import { ApplicationInfo } from './applicationInfo'; +import { ElementName } from './elementName' + +export interface LauncherAbilityInfo { + /** + * @name Obtains application info information about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly applicationInfo: ApplicationInfo; + + /** + * @name Obtains element name about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly elementName : ElementName; + + /** + * @name Obtains labelId about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly labelId: number; + + /** + * @name Obtains iconId about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly iconId: number; + + /** + * @name Obtains userId about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly userId: number; + + /** + * @name Obtains installTime about an launcher ability. + * @since 8 + * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car + */ + readonly installTime : number; +} \ No newline at end of file diff --git a/api/bundle/moduleInfo.d.ts b/api/bundle/moduleInfo.d.ts index 437ca90fa900b5a314335a58234452900d3a78d8..b4d9ee36e9da6eab4a93b66f9f30e2350f87791f 100644 --- a/api/bundle/moduleInfo.d.ts +++ b/api/bundle/moduleInfo.d.ts @@ -20,7 +20,7 @@ * @permission NA * @devices phone, tablet, tv, wearable, car */ -export interface ModuleInfo { + export interface ModuleInfo { /** * The module name. * diff --git a/api/bundle/moduleUsageRecord.d.ts b/api/bundle/moduleUsageRecord.d.ts index 0bc3620102c1ad500749f468d6c1fc0b8aeec85b..6dded504ce0efb9d8b6366ee1bd3280586ccf47a 100644 --- a/api/bundle/moduleUsageRecord.d.ts +++ b/api/bundle/moduleUsageRecord.d.ts @@ -21,7 +21,7 @@ * @devices phone, tablet, tv, wearable, car * @systemapi hide this for inner system use */ -export interface ModuleUsageRecord { + export interface ModuleUsageRecord { /** * @default Indicates the name of the bundle containing the module * @since 7 diff --git a/api/bundle/shortcutInfo.d.ts b/api/bundle/shortcutInfo.d.ts index 0caaa904588090744952185e131400367a56fdac..77a67c96d54789f05aa60c5e4a5d99b091d2cd1d 100644 --- a/api/bundle/shortcutInfo.d.ts +++ b/api/bundle/shortcutInfo.d.ts @@ -21,87 +21,99 @@ * @permission NA * @devices phone, tablet, tv, wearable, car */ -export interface ShortcutWant{ - /** - * @default Indicates the target bundle of the shortcut want + export interface ShortcutWant{ + /** + * @default Indicates the target bundle of the shortcut want + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly targetBundle: string; + /** + * @default Indicates the target class of the shortcut want + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly targetClass: string; + } + + /** + * @name Provides information about a shortcut, including the shortcut ID and label. * @since 7 * @SysCap SystemCapability.Appexecfwk + * @permission NA + * @devices phone, tablet, tv, wearable, car */ - readonly targetBundle: string; - /** - * @default Indicates the target class of the shortcut want - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly targetClass: string; -} - - /** - * @name Provides information about a shortcut, including the shortcut ID and label. - * @since 7 - * @SysCap SystemCapability.Appexecfwk - * @permission NA - * @devices phone, tablet, tv, wearable, car - */ -export interface ShortcutInfo { - /** - * @default Indicates the ID of the application to which this shortcut belongs - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly id: string; - /** - * @default Indicates the name of the bundle containing the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly bundleName: string; - /** - * @default Indicates the host ability of the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly hostAbility: string; - /** - * @default Indicates the icon of the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly icon: string; - /** - * @default Indicates the label of the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly label: string; - /** - * @default Indicates the disableMessage of the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly disableMessage: string; - /** - * @default Indicates the wants of the shortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly wants: Array; - /** - * @default Indicates whether the shortcut is static - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly isStatic?: boolean - /** - * @default Indicates whether the shortcut is homeshortcut - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly isHomeShortcut?: boolean; - /** - * @default Indicates whether the shortcut is enabled - * @since 7 - * @SysCap SystemCapability.Appexecfwk - */ - readonly isEnabled?: boolean; -} \ No newline at end of file + export interface ShortcutInfo { + /** + * @default Indicates the ID of the application to which this shortcut belongs + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly id: string; + /** + * @default Indicates the name of the bundle containing the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly bundleName: string; + /** + * @default Indicates the host ability of the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly hostAbility: string; + /** + * @default Indicates the icon of the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly icon: string; + /** + * @default Indicate s the icon id of the shortcut + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly iconId: number; + /** + * @default Indicates the label of the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly label: string; + /** + * @default Indicates the label id of the shortcut + * @since 8 + * @SysCap SystemCapability.Appexecfwk + */ + readonly labelId: number; + /** + * @default Indicates the disableMessage of the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly disableMessage: string; + /** + * @default Indicates the wants of the shortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly wants: Array; + /** + * @default Indicates whether the shortcut is static + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly isStatic?: boolean + /** + * @default Indicates whether the shortcut is homeshortcut + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly isHomeShortcut?: boolean; + /** + * @default Indicates whether the shortcut is enabled + * @since 7 + * @SysCap SystemCapability.Appexecfwk + */ + readonly isEnabled?: boolean; + } \ No newline at end of file