diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index a10c7491c853af1d0500294cc8b83e3aa83dbc35..1bdaaf0931ee9337aed24919c461bf3e6cb46314 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -726,6 +726,32 @@ declare namespace bundle { */ function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Promise; + + /** + * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param moduleName Indicates the moduleName of the application. + * @param abilityName Indicates the abilityName of the application. + * @param metadataName Indicates the name of metadata in ability. + * @return Returns string in json-format of the corresponding config file. + */ + function getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback>): void; + function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise>; + + /** + * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param moduleName Indicates the moduleName of the application. + * @param extensionAbilityName Indicates the extensionAbilityName of the application. + * @param metadataName Indicates the name of metadata in ability. + * @return Returns string in json-format of the corresponding config file. + */ + function getProfileByExAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback>): void; + function getProfileByExAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise>; } export default bundle;