• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22
23/**
24 * Support install, upgrade, remove and recover bundles on the devices.
25 *
26 * @namespace installer
27 * @syscap SystemCapability.BundleManager.BundleFramework.Core
28 * @systemapi
29 * @since 9
30 */
31declare namespace installer {
32  /**
33   * Obtains the interface used to install bundle.
34   *
35   * @param { AsyncCallback<BundleInstaller> } callback - The callback of BundleInstaller object.
36   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
37   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types.
38   * @syscap SystemCapability.BundleManager.BundleFramework.Core
39   * @systemapi
40   * @since 9
41   */
42  function getBundleInstaller(callback: AsyncCallback<BundleInstaller>): void;
43
44  /**
45   * Obtains the interface used to install bundle.
46   *
47   * @returns { Promise<BundleInstaller> } BundleInstaller object.
48   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
49   * @syscap SystemCapability.BundleManager.BundleFramework.Core
50   * @systemapi
51   * @since 9
52   */
53  function getBundleInstaller(): Promise<BundleInstaller>;
54
55  /**
56   * Obtains the interface used to install bundle.
57   *
58   * @returns { BundleInstaller } BundleInstaller object.
59   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
60   * @syscap SystemCapability.BundleManager.BundleFramework.Core
61   * @systemapi
62   * @since 10
63   */
64  function getBundleInstallerSync(): BundleInstaller;
65
66  /**
67   * Bundle installer interface, include install uninstall recover.
68   *
69   * @interface BundleInstaller
70   * @syscap SystemCapability.BundleManager.BundleFramework.Core
71   * @systemapi
72   * @since 9
73   */
74  interface BundleInstaller {
75    /**
76     * Install haps for an application.
77     *
78     * @permission ohos.permission.INSTALL_BUNDLE
79     * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
80     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
81     * @param { AsyncCallback<void> } callback - The callback of installing haps result.
82     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
83     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
84     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
85     * @throws { BusinessError } 17700004 - The specified user ID is not found.
86     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
87     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
88     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
89     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
90     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
91     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
92     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
93     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
94     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
95     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
96     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
97     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
98     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
99     *  (required APL: system_basic or system_core).
100     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
101     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
102     * @syscap SystemCapability.BundleManager.BundleFramework.Core
103     * @systemapi
104     * @since 9
105     */
106    /**
107     * Install HAPs for an application.
108     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
109     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
110     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
111     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
112     *
113     * @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
114     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
115     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
116     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
117     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
118     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
119     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
120     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
121     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
122     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
123     * @throws { BusinessError } 17700004 - The specified user ID is not found.
124     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
125     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
126     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
127     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
128     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
129     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
130     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
131     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
132     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
133     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
134     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
135     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
136     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
137     *  (required APL: system_basic or system_core).
138     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
139     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
140     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
141     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
142     * @syscap SystemCapability.BundleManager.BundleFramework.Core
143     * @systemapi
144     * @since 10
145     */
146    /**
147     * Install HAPs for an application.
148     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
149     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
150     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
151     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
152     *
153     * @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
154     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
155     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
156     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
157     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
158     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
159     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
160     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
161     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
162     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
163     * @throws { BusinessError } 17700004 - The specified user ID is not found.
164     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
165     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
166     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
167     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
168     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
169     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
170     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
171     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
172     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
173     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
174     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
175     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
176     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
177     *  (required APL: system_basic or system_core).
178     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
179     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
180     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
181     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
182     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
183     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
184     * @syscap SystemCapability.BundleManager.BundleFramework.Core
185     * @systemapi
186     * @since 11
187     */
188    /**
189     * Install HAPs for an application.
190     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
191     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
192     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
193     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
194     *
195     * @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
196     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
197     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
198     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
199     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
200     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
201     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
202     * @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.
203     * @throws { BusinessError } 17700004 - The specified user ID is not found.
204     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
205     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
206     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
207     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
208     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
209     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
210     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
211     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
212     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
213     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
214     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
215     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
216     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
217     *  (required APL: system_basic or system_core).
218     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
219     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
220     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
221     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
222     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
223     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
224     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
225     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
226     * @syscap SystemCapability.BundleManager.BundleFramework.Core
227     * @systemapi
228     * @since 12
229     */
230    /**
231     * Install HAPs for an application.
232     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
233     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
234     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
235     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
236     * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE.
237     *
238     * @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
239     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
240     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
241     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
242     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
243     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
244     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
245     * @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.
246     * @throws { BusinessError } 17700004 - The specified user ID is not found.
247     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
248     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
249     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
250     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
251     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
252     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
253     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
254     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
255     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
256     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
257     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
258     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
259     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
260     *  (required APL: system_basic or system_core).
261     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
262     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
263     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
264     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
265     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
266     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
267     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
268     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
269     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
270     * <br>bundle name but different signature information exists on the device.
271     * @syscap SystemCapability.BundleManager.BundleFramework.Core
272     * @systemapi
273     * @since 13
274     */
275    install(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
276
277    /**
278     * Install haps for an application.
279     *
280     * @permission ohos.permission.INSTALL_BUNDLE
281     * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
282     * @param { AsyncCallback<void> } callback - The callback of installing haps result.
283     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
284     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
285     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
286     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
287     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
288     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
289     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
290     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
291     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
292     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
293     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
294     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
295     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
296     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
297     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
298     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
299     *  (required APL: system_basic or system_core).
300     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
301     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
302     * @syscap SystemCapability.BundleManager.BundleFramework.Core
303     * @systemapi
304     * @since 9
305     */
306    /**
307     * Install HAPs for an application.
308     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
309     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
310     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
311     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
312     *
313     * @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
314     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
315     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
316     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
317     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
318     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
319     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
320     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
321     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
322     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
323     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
324     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
325     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
326     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
327     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
328     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
329     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
330     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
331     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
332     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
333     *  (required APL: system_basic or system_core).
334     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
335     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
336     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
337     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
338     * @syscap SystemCapability.BundleManager.BundleFramework.Core
339     * @systemapi
340     * @since 10
341     */
342    /**
343     * Install HAPs for an application.
344     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
345     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
346     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
347     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
348     *
349     * @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
350     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
351     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
352     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
353     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
354     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
355     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
356     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
357     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
358     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
359     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
360     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
361     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
362     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
363     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
364     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
365     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
366     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
367     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
368     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
369     *  (required APL: system_basic or system_core).
370     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
371     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
372     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
373     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
374     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
375     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
376     * @syscap SystemCapability.BundleManager.BundleFramework.Core
377     * @systemapi
378     * @since 11
379     */
380     /**
381     * Install HAPs for an application.
382     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
383     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
384     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
385     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
386     *
387     * @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
388     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
389     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
390     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
391     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
392     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
393     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
394     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
395     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
396     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
397     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
398     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
399     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
400     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
401     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
402     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
403     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
404     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
405     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
406     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
407     *  (required APL: system_basic or system_core).
408     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
409     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
410     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
411     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
412     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
413     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
414     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
415     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
416     * @syscap SystemCapability.BundleManager.BundleFramework.Core
417     * @systemapi
418     * @since 12
419     */
420     /**
421     * Install HAPs for an application.
422     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
423     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
424     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
425     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
426     * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE.
427     *
428     * @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
429     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
430     * @param { AsyncCallback<void> } callback - The callback of installing HAPs result.
431     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
432     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
433     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
434     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
435     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
436     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
437     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
438     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
439     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
440     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
441     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
442     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
443     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
444     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
445     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
446     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
447     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
448     *  (required APL: system_basic or system_core).
449     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
450     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
451     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
452     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
453     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
454     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
455     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
456     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
457     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
458     * <br>bundle name but different signature information exists on the device.
459     * @syscap SystemCapability.BundleManager.BundleFramework.Core
460     * @systemapi
461     * @since 13
462     */
463    install(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
464
465    /**
466     * Install haps for an application.
467     *
468     * @permission ohos.permission.INSTALL_BUNDLE
469     * @param { Array<string> } hapFilePaths - Indicates the path where the hap of the application is stored.
470     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
471     * @returns { Promise<void> }
472     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
473     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
474     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
475     * @throws { BusinessError } 17700004 - The specified user ID is not found.
476     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
477     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
478     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
479     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
480     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
481     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
482     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
483     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
484     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
485     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
486     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
487     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
488     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
489     *  (required APL: system_basic or system_core).
490     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
491     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
492     * @syscap SystemCapability.BundleManager.BundleFramework.Core
493     * @systemapi
494     * @since 9
495     */
496    /**
497     * Install haps for an application.
498     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
499     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
500     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
501     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
502     *
503     * @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
504     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
505     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
506     * @returns { Promise<void> }
507     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
508     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
509     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
510     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
511     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
512     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
513     * @throws { BusinessError } 17700004 - The specified user ID is not found.
514     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
515     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
516     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
517     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
518     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
519     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
520     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
521     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
522     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
523     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
524     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
525     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
526     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
527     *  (required APL: system_basic or system_core).
528     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
529     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
530     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
531     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
532     * @syscap SystemCapability.BundleManager.BundleFramework.Core
533     * @systemapi
534     * @since 10
535     */
536    /**
537     * Install haps for an application.
538     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
539     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
540     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
541     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
542     *
543     * @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
544     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
545     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
546     * @returns { Promise<void> }
547     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
548     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
549     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
550     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
551     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
552     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
553     * @throws { BusinessError } 17700004 - The specified user ID is not found.
554     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
555     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
556     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
557     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
558     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
559     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
560     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
561     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
562     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
563     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
564     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
565     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
566     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
567     *  (required APL: system_basic or system_core).
568     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
569     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
570     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
571     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
572     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
573     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
574     * @syscap SystemCapability.BundleManager.BundleFramework.Core
575     * @systemapi
576     * @since 11
577     */
578    /**
579     * Install haps for an application.
580     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
581     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
582     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
583     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
584     *
585     * @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
586     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
587     * @param { InstallParam } [installParam] - Indicates other parameters required for the installation.
588     * @returns { Promise<void> }
589     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
590     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
591     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
592     * @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.
593     * @throws { BusinessError } 17700004 - The specified user ID is not found.
594     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
595     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
596     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
597     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
598     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
599     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
600     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
601     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
602     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
603     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
604     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
605     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
606     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
607     *  (required APL: system_basic or system_core).
608     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
609     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
610     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
611     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
612     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
613     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
614     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
615     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
616     * @syscap SystemCapability.BundleManager.BundleFramework.Core
617     * @systemapi
618     * @since 12
619     */
620    /**
621     * Install haps for an application.
622     * To install a non-enterprise application, you must have the permission ohos.permission.INSTALL_BUNDLE.
623     * To install an enterprise application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_BUNDLE.
624     * To install an enterprise administrator application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE.
625     * To install an enterprise normal application, you must have the permission ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE.
626     * To install an internal beta application, you must have the permission ohos.permission.INSTALL_INTERNALTESTING_BUNDLE.
627     *
628     * @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
629     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
630     * @param { InstallParam } [installParam] - Indicates other parameters required for the installation.
631     * @returns { Promise<void> }
632     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_BUNDLE' or
633     * 'ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE' or 'ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE'.
634     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
635     * @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.
636     * @throws { BusinessError } 17700004 - The specified user ID is not found.
637     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
638     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
639     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
640     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
641     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
642     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
643     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
644     * @throws { BusinessError } 17700031 - Failed to install the HAP because the overlay check of the HAP is failed.
645     * @throws { BusinessError } 17700036 - Failed to install the HSP because lacks appropriate permissions.
646     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
647     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
648     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
649     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
650     *  (required APL: system_basic or system_core).
651     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
652     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
653     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
654     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
655     * @throws { BusinessError } 17700052 - Failed to install the HAP because debug bundle cannot be installed under non-developer mode.
656     * @throws { BusinessError } 17700054 - Failed to install the HAP because the HAP requests wrong permissions.
657     * @throws { BusinessError } 17700058 - Failed to install the HAP because the device has been controlled.
658     * @throws { BusinessError } 17700066 - Failed to install the HAP because installing the native package failed.
659     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
660     * <br>bundle name but different signature information exists on the device.
661     * @syscap SystemCapability.BundleManager.BundleFramework.Core
662     * @systemapi
663     * @since 13
664     */
665    install(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
666
667    /**
668     * Uninstall an application.
669     *
670     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
671     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
672     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
673     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
674     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
675     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
676     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
677     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
678     * @throws { BusinessError } 17700004 - The specified user ID is not found.
679     * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
680     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
681     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
682     * @syscap SystemCapability.BundleManager.BundleFramework.Core
683     * @systemapi
684     * @since 9
685     */
686    /**
687     * Uninstall an application.
688     *
689     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
690     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
691     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
692     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
693     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
694     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
695     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
696     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
697     * @throws { BusinessError } 17700004 - The specified user ID is not found.
698     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
699     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
700     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
701     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
702     * @syscap SystemCapability.BundleManager.BundleFramework.Core
703     * @systemapi
704     * @since 12
705     */
706    /**
707     * Uninstall an application.
708     *
709     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
710     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
711     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
712     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
713     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
714     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
715     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
716     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
717     * @throws { BusinessError } 17700004 - The specified user ID is not found.
718     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
719     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
720     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
721     * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
722     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
723     * @syscap SystemCapability.BundleManager.BundleFramework.Core
724     * @systemapi
725     * @since 13
726     */
727    uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
728
729    /**
730     * Uninstall an application.
731     *
732     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
733     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
734     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
735     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
736     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
737     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
738     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
739     * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
740     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
741     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
742     * @syscap SystemCapability.BundleManager.BundleFramework.Core
743     * @systemapi
744     * @since 9
745     */
746    /**
747     * Uninstall an application.
748     *
749     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
750     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
751     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
752     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
753     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
754     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
755     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
756     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
757     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
758     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
759     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
760     * @syscap SystemCapability.BundleManager.BundleFramework.Core
761     * @systemapi
762     * @since 12
763     */
764    /**
765     * Uninstall an application.
766     *
767     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
768     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
769     * @param { AsyncCallback<void> } callback - The callback of uninstalling application result.
770     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
771     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
772     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
773     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
774     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
775     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
776     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
777     * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
778     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
779     * @syscap SystemCapability.BundleManager.BundleFramework.Core
780     * @systemapi
781     * @since 13
782     */
783    uninstall(bundleName: string, callback: AsyncCallback<void>): void;
784
785    /**
786     * Uninstall an application.
787     *
788     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
789     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
790     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
791     * @returns { Promise<void> }
792     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.UNINSTALL_BUNDLE'.
793     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
794     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
795     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
796     * @throws { BusinessError } 17700004 - The specified user ID is not found.
797     * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled.
798     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle which cannot be uninstalled.
799     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
800     * @syscap SystemCapability.BundleManager.BundleFramework.Core
801     * @systemapi
802     * @since 9
803     */
804     /**
805     * Uninstall an application.
806     *
807     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
808     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
809     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
810     * @returns { Promise<void> }
811     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
812     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
813     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
814     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
815     * @throws { BusinessError } 17700004 - The specified user ID is not found.
816     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
817     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
818     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
819     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
820     * @syscap SystemCapability.BundleManager.BundleFramework.Core
821     * @systemapi
822     * @since 12
823     */
824    /**
825     * Uninstall an application.
826     *
827     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
828     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled.
829     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
830     * @returns { Promise<void> }
831     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
832     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
833     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
834     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
835     * @throws { BusinessError } 17700004 - The specified user ID is not found.
836     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
837     * @throws { BusinessError } 17700040 - The specified bundle is a shared bundle and cannot be uninstalled.
838     * @throws { BusinessError } 17700045 - Failed to uninstall the HAP because uninstall is not allowed by the enterprise device management.
839     * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
840     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
841     * @syscap SystemCapability.BundleManager.BundleFramework.Core
842     * @systemapi
843     * @since 13
844     */
845    uninstall(bundleName: string, installParam?: InstallParam): Promise<void>;
846
847    /**
848     * Recover an application.
849     *
850     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
851     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
852     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
853     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
854     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
855     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
856     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
857     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
858     * @throws { BusinessError } 17700004 - The specified user ID is not found.
859     * @syscap SystemCapability.BundleManager.BundleFramework.Core
860     * @systemapi
861     * @since 9
862     */
863    /**
864     * Recover an application.
865     *
866     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
867     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
868     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
869     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
870     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
871     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
872     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
873     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
874     * @throws { BusinessError } 17700004 - The specified user ID is not found.
875     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
876     * <br>bundle name but different signature information exists on the device.
877     * @syscap SystemCapability.BundleManager.BundleFramework.Core
878     * @systemapi
879     * @since 13
880     */
881    /**
882     * Recover an application.
883     *
884     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
885     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
886     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
887     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
888     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
889     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
890     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
891     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
892     * @throws { BusinessError } 17700004 - The specified user ID is not found.
893     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
894     * <br>from being installed on this device or by specified users.
895     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
896     * <br>bundle name but different signature information exists on the device.
897     * @syscap SystemCapability.BundleManager.BundleFramework.Core
898     * @systemapi
899     * @since 14
900     */
901    recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
902
903    /**
904     * Recover an application.
905     *
906     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
907     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
908     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
909     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
910     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
911     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
912     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
913     * @syscap SystemCapability.BundleManager.BundleFramework.Core
914     * @systemapi
915     * @since 9
916     */
917    /**
918     * Recover an application.
919     *
920     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
921     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
922     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
923     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
924     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
925     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
926     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
927     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
928     * <br>bundle name but different signature information exists on the device.
929     * @syscap SystemCapability.BundleManager.BundleFramework.Core
930     * @systemapi
931     * @since 13
932     */
933    /**
934     * Recover an application.
935     *
936     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
937     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
938     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
939     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
940     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
941     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
942     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
943     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
944     * <br>from being installed on this device or by specified users.
945     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
946     * <br>bundle name but different signature information exists on the device.
947     * @syscap SystemCapability.BundleManager.BundleFramework.Core
948     * @systemapi
949     * @since 14
950     */
951    recover(bundleName: string, callback: AsyncCallback<void>): void;
952
953    /**
954     * Recover an application.
955     *
956     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
957     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
958     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
959     * @returns { Promise<void> }
960     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
961     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
962     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
963     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
964     * @throws { BusinessError } 17700004 - The specified user ID is not found.
965     * @syscap SystemCapability.BundleManager.BundleFramework.Core
966     * @systemapi
967     * @since 9
968     */
969    /**
970     * Recover an application.
971     *
972     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
973     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
974     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
975     * @returns { Promise<void> }
976     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
977     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
978     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
979     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
980     * @throws { BusinessError } 17700004 - The specified user ID is not found.
981     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
982     * <br>bundle name but different signature information exists on the device.
983     * @syscap SystemCapability.BundleManager.BundleFramework.Core
984     * @systemapi
985     * @since 13
986     */
987    /**
988     * Recover an application.
989     *
990     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
991     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
992     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
993     * @returns { Promise<void> }
994     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
995     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
996     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
997     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
998     * @throws { BusinessError } 17700004 - The specified user ID is not found.
999     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
1000     * <br>from being installed on this device or by specified users.
1001     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
1002     * <br>bundle name but different signature information exists on the device.
1003     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1004     * @systemapi
1005     * @since 14
1006     */
1007    recover(bundleName: string, installParam?: InstallParam): Promise<void>;
1008
1009    /**
1010     * Uninstall a shared bundle.
1011     *
1012     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1013     * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
1014     * @param { AsyncCallback<void> } callback - The callback of uninstalling shared bundle result.
1015     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1016     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1017     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1018     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
1019     * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
1020     * @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
1021     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1022     * @systemapi
1023     * @since 10
1024     */
1025    uninstall(uninstallParam: UninstallParam, callback: AsyncCallback<void>): void;
1026
1027    /**
1028     * Uninstall a shared bundle.
1029     *
1030     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1031     * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
1032     * @returns { Promise<void> }
1033     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1034     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1035     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1036     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
1037     * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
1038     * @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
1039     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1040     * @systemapi
1041     * @since 10
1042     */
1043    uninstall(uninstallParam: UninstallParam): Promise<void>;
1044
1045    /**
1046     * Updates this enterprise application.
1047     *
1048     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1049     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1050     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1051     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1052     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1053     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1054     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1055     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1056     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1057     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1058     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1059     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1060     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1061     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1062     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1063     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1064     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1065     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1066     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1067     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1068     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1069     * (required APL: system_basic or system_core).
1070     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1071     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1072     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1073     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1074     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1075     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1076     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1077     * @systemapi
1078     * @since 10
1079     */
1080    /**
1081     * Updates this enterprise application.
1082     *
1083     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1084     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1085     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1086     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1087     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1088     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1089     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1090     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1091     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1092     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1093     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1094     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1095     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1096     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1097     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1098     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1099     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1100     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1101     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1102     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1103     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1104     * (required APL: system_basic or system_core).
1105     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1106     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1107     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1108     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1109     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1110     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1111     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1112     * @systemapi
1113     * @since 12
1114     */
1115    updateBundleForSelf(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
1116
1117    /**
1118     * Updates this enterprise application.
1119     *
1120     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1121     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1122     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1123     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1124     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1125     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1126     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1127     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1128     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1129     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1130     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1131     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1132     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1133     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1134     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1135     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1136     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1137     * (required APL: system_basic or system_core).
1138     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1139     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1140     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1141     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1142     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1143     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1144     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1145     * @systemapi
1146     * @since 10
1147     */
1148    /**
1149     * Updates this enterprise application.
1150     *
1151     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1152     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1153     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1154     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1155     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1156     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1157     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1158     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1159     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1160     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1161     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1162     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1163     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1164     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1165     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1166     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1167     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1168     * (required APL: system_basic or system_core).
1169     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1170     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1171     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1172     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1173     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1174     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1175     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1176     * @systemapi
1177     * @since 12
1178     */
1179    updateBundleForSelf(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
1180
1181    /**
1182     * Updates this enterprise application.
1183     *
1184     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1185     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1186     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1187     * @returns { Promise<void> }
1188     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1189     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1190     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1191     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1192     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1193     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1194     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1195     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1196     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1197     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1198     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1199     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1200     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1201     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1202     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1203     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1204     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1205     * (required APL: system_basic or system_core).
1206     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1207     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1208     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1209     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1210     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1211     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1212     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1213     * @systemapi
1214     * @since 10
1215     */
1216    /**
1217     * Updates this enterprise application.
1218     *
1219     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1220     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1221     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1222     * @returns { Promise<void> }
1223     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1224     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1225     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1226     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1227     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1228     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1229     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1230     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1231     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1232     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1233     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1234     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1235     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1236     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1237     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1238     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1239     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1240     * (required APL: system_basic or system_core).
1241     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1242     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1243     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1244     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1245     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1246     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1247     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1248     * @systemapi
1249     * @since 12
1250     */
1251    updateBundleForSelf(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
1252
1253    /**
1254     * Uninstall updates for a pre-installed application.
1255     *
1256     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1257     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates.
1258     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
1259     * @returns { Promise<void> }
1260     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1261     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1262     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1263     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
1264     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
1265     * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed.
1266     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1267     * @systemapi
1268     * @since 12
1269     */
1270    /**
1271     * Uninstall updates for a pre-installed application.
1272     *
1273     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1274     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates.
1275     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
1276     * @returns { Promise<void> }
1277     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1278     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1279     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1280     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
1281     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
1282     * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed.
1283     * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
1284     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
1285     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
1286     * <br>bundle name but different signature information exists on the device.
1287     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1288     * @systemapi
1289     * @since 13
1290     */
1291    uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise<void>;
1292
1293    /**
1294     * Add extend resources.
1295     *
1296     * @permission ohos.permission.INSTALL_BUNDLE
1297     * @param { string } bundleName - Indicates the bundleName.
1298     * @param { Array<string> } filePaths - Indicates the file path for extend resources.
1299     * @returns { Promise<void> } Returns addExtResource result.
1300     * @throws { BusinessError } 201 - Permission denied.
1301     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1302     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1303     * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1304     * @throws { BusinessError } 17700301 - AddExtResource failed due to parse file failed.
1305     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1306     * @systemapi
1307     * @since 12
1308    */
1309    addExtResource(bundleName: string, filePaths: Array<string>): Promise<void>;
1310
1311    /**
1312     * Remove extend resources.
1313     *
1314     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1315     * @param { string } bundleName - Indicates the bundleName.
1316     * @param { Array<string> } moduleNames - Indicates the moduleNames for extend resources.
1317     * @returns { Promise<void> } Returns removeExtResource result.
1318     * @throws { BusinessError } 201 - Permission denied.
1319     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1320     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1321     * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1322     * @throws { BusinessError } 17700302 - RemoveExtResource failed due to module does not exist.
1323     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1324     * @systemapi
1325     * @since 12
1326     */
1327    removeExtResource(bundleName: string, moduleNames: Array<string>): Promise<void>;
1328
1329    /**
1330     * Create clone instance for an application.
1331     *
1332     * @permission ohos.permission.INSTALL_CLONE_BUNDLE
1333     * @param { string } bundleName - Indicates the path where the HAP of the application is stored.
1334     * @param { CreateAppCloneParam } [createAppCloneParam] Indicates the optional params of create clone app.
1335     * @returns { Promise<number> } Return the appIndex of the clone application.
1336     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_CLONE_BUNDLE'.
1337     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1338     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1339     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1340     * @throws { BusinessError } 17700004 - The userId is invalid.
1341     * @throws { BusinessError } 17700061 - The appIndex is not in valid range or already exists.
1342     * @throws { BusinessError } 17700069 - The app does not support the creation of an appClone instance.
1343     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1344     * @systemapi
1345     * @since 12
1346     */
1347     createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise<number>;
1348
1349    /**
1350     * Destroy clone instance for an application.
1351     *
1352     * @permission ohos.permission.UNINSTALL_CLONE_BUNDLE
1353     * @param { string } bundleName - Indicates the path where the HAP of the application is stored.
1354     * @param { number } appIndex - Indicates the clone application's index.
1355     * @param { number } [userId] - userId Indicates the user ID.
1356     * @returns { Promise<void> }
1357     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.UNINSTALL_CLONE_BUNDLE'.
1358     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1359     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1360     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1361     * @throws { BusinessError } 17700004 - The userId is invalid.
1362     * @throws { BusinessError } 17700061 - AppIndex not in valid range.
1363     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1364     * @systemapi
1365     * @since 12
1366     */
1367     destroyAppClone(bundleName: string, appIndex: number, userId?: number): Promise<void>;
1368
1369    /**
1370     * Install application by bundle name with specified user.
1371     *
1372     * @permission ohos.permission.INSTALL_BUNDLE
1373     * @param { string } bundleName - Indicates the bundle name of application.
1374     * @param { number } [userId] - userId Indicates the user ID.
1375     * @returns { Promise<void> }
1376     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
1377     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1378     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1379     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1380     * @throws { BusinessError } 17700004 - The userId is invalid.
1381     * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
1382     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1383     * @systemapi
1384     * @since 12
1385     */
1386    /**
1387     * Install application by bundle name with specified user.
1388     *
1389     * @permission ohos.permission.INSTALL_BUNDLE
1390     * @param { string } bundleName - Indicates the bundle name of application.
1391     * @param { number } [userId] - userId Indicates the user ID.
1392     * @returns { Promise<void> }
1393     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
1394     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1395     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1396     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1397     * @throws { BusinessError } 17700004 - The userId is invalid.
1398     * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
1399     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
1400     * <br>from being installed on this device or by specified users.
1401     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1402     * @systemapi
1403     * @since 14
1404     */
1405     installPreexistingApp(bundleName: string, userId?: number): Promise<void>;
1406  }
1407
1408  /**
1409   * Provides parameters required for hashParam.
1410   *
1411   * @typedef HashParam
1412   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1413   * @systemapi
1414   * @since 9
1415   */
1416  export interface HashParam {
1417    /**
1418     * Indicates the moduleName
1419     *
1420     * @type { string }
1421     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1422     * @systemapi
1423     * @since 9
1424     */
1425    moduleName: string;
1426
1427    /**
1428     * Indicates the hash value
1429     *
1430     * @type { string }
1431     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1432     * @systemapi
1433     * @since 9
1434     */
1435    hashValue: string;
1436  }
1437
1438  /**
1439   * Provides parameters required for VerifyCodeParam.
1440   *
1441   * @typedef VerifyCodeParam
1442   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1443   * @systemapi
1444   * @since 10
1445   * @deprecated since 11
1446   */
1447  export interface VerifyCodeParam {
1448    /**
1449     * Indicates the moduleName which hopes to be processed with code signature.
1450     *
1451     * @type { string }
1452     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1453     * @systemapi
1454     * @since 10
1455     * @deprecated since 11
1456     */
1457    moduleName: string;
1458
1459    /**
1460     * Indicates the path where the code signature file of the corresponding HAP is stored.
1461     *
1462     * @type { string }
1463     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1464     * @systemapi
1465     * @since 10
1466     * @deprecated since 11
1467     */
1468    signatureFilePath: string;
1469  }
1470
1471  /**
1472   * Provides parameters required for PGOParam.
1473   *
1474   * @typedef PGOParam
1475   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1476   * @systemapi
1477   * @since 11
1478   */
1479  export interface PGOParam {
1480    /**
1481     * Indicates the moduleName that need to store profile-guided optimization(PGO) file.
1482     *
1483     * @type { string }
1484     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1485     * @systemapi
1486     * @since 11
1487     */
1488    moduleName: string;
1489
1490    /**
1491     * Indicates the path where the profile-guided optimization(PGO) file is stored.
1492     *
1493     * @type { string }
1494     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1495     * @systemapi
1496     * @since 11
1497     */
1498    pgoFilePath: string;
1499  }
1500
1501  /**
1502   * Provides parameters required for installing or uninstalling an application.
1503   *
1504   * @typedef InstallParam
1505   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1506   * @systemapi
1507   * @since 9
1508   */
1509  export interface InstallParam {
1510    /**
1511     * Indicates the user id
1512     *
1513     * @type { ?number }
1514     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1515     * @systemapi
1516     * @since 9
1517     */
1518    userId?: number;
1519
1520    /**
1521     * Indicates the installation type. The value 0x00 means normal installation, 0x01 means overwrite installation, and 0x10 means installation-free.
1522     *
1523     * @type { ?number }
1524     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1525     * @systemapi
1526     * @since 9
1527     */
1528    installFlag?: number;
1529
1530    /**
1531     * Indicates whether the param has data
1532     *
1533     * @type { ?boolean }
1534     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1535     * @systemapi
1536     * @since 9
1537     */
1538    isKeepData?: boolean;
1539
1540    /**
1541     * Indicates the hash params
1542     *
1543     * @type { ?Array<HashParam> }
1544     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1545     * @systemapi
1546     * @since 9
1547     */
1548    hashParams?: Array<HashParam>;
1549
1550    /**
1551     * Indicates the deadline of the crowdtesting bundle
1552     *
1553     * @type { ?number }
1554     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1555     * @systemapi
1556     * @since 9
1557     */
1558    crowdtestDeadline?: number;
1559
1560    /**
1561     * Indicates the shared bundle dir paths.
1562     *
1563     * @type { ?Array<String> }
1564     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1565     * @systemapi
1566     * @since 10
1567     */
1568    sharedBundleDirPaths?: Array<String>;
1569
1570    /**
1571     * Indicates the distribution type specified during bundle installation.
1572     *
1573     * @type { ?string }
1574     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1575     * @systemapi
1576     * @since 10
1577     */
1578    specifiedDistributionType?: string;
1579
1580    /**
1581     * Indicates the additional information during bundle installation.
1582     *
1583     * @type { ?string }
1584     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1585     * @systemapi
1586     * @since 10
1587     */
1588    additionalInfo?: string;
1589
1590    /**
1591     * Indicates the verification code param.
1592     *
1593     * @type { ?Array<VerifyCodeParam> }
1594     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1595     * @systemapi
1596     * @since 10
1597     * @deprecated since 11
1598     */
1599    verifyCodeParams?: Array<VerifyCodeParam>;
1600
1601    /**
1602     * Indicates the profile-guided optimization(PGO) params.
1603     *
1604     * @type { ?Array<PGOParam> }
1605     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1606     * @systemapi
1607     * @since 11
1608     */
1609    pgoParams?: Array<PGOParam>;
1610  }
1611
1612  /**
1613   * Provides parameters required for uninstalling shared bundle.
1614   *
1615   * @typedef UninstallParam
1616   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1617   * @systemapi
1618   * @since 10
1619   */
1620  export interface UninstallParam {
1621    /**
1622     * Indicates the shared bundle name
1623     *
1624     * @type { string }
1625     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1626     * @systemapi
1627     * @since 10
1628     */
1629    bundleName: string;
1630
1631    /**
1632     * Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled
1633     *
1634     * @type { ?number }
1635     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1636     * @systemapi
1637     * @since 10
1638     */
1639    versionCode?: number;
1640  }
1641
1642  /**
1643   * Provides parameters required for creating clone app.
1644   *
1645   * @typedef CreateAppCloneParam
1646   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1647   * @systemapi
1648   * @since 12
1649   */
1650   export interface CreateAppCloneParam {
1651    /**
1652     * Indicates the user id
1653     *
1654     * @type { ?number }
1655     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1656     * @systemapi
1657     * @since 12
1658     */
1659    userId?: number;
1660    /**
1661     * Indicates the appIndex of MultiApp
1662     *
1663     * @type { ?number }
1664     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1665     * @systemapi
1666     * @since 12
1667     */
1668    appIndex?: number;
1669  }
1670}
1671
1672export default installer;
1673