1 Star 0 Fork 4K

Feng Lin/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.bundle.installer.d.ts 118.49 KB
一键复制 编辑 原始数据 按行查看 历史
amao 提交于 2024-09-20 11:28 +08:00 . 添加注释
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587
/*
* Copyright (c) 2022 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.
*/
/**
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
/**
* Support install, upgrade, remove and recover bundles on the devices.
*
* @namespace installer
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
declare namespace installer {
/**
* Obtains the interface used to install bundle.
*
* @param { AsyncCallback<BundleInstaller> } callback - The callback of BundleInstaller object.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void;
/**
* Obtains the interface used to install bundle.
*
* @returns { Promise<BundleInstaller> } BundleInstaller object.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
function getBundleInstaller(): Promise<BundleInstaller>;
/**
* Obtains the interface used to install bundle.
*
* @returns { BundleInstaller } BundleInstaller object.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
function getBundleInstallerSync(): BundleInstaller;
/**
* Bundle installer interface, include install uninstall recover.
*
* @interface BundleInstaller
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
interface BundleInstaller {
/**
* Install haps for an application.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - The callback of installing haps result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 denied, non-system app called 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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 denied, non-system app called 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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* 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
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
install(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
/**
* Install haps for an application.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
* @param { AsyncCallback<void> } callback - The callback of installing haps result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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 denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Install HAPs for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* 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
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
* @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.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
install(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
/**
* Install haps for an application.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Install haps for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @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 denied, non-system app called 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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Install haps for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @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 denied, non-system app called 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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
/**
* Install haps for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* To install an enterprise normal application, you must have the permission 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<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } [installParam] - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Install haps for an application.
* To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
* To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
* To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
* 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
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } [installParam] - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
* @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
* @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
* @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
* @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
install(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
uninstall(bundleName: string, callback: AsyncCallback<void>): void;
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Uninstall an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
* @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
* @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
* @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
uninstall(bundleName: string, installParam?: InstallParam): Promise<void>;
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
* <br>from being installed on this device or by specified users.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { AsyncCallback<void> } callback - The callback of recovering application result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
* <br>from being installed on this device or by specified users.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
recover(bundleName: string, callback: AsyncCallback<void>): void;
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
/**
* Recover an application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be recovered.
* @param { InstallParam } installParam - Indicates other parameters required for the recover.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700004 - The specified user ID is not found.
* @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
* <br>from being installed on this device or by specified users.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
recover(bundleName: string, installParam?: InstallParam): Promise<void>;
/**
* Uninstall a shared bundle.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
* @param { AsyncCallback<void> } callback - The callback of uninstalling shared bundle result.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
* @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
uninstall(uninstallParam: UninstallParam, callback: AsyncCallback<void>): void;
/**
* Uninstall a shared bundle.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
* @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
* @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
uninstall(uninstallParam: UninstallParam): Promise<void>;
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
updateBundleForSelf(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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.
* @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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
updateBundleForSelf(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
/**
* Updates this enterprise application.
*
* @permission ohos.permission.INSTALL_SELF_BUNDLE
* @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
* @param { InstallParam } installParam - Indicates other parameters required for the installation.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_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 } 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.
* @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
* @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
* @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
* @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
* @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
* @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
* @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
* @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
* @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
* (required APL: system_basic or system_core).
* @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
* @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
* @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
* @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
* @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
* @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
updateBundleForSelf(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
/**
* Uninstall updates for a pre-installed application.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates.
* @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @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.
* @throws { BusinessError } 17700001 - The specified bundle name is not found.
* @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
* @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise<void>;
/**
* Add extend resources.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundleName.
* @param { Array<string> } filePaths - Indicates the file path for extend resources.
* @returns { Promise<void> } Returns addExtResource result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
* @throws { BusinessError } 17700301 - AddExtResource failed due to parse file failed.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
addExtResource(bundleName: string, filePaths: Array<string>): Promise<void>;
/**
* Remove extend resources.
*
* @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundleName.
* @param { Array<string> } moduleNames - Indicates the moduleNames for extend resources.
* @returns { Promise<void> } Returns removeExtResource result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 17700001 - The specified bundleName is not found.
* @throws { BusinessError } 17700302 - RemoveExtResource failed due to module does not exist.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
removeExtResource(bundleName: string, moduleNames: Array<string>): Promise<void>;
/**
* Create clone instance for an application.
*
* @permission ohos.permission.INSTALL_CLONE_BUNDLE
* @param { string } bundleName - Indicates the path where the HAP of the application is stored.
* @param { CreateAppCloneParam } [createAppCloneParam] Indicates the optional params of create clone app.
* @returns { Promise<number> } Return the appIndex of the clone application.
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_CLONE_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.
* @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
* @throws { BusinessError } 17700004 - The userId is invalid.
* @throws { BusinessError } 17700061 - The appIndex is not in valid range or already exists.
* @throws { BusinessError } 17700069 - The app does not support the creation of an appClone instance.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise<number>;
/**
* Destroy clone instance for an application.
*
* @permission ohos.permission.UNINSTALL_CLONE_BUNDLE
* @param { string } bundleName - Indicates the path where the HAP of the application is stored.
* @param { number } appIndex - Indicates the clone application's index.
* @param { number } [userId] - userId Indicates the user ID.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.UNINSTALL_CLONE_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.
* @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
* @throws { BusinessError } 17700004 - The userId is invalid.
* @throws { BusinessError } 17700061 - AppIndex not in valid range.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
destroyAppClone(bundleName: string, appIndex: number, userId?: number): Promise<void>;
/**
* Install application by bundle name with specified user.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of application.
* @param { number } [userId] - userId Indicates the user ID.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_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.
* @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
* @throws { BusinessError } 17700004 - The userId is invalid.
* @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
/**
* Install application by bundle name with specified user.
*
* @permission ohos.permission.INSTALL_BUNDLE
* @param { string } bundleName - Indicates the bundle name of application.
* @param { number } [userId] - userId Indicates the user ID.
* @returns { Promise<void> }
* @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_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.
* @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
* @throws { BusinessError } 17700004 - The userId is invalid.
* @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
* @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
* <br>from being installed on this device or by specified users.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 13
*/
installPreexistingApp(bundleName: string, userId?: number): Promise<void>;
}
/**
* Provides parameters required for hashParam.
*
* @typedef HashParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
export interface HashParam {
/**
* Indicates the moduleName
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
moduleName: string;
/**
* Indicates the hash value
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
hashValue: string;
}
/**
* Provides parameters required for VerifyCodeParam.
*
* @typedef VerifyCodeParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
* @deprecated since 11
*/
export interface VerifyCodeParam {
/**
* Indicates the moduleName which hopes to be processed with code signature.
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
* @deprecated since 11
*/
moduleName: string;
/**
* Indicates the path where the code signature file of the corresponding HAP is stored.
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
* @deprecated since 11
*/
signatureFilePath: string;
}
/**
* Provides parameters required for PGOParam.
*
* @typedef PGOParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
export interface PGOParam {
/**
* Indicates the moduleName that need to store profile-guided optimization(PGO) file.
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
moduleName: string;
/**
* Indicates the path where the profile-guided optimization(PGO) file is stored.
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
pgoFilePath: string;
}
/**
* Provides parameters required for installing or uninstalling an application.
*
* @typedef InstallParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
export interface InstallParam {
/**
* Indicates the user id
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
userId?: number;
/**
* Indicates the installation type. The value 0x00 means normal installation, 0x01 means overwrite installation, and 0x10 means installation-free.
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
installFlag?: number;
/**
* Indicates whether the param has data
*
* @type { ?boolean }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
isKeepData?: boolean;
/**
* Indicates the hash params
*
* @type { ?Array<HashParam> }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
hashParams?: Array<HashParam>;
/**
* Indicates the deadline of the crowdtesting bundle
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 9
*/
crowdtestDeadline?: number;
/**
* Indicates the shared bundle dir paths.
*
* @type { ?Array<String> }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
sharedBundleDirPaths?: Array<String>;
/**
* Indicates the distribution type specified during bundle installation.
*
* @type { ?string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
specifiedDistributionType?: string;
/**
* Indicates the additional information during bundle installation.
*
* @type { ?string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
additionalInfo?: string;
/**
* Indicates the verification code param.
*
* @type { ?Array<VerifyCodeParam> }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
* @deprecated since 11
*/
verifyCodeParams?: Array<VerifyCodeParam>;
/**
* Indicates the profile-guided optimization(PGO) params.
*
* @type { ?Array<PGOParam> }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
pgoParams?: Array<PGOParam>;
}
/**
* Provides parameters required for uninstalling shared bundle.
*
* @typedef UninstallParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
export interface UninstallParam {
/**
* Indicates the shared bundle name
*
* @type { string }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
bundleName: string;
/**
* Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 10
*/
versionCode?: number;
}
/**
* Provides parameters required for creating clone app.
*
* @typedef CreateAppCloneParam
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
export interface CreateAppCloneParam {
/**
* Indicates the user id
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
userId?: number;
/**
* Indicates the appIndex of MultiApp
*
* @type { ?number }
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 12
*/
appIndex?: number;
}
}
export default installer;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lffl8796/interface_sdk-js.git
git@gitee.com:lffl8796/interface_sdk-js.git
lffl8796
interface_sdk-js
interface_sdk-js
master

搜索帮助