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 } 17700058 - Failed to install the HAP because this application is prohibited
876     * <br>from being installed on this device or by specified users.
877     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
878     * <br>bundle name but different signature information exists on the device.
879     * @syscap SystemCapability.BundleManager.BundleFramework.Core
880     * @systemapi
881     * @since 13
882     */
883    recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback<void>): void;
884
885    /**
886     * Recover an application.
887     *
888     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
889     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
890     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
891     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
892     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
893     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
894     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
895     * @syscap SystemCapability.BundleManager.BundleFramework.Core
896     * @systemapi
897     * @since 9
898     */
899    /**
900     * Recover an application.
901     *
902     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
903     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
904     * @param { AsyncCallback<void> } callback - The callback of recovering application result.
905     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
906     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
907     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
908     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
909     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
910     * <br>from being installed on this device or by specified users.
911     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
912     * <br>bundle name but different signature information exists on the device.
913     * @syscap SystemCapability.BundleManager.BundleFramework.Core
914     * @systemapi
915     * @since 13
916     */
917    recover(bundleName: string, callback: AsyncCallback<void>): void;
918
919    /**
920     * Recover an application.
921     *
922     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
923     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
924     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
925     * @returns { Promise<void> }
926     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
927     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
928     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
929     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
930     * @throws { BusinessError } 17700004 - The specified user ID is not found.
931     * @syscap SystemCapability.BundleManager.BundleFramework.Core
932     * @systemapi
933     * @since 9
934     */
935    /**
936     * Recover an application.
937     *
938     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE
939     * @param { string } bundleName - Indicates the bundle name of the application to be recovered.
940     * @param { InstallParam } installParam - Indicates other parameters required for the recover.
941     * @returns { Promise<void> }
942     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE' or 'ohos.permission.RECOVER_BUNDLE'.
943     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
944     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
945     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
946     * @throws { BusinessError } 17700004 - The specified user ID is not found.
947     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
948     * <br>from being installed on this device or by specified users.
949     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
950     * <br>bundle name but different signature information exists on the device.
951     * @syscap SystemCapability.BundleManager.BundleFramework.Core
952     * @systemapi
953     * @since 13
954     */
955    recover(bundleName: string, installParam?: InstallParam): Promise<void>;
956
957    /**
958     * Uninstall a shared bundle.
959     *
960     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
961     * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
962     * @param { AsyncCallback<void> } callback - The callback of uninstalling shared bundle result.
963     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
964     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
965     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
966     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
967     * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
968     * @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
969     * @syscap SystemCapability.BundleManager.BundleFramework.Core
970     * @systemapi
971     * @since 10
972     */
973    uninstall(uninstallParam: UninstallParam, callback: AsyncCallback<void>): void;
974
975    /**
976     * Uninstall a shared bundle.
977     *
978     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
979     * @param { UninstallParam } uninstallParam - Indicates parameters required for the uninstall.
980     * @returns { Promise<void> }
981     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
982     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
983     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
984     * @throws { BusinessError } 17700020 - The specified bundle is a pre-installed bundle and cannot be uninstalled.
985     * @throws { BusinessError } 17700037 - The version of shared bundle is dependent on other applications.
986     * @throws { BusinessError } 17700038 - The specified shared bundle does not exist.
987     * @syscap SystemCapability.BundleManager.BundleFramework.Core
988     * @systemapi
989     * @since 10
990     */
991    uninstall(uninstallParam: UninstallParam): Promise<void>;
992
993    /**
994     * Updates this enterprise application.
995     *
996     * @permission ohos.permission.INSTALL_SELF_BUNDLE
997     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
998     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
999     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1000     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1001     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1002     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1003     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1004     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1005     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1006     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1007     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1008     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1009     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1010     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1011     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1012     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1013     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1014     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1015     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1016     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1017     * (required APL: system_basic or system_core).
1018     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1019     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1020     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1021     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1022     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1023     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1024     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1025     * @systemapi
1026     * @since 10
1027     */
1028    /**
1029     * Updates this enterprise application.
1030     *
1031     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1032     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1033     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1034     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1035     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1036     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1037     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1038     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1039     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1040     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1041     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1042     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1043     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1044     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1045     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1046     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1047     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1048     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1049     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1050     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1051     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1052     * (required APL: system_basic or system_core).
1053     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1054     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1055     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1056     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1057     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1058     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1059     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1060     * @systemapi
1061     * @since 12
1062     */
1063    updateBundleForSelf(hapFilePaths: Array<string>, installParam: InstallParam, callback: AsyncCallback<void>): void;
1064
1065    /**
1066     * Updates this enterprise application.
1067     *
1068     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1069     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1070     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1071     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1072     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1073     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1074     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1075     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1076     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1077     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1078     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1079     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1080     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1081     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1082     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1083     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1084     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1085     * (required APL: system_basic or system_core).
1086     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1087     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1088     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1089     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1090     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1091     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1092     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1093     * @systemapi
1094     * @since 10
1095     */
1096    /**
1097     * Updates this enterprise application.
1098     *
1099     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1100     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1101     * @param { AsyncCallback<void> } callback - Indicates the callback used to return the HAP installation result.
1102     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1103     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1104     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1105     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1106     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1107     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1108     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1109     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1110     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1111     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1112     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1113     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1114     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1115     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1116     * (required APL: system_basic or system_core).
1117     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1118     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1119     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1120     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1121     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1122     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1123     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1124     * @systemapi
1125     * @since 12
1126     */
1127    updateBundleForSelf(hapFilePaths: Array<string>, callback: AsyncCallback<void>): void;
1128
1129    /**
1130     * Updates this enterprise application.
1131     *
1132     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1133     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1134     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1135     * @returns { Promise<void> }
1136     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1137     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1138     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1139     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1140     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1141     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1142     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1143     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1144     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1145     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1146     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1147     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1148     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1149     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1150     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1151     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1152     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1153     * (required APL: system_basic or system_core).
1154     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1155     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1156     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1157     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1158     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1159     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1160     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1161     * @systemapi
1162     * @since 10
1163     */
1164    /**
1165     * Updates this enterprise application.
1166     *
1167     * @permission ohos.permission.INSTALL_SELF_BUNDLE
1168     * @param { Array<string> } hapFilePaths - Indicates the path where the HAP of the application is stored.
1169     * @param { InstallParam } installParam - Indicates other parameters required for the installation.
1170     * @returns { Promise<void> }
1171     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_SELF_BUNDLE'.
1172     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1173     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1174     * 2. Incorrect parameter types; 3. Parameter hapFiles is needed for code signature;
1175     * 4. The size of specifiedDistributionType is greater than 128; 5. The size of additionalInfo is greater than 3000.
1176     * @throws { BusinessError } 17700004 - The specified user ID is not found.
1177     * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed.
1178     * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified.
1179     * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large.
1180     * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information.
1181     * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space.
1182     * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early.
1183     * @throws { BusinessError } 17700018 - Failed to install because the dependent module does not exist.
1184     * @throws { BusinessError } 17700039 - Failed to install because disallow install a shared bundle by hapFilePaths.
1185     * @throws { BusinessError } 17700041 - Failed to install because enterprise device management disallow install.
1186     * @throws { BusinessError } 17700042 - Failed to install the HAP because of incorrect URI in the data proxy.
1187     * @throws { BusinessError } 17700043 - Failed to install the HAP because of low APL in the non-system data proxy
1188     * (required APL: system_basic or system_core).
1189     * @throws { BusinessError } 17700044 - Failed to install the HAP because the isolationMode configured is not supported.
1190     * @throws { BusinessError } 17700047 - Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode.
1191     * @throws { BusinessError } 17700048 - Failed to install the HAP because the code signature verification is failed.
1192     * @throws { BusinessError } 17700049 - Failed to install the HAP because the bundleName is different from the bundleName of the caller application.
1193     * @throws { BusinessError } 17700050 - Failed to install the HAP because enterprise normal/MDM bundle cannot be installed on non-enterprise device.
1194     * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm.
1195     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1196     * @systemapi
1197     * @since 12
1198     */
1199    updateBundleForSelf(hapFilePaths: Array<string>, installParam?: InstallParam): Promise<void>;
1200
1201    /**
1202     * Uninstall updates for a pre-installed application.
1203     *
1204     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1205     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates.
1206     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
1207     * @returns { Promise<void> }
1208     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1209     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1210     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1211     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
1212     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
1213     * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed.
1214     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1215     * @systemapi
1216     * @since 12
1217     */
1218    /**
1219     * Uninstall updates for a pre-installed application.
1220     *
1221     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1222     * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled updates.
1223     * @param { InstallParam } installParam - Indicates other parameters required for the uninstall.
1224     * @returns { Promise<void> }
1225     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
1226     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1227     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1228     * @throws { BusinessError } 17700001 - The specified bundle name is not found.
1229     * @throws { BusinessError } 17700045 - Failed to uninstall because enterprise device management disallow uninstall.
1230     * @throws { BusinessError } 17700057 - Failed to uninstall updates because the HAP is not pre-installed.
1231     * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
1232     * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed.
1233     * @throws { BusinessError } 17700073 - Failed to install the HAP because an application with the same
1234     * <br>bundle name but different signature information exists on the device.
1235     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1236     * @systemapi
1237     * @since 13
1238     */
1239    uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise<void>;
1240
1241    /**
1242     * Add extend resources.
1243     *
1244     * @permission ohos.permission.INSTALL_BUNDLE
1245     * @param { string } bundleName - Indicates the bundleName.
1246     * @param { Array<string> } filePaths - Indicates the file path for extend resources.
1247     * @returns { Promise<void> } Returns addExtResource result.
1248     * @throws { BusinessError } 201 - Permission denied.
1249     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1250     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1251     * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1252     * @throws { BusinessError } 17700301 - AddExtResource failed due to parse file failed.
1253     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1254     * @systemapi
1255     * @since 12
1256    */
1257    addExtResource(bundleName: string, filePaths: Array<string>): Promise<void>;
1258
1259    /**
1260     * Remove extend resources.
1261     *
1262     * @permission ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE
1263     * @param { string } bundleName - Indicates the bundleName.
1264     * @param { Array<string> } moduleNames - Indicates the moduleNames for extend resources.
1265     * @returns { Promise<void> } Returns removeExtResource result.
1266     * @throws { BusinessError } 201 - Permission denied.
1267     * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1268     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1269     * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1270     * @throws { BusinessError } 17700302 - RemoveExtResource failed due to module does not exist.
1271     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1272     * @systemapi
1273     * @since 12
1274     */
1275    removeExtResource(bundleName: string, moduleNames: Array<string>): Promise<void>;
1276
1277    /**
1278     * Create clone instance for an application.
1279     *
1280     * @permission ohos.permission.INSTALL_CLONE_BUNDLE
1281     * @param { string } bundleName - Indicates the path where the HAP of the application is stored.
1282     * @param { CreateAppCloneParam } [createAppCloneParam] Indicates the optional params of create clone app.
1283     * @returns { Promise<number> } Return the appIndex of the clone application.
1284     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_CLONE_BUNDLE'.
1285     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1286     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1287     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1288     * @throws { BusinessError } 17700004 - The userId is invalid.
1289     * @throws { BusinessError } 17700061 - The appIndex is not in valid range or already exists.
1290     * @throws { BusinessError } 17700069 - The app does not support the creation of an appClone instance.
1291     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1292     * @systemapi
1293     * @since 12
1294     */
1295     createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise<number>;
1296
1297    /**
1298     * Destroy clone instance for an application.
1299     *
1300     * @permission ohos.permission.UNINSTALL_CLONE_BUNDLE
1301     * @param { string } bundleName - Indicates the path where the HAP of the application is stored.
1302     * @param { number } appIndex - Indicates the clone application's index.
1303     * @param { number } [userId] - userId Indicates the user ID.
1304     * @returns { Promise<void> }
1305     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.UNINSTALL_CLONE_BUNDLE'.
1306     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1307     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1308     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1309     * @throws { BusinessError } 17700004 - The userId is invalid.
1310     * @throws { BusinessError } 17700061 - AppIndex not in valid range.
1311     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1312     * @systemapi
1313     * @since 12
1314     */
1315     destroyAppClone(bundleName: string, appIndex: number, userId?: number): Promise<void>;
1316
1317    /**
1318     * Install application by bundle name with specified user.
1319     *
1320     * @permission ohos.permission.INSTALL_BUNDLE
1321     * @param { string } bundleName - Indicates the bundle name of application.
1322     * @param { number } [userId] - userId Indicates the user ID.
1323     * @returns { Promise<void> }
1324     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
1325     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1326     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1327     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1328     * @throws { BusinessError } 17700004 - The userId is invalid.
1329     * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
1330     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1331     * @systemapi
1332     * @since 12
1333     */
1334    /**
1335     * Install application by bundle name with specified user.
1336     *
1337     * @permission ohos.permission.INSTALL_BUNDLE
1338     * @param { string } bundleName - Indicates the bundle name of application.
1339     * @param { number } [userId] - userId Indicates the user ID.
1340     * @returns { Promise<void> }
1341     * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'.
1342     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
1343     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1344     * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user.
1345     * @throws { BusinessError } 17700004 - The userId is invalid.
1346     * @throws { BusinessError } 17700071 - It is not allowed to install the enterprise bundle.
1347     * @throws { BusinessError } 17700058 - Failed to install the HAP because this application is prohibited
1348     * <br>from being installed on this device or by specified users.
1349     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1350     * @systemapi
1351     * @since 13
1352     */
1353     installPreexistingApp(bundleName: string, userId?: number): Promise<void>;
1354  }
1355
1356  /**
1357   * Provides parameters required for hashParam.
1358   *
1359   * @typedef HashParam
1360   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1361   * @systemapi
1362   * @since 9
1363   */
1364  export interface HashParam {
1365    /**
1366     * Indicates the moduleName
1367     *
1368     * @type { string }
1369     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1370     * @systemapi
1371     * @since 9
1372     */
1373    moduleName: string;
1374
1375    /**
1376     * Indicates the hash value
1377     *
1378     * @type { string }
1379     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1380     * @systemapi
1381     * @since 9
1382     */
1383    hashValue: string;
1384  }
1385
1386  /**
1387   * Provides parameters required for VerifyCodeParam.
1388   *
1389   * @typedef VerifyCodeParam
1390   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1391   * @systemapi
1392   * @since 10
1393   * @deprecated since 11
1394   */
1395  export interface VerifyCodeParam {
1396    /**
1397     * Indicates the moduleName which hopes to be processed with code signature.
1398     *
1399     * @type { string }
1400     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1401     * @systemapi
1402     * @since 10
1403     * @deprecated since 11
1404     */
1405    moduleName: string;
1406
1407    /**
1408     * Indicates the path where the code signature file of the corresponding HAP is stored.
1409     *
1410     * @type { string }
1411     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1412     * @systemapi
1413     * @since 10
1414     * @deprecated since 11
1415     */
1416    signatureFilePath: string;
1417  }
1418
1419  /**
1420   * Provides parameters required for PGOParam.
1421   *
1422   * @typedef PGOParam
1423   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1424   * @systemapi
1425   * @since 11
1426   */
1427  export interface PGOParam {
1428    /**
1429     * Indicates the moduleName that need to store profile-guided optimization(PGO) file.
1430     *
1431     * @type { string }
1432     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1433     * @systemapi
1434     * @since 11
1435     */
1436    moduleName: string;
1437
1438    /**
1439     * Indicates the path where the profile-guided optimization(PGO) file is stored.
1440     *
1441     * @type { string }
1442     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1443     * @systemapi
1444     * @since 11
1445     */
1446    pgoFilePath: string;
1447  }
1448
1449  /**
1450   * Provides parameters required for installing or uninstalling an application.
1451   *
1452   * @typedef InstallParam
1453   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1454   * @systemapi
1455   * @since 9
1456   */
1457  export interface InstallParam {
1458    /**
1459     * Indicates the user id
1460     *
1461     * @type { ?number }
1462     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1463     * @systemapi
1464     * @since 9
1465     */
1466    userId?: number;
1467
1468    /**
1469     * Indicates the installation type. The value 0x00 means normal installation, 0x01 means overwrite installation, and 0x10 means installation-free.
1470     *
1471     * @type { ?number }
1472     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1473     * @systemapi
1474     * @since 9
1475     */
1476    installFlag?: number;
1477
1478    /**
1479     * Indicates whether the param has data
1480     *
1481     * @type { ?boolean }
1482     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1483     * @systemapi
1484     * @since 9
1485     */
1486    isKeepData?: boolean;
1487
1488    /**
1489     * Indicates the hash params
1490     *
1491     * @type { ?Array<HashParam> }
1492     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1493     * @systemapi
1494     * @since 9
1495     */
1496    hashParams?: Array<HashParam>;
1497
1498    /**
1499     * Indicates the deadline of the crowdtesting bundle
1500     *
1501     * @type { ?number }
1502     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1503     * @systemapi
1504     * @since 9
1505     */
1506    crowdtestDeadline?: number;
1507
1508    /**
1509     * Indicates the shared bundle dir paths.
1510     *
1511     * @type { ?Array<String> }
1512     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1513     * @systemapi
1514     * @since 10
1515     */
1516    sharedBundleDirPaths?: Array<String>;
1517
1518    /**
1519     * Indicates the distribution type specified during bundle installation.
1520     *
1521     * @type { ?string }
1522     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1523     * @systemapi
1524     * @since 10
1525     */
1526    specifiedDistributionType?: string;
1527
1528    /**
1529     * Indicates the additional information during bundle installation.
1530     *
1531     * @type { ?string }
1532     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1533     * @systemapi
1534     * @since 10
1535     */
1536    additionalInfo?: string;
1537
1538    /**
1539     * Indicates the verification code param.
1540     *
1541     * @type { ?Array<VerifyCodeParam> }
1542     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1543     * @systemapi
1544     * @since 10
1545     * @deprecated since 11
1546     */
1547    verifyCodeParams?: Array<VerifyCodeParam>;
1548
1549    /**
1550     * Indicates the profile-guided optimization(PGO) params.
1551     *
1552     * @type { ?Array<PGOParam> }
1553     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1554     * @systemapi
1555     * @since 11
1556     */
1557    pgoParams?: Array<PGOParam>;
1558  }
1559
1560  /**
1561   * Provides parameters required for uninstalling shared bundle.
1562   *
1563   * @typedef UninstallParam
1564   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1565   * @systemapi
1566   * @since 10
1567   */
1568  export interface UninstallParam {
1569    /**
1570     * Indicates the shared bundle name
1571     *
1572     * @type { string }
1573     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1574     * @systemapi
1575     * @since 10
1576     */
1577    bundleName: string;
1578
1579    /**
1580     * Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled
1581     *
1582     * @type { ?number }
1583     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1584     * @systemapi
1585     * @since 10
1586     */
1587    versionCode?: number;
1588  }
1589
1590  /**
1591   * Provides parameters required for creating clone app.
1592   *
1593   * @typedef CreateAppCloneParam
1594   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1595   * @systemapi
1596   * @since 12
1597   */
1598   export interface CreateAppCloneParam {
1599    /**
1600     * Indicates the user id
1601     *
1602     * @type { ?number }
1603     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1604     * @systemapi
1605     * @since 12
1606     */
1607    userId?: number;
1608    /**
1609     * Indicates the appIndex of MultiApp
1610     *
1611     * @type { ?number }
1612     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1613     * @systemapi
1614     * @since 12
1615     */
1616    appIndex?: number;
1617  }
1618}
1619
1620export default installer;
1621