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