• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2024 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';
22import type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata,
23  PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo';
24import { Metadata as _Metadata } from './bundleManager/Metadata';
25import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef';
26import { ElementName as _ElementName } from './bundleManager/ElementName';
27import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo';
28import type { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo';
29import Want from './@ohos.app.ability.Want';
30import * as _AbilityInfo from './bundleManager/AbilityInfo';
31import * as _AppProvisionInfo from './bundleManager/AppProvisionInfo';
32import * as _BundleInfo from './bundleManager/BundleInfo';
33import * as _HapModuleInfo from './bundleManager/HapModuleInfo';
34import * as _ExtensionAbilityInfo from './bundleManager/ExtensionAbilityInfo';
35import * as _Skill from './bundleManager/Skill';
36/**
37 * This module is used to obtain package information of various applications installed on the current device.
38 *
39 * @namespace bundleManager
40 * @syscap SystemCapability.BundleManager.BundleFramework.Core
41 * @since 9
42 */
43/**
44 * This module is used to obtain package information of various applications installed on the current device.
45 *
46 * @namespace bundleManager
47 * @syscap SystemCapability.BundleManager.BundleFramework.Core
48 * @atomicservice
49 * @since 11
50 */
51/**
52 * This module is used to obtain package information of various applications installed on the current device.
53 *
54 * @namespace bundleManager
55 * @syscap SystemCapability.BundleManager.BundleFramework.Core
56 * @crossplatform
57 * @atomicservice
58 * @since 12
59 */
60declare namespace bundleManager {
61  /**
62   * Used to query the enumeration value of bundleInfo. Multiple values can be passed in the form.
63   *
64   * @enum { number }
65   * @syscap SystemCapability.BundleManager.BundleFramework.Core
66   * @since 9
67   */
68  /**
69   * Used to query the enumeration value of bundleInfo. Multiple values can be passed in the form.
70   *
71   * @enum { number }
72   * @syscap SystemCapability.BundleManager.BundleFramework.Core
73   * @atomicservice
74   * @since 11
75   */
76  enum BundleFlag {
77    /**
78     * Used to obtain the default bundleInfo. The obtained bundleInfo does not contain information of
79     * signatureInfo, applicationInfo, hapModuleInfo, ability, extensionAbility and permission.
80     *
81     * @syscap SystemCapability.BundleManager.BundleFramework.Core
82     * @since 9
83     */
84    /**
85     * Used to obtain the default bundleInfo. The obtained bundleInfo does not contain information of
86     * signatureInfo, applicationInfo, hapModuleInfo, ability, extensionAbility and permission.
87     *
88     * @syscap SystemCapability.BundleManager.BundleFramework.Core
89     * @atomicservice
90     * @since 11
91     */
92    GET_BUNDLE_INFO_DEFAULT = 0x00000000,
93    /**
94     * Used to obtain the bundleInfo containing applicationInfo. The obtained bundleInfo does not
95     * contain the information of signatureInfo, hapModuleInfo, ability, extensionAbility and permission.
96     *
97     * @syscap SystemCapability.BundleManager.BundleFramework.Core
98     * @since 9
99     */
100    /**
101     * Used to obtain the bundleInfo containing applicationInfo. The obtained bundleInfo does not
102     * contain the information of signatureInfo, hapModuleInfo, ability, extensionAbility and permission.
103     *
104     * @syscap SystemCapability.BundleManager.BundleFramework.Core
105     * @atomicservice
106     * @since 11
107     */
108    GET_BUNDLE_INFO_WITH_APPLICATION = 0x00000001,
109    /**
110     * Used to obtain the bundleInfo containing hapModuleInfo. The obtained bundleInfo does not
111     * contain the information of signatureInfo, applicationInfo, ability, extensionAbility and permission.
112     *
113     * @syscap SystemCapability.BundleManager.BundleFramework.Core
114     * @since 9
115     */
116    /**
117     * Used to obtain the bundleInfo containing hapModuleInfo. The obtained bundleInfo does not
118     * contain the information of signatureInfo, applicationInfo, ability, extensionAbility and permission.
119     *
120     * @syscap SystemCapability.BundleManager.BundleFramework.Core
121     * @atomicservice
122     * @since 11
123     */
124    GET_BUNDLE_INFO_WITH_HAP_MODULE = 0x00000002,
125    /**
126     * Used to obtain the bundleInfo containing ability. The obtained bundleInfo does not
127     * contain the information of signatureInfo, applicationInfo, extensionAbility and permission.
128     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
129     *
130     * @syscap SystemCapability.BundleManager.BundleFramework.Core
131     * @since 9
132     */
133    /**
134     * Used to obtain the bundleInfo containing ability. The obtained bundleInfo does not
135     * contain the information of signatureInfo, applicationInfo, extensionAbility and permission.
136     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
137     *
138     * @syscap SystemCapability.BundleManager.BundleFramework.Core
139     * @atomicservice
140     * @since 11
141     */
142    GET_BUNDLE_INFO_WITH_ABILITY = 0x00000004,
143    /**
144     * Used to obtain the bundleInfo containing extensionAbility. The obtained bundleInfo does not
145     * contain the information of signatureInfo, applicationInfo, ability and permission.
146     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
147     *
148     * @syscap SystemCapability.BundleManager.BundleFramework.Core
149     * @since 9
150     */
151    /**
152     * Used to obtain the bundleInfo containing extensionAbility. The obtained bundleInfo does not
153     * contain the information of signatureInfo, applicationInfo, ability and permission.
154     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
155     *
156     * @syscap SystemCapability.BundleManager.BundleFramework.Core
157     * @atomicservice
158     * @since 11
159     */
160    GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY = 0x00000008,
161    /**
162     * Used to obtain the bundleInfo containing permission. The obtained bundleInfo does not
163     * contain the information of signatureInfo, applicationInfo, hapModuleInfo, extensionAbility and ability.
164     *
165     * @syscap SystemCapability.BundleManager.BundleFramework.Core
166     * @since 9
167     */
168    /**
169     * Used to obtain the bundleInfo containing permission. The obtained bundleInfo does not
170     * contain the information of signatureInfo, applicationInfo, hapModuleInfo, extensionAbility and ability.
171     *
172     * @syscap SystemCapability.BundleManager.BundleFramework.Core
173     * @atomicservice
174     * @since 11
175     */
176    GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION = 0x00000010,
177    /**
178     * Used to obtain the metadata contained in applicationInfo, moduleInfo and abilityInfo.
179     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_APPLICATION,
180     * GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY.
181     *
182     * @syscap SystemCapability.BundleManager.BundleFramework.Core
183     * @since 9
184     */
185    /**
186     * Used to obtain the metadata contained in applicationInfo, moduleInfo and abilityInfo.
187     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_APPLICATION,
188     * GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY.
189     *
190     * @syscap SystemCapability.BundleManager.BundleFramework.Core
191     * @atomicservice
192     * @since 11
193     */
194    GET_BUNDLE_INFO_WITH_METADATA = 0x00000020,
195    /**
196     * Used to obtain the default bundleInfo containing disabled application and ability.
197     * The obtained bundleInfo does not contain information of signatureInfo, applicationInfo,
198     * hapModuleInfo, ability, extensionAbility and permission.
199     *
200     * @syscap SystemCapability.BundleManager.BundleFramework.Core
201     * @since 9
202     */
203    /**
204     * Used to obtain the default bundleInfo containing disabled application and ability.
205     * The obtained bundleInfo does not contain information of signatureInfo, applicationInfo,
206     * hapModuleInfo, ability, extensionAbility and permission.
207     *
208     * @syscap SystemCapability.BundleManager.BundleFramework.Core
209     * @atomicservice
210     * @since 11
211     */
212    GET_BUNDLE_INFO_WITH_DISABLE = 0x00000040,
213    /**
214     * Used to obtain the bundleInfo containing signatureInfo. The obtained bundleInfo does not
215     * contain the information of applicationInfo, hapModuleInfo, extensionAbility, ability and permission.
216     *
217     * @syscap SystemCapability.BundleManager.BundleFramework.Core
218     * @since 9
219     */
220    /**
221     * Used to obtain the bundleInfo containing signatureInfo. The obtained bundleInfo does not
222     * contain the information of applicationInfo, hapModuleInfo, extensionAbility, ability and permission.
223     *
224     * @syscap SystemCapability.BundleManager.BundleFramework.Core
225     * @atomicservice
226     * @since 11
227     */
228    GET_BUNDLE_INFO_WITH_SIGNATURE_INFO = 0x00000080,
229    /**
230     * Used to obtain the bundleInfo containing menu configuration in hapModuleInfo.
231     * The obtained bundleInfo does not contain the information of applicationInfo, extensionAbility, ability and permission.
232     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
233     *
234     * @syscap SystemCapability.BundleManager.BundleFramework.Core
235     * @atomicservice
236     * @since 11
237     */
238    GET_BUNDLE_INFO_WITH_MENU = 0x00000100,
239    /**
240     * Used to obtain the bundleInfo containing router map configuration in hapModuleInfo.
241     * The obtained bundleInfo does not contain the information of applicationInfo, extensionAbility, ability and permission.
242     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE.
243     *
244     * @syscap SystemCapability.BundleManager.BundleFramework.Core
245     * @atomicservice
246     * @since 12
247     */
248    GET_BUNDLE_INFO_WITH_ROUTER_MAP = 0x00000200,
249    /**
250     * Used to obtain the skillInfo contained in abilityInfo and extensionInfo.
251     * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE,
252     * GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY.
253     *
254     * @syscap SystemCapability.BundleManager.BundleFramework.Core
255     * @atomicservice
256     * @since 12
257     */
258    GET_BUNDLE_INFO_WITH_SKILL = 0x00000800,
259    /**
260     * Used to return only the applications that have an icon displayed on the homescreen.
261     * Only effective on {@link getAllBundleInfo}
262     *
263     * @syscap SystemCapability.BundleManager.BundleFramework.Core
264     * @systemapi
265     * @since 12
266     */
267    GET_BUNDLE_INFO_ONLY_WITH_LAUNCHER_ABILITY = 0x00001000,
268    /**
269     * Used to obtain the bundleInfo only if any user installed
270     *
271     * @syscap SystemCapability.BundleManager.BundleFramework.Core
272     * @systemapi
273     * @since 12
274     */
275    GET_BUNDLE_INFO_OF_ANY_USER = 0x00002000,
276    /**
277     * Used to return all applications that exclude app clone information.
278     * Only effective on {@link getAllBundleInfo}
279     *
280     * @syscap SystemCapability.BundleManager.BundleFramework.Core
281     * @systemapi
282     * @since 12
283     */
284    GET_BUNDLE_INFO_EXCLUDE_CLONE = 0x00004000,
285  }
286
287  /**
288   * Used to query the enumeration value of applicationInfo. Multiple values can be passed in the form.
289   *
290   * @enum { number }
291   * @syscap SystemCapability.BundleManager.BundleFramework.Core
292   * @systemapi
293   * @since 9
294   */
295  enum ApplicationFlag {
296    /**
297     * Used to obtain the default applicationInfo. The obtained applicationInfo does not contain the information of
298     * permission and metadata.
299     *
300     * @syscap SystemCapability.BundleManager.BundleFramework.Core
301     * @systemapi
302     * @since 9
303     */
304    GET_APPLICATION_INFO_DEFAULT = 0x00000000,
305    /**
306     * Used to obtain the applicationInfo containing permission.
307     *
308     * @syscap SystemCapability.BundleManager.BundleFramework.Core
309     * @systemapi
310     * @since 9
311     */
312    GET_APPLICATION_INFO_WITH_PERMISSION = 0x00000001,
313    /**
314     * Used to obtain the applicationInfo containing metadata.
315     *
316     * @syscap SystemCapability.BundleManager.BundleFramework.Core
317     * @systemapi
318     * @since 9
319     */
320    GET_APPLICATION_INFO_WITH_METADATA = 0x00000002,
321    /**
322     * Used to obtain the applicationInfo containing disabled application.
323     *
324     * @syscap SystemCapability.BundleManager.BundleFramework.Core
325     * @systemapi
326     * @since 9
327     */
328    GET_APPLICATION_INFO_WITH_DISABLE = 0x00000004
329  }
330
331  /**
332   * Used to query the enumeration value of abilityInfo. Multiple values can be passed in the form.
333   *
334   * @enum { number }
335   * @syscap SystemCapability.BundleManager.BundleFramework.Core
336   * @systemapi
337   * @since 9
338   */
339  enum AbilityFlag {
340    /**
341     * Used to obtain the default abilityInfo. The obtained abilityInfo does not contain the information of
342     * permission, metadata and disabled abilityInfo.
343     *
344     * @syscap SystemCapability.BundleManager.BundleFramework.Core
345     * @systemapi
346     * @since 9
347     */
348    GET_ABILITY_INFO_DEFAULT = 0x00000000,
349    /**
350     * Used to obtain the abilityInfo containing permission.
351     *
352     * @syscap SystemCapability.BundleManager.BundleFramework.Core
353     * @systemapi
354     * @since 9
355     */
356    GET_ABILITY_INFO_WITH_PERMISSION = 0x00000001,
357    /**
358     * Used to obtain the abilityInfo containing applicationInfo.
359     *
360     * @syscap SystemCapability.BundleManager.BundleFramework.Core
361     * @systemapi
362     * @since 9
363     */
364    GET_ABILITY_INFO_WITH_APPLICATION = 0x00000002,
365    /**
366     * Used to obtain the abilityInfo containing metadata.
367     *
368     * @syscap SystemCapability.BundleManager.BundleFramework.Core
369     * @systemapi
370     * @since 9
371     */
372    GET_ABILITY_INFO_WITH_METADATA = 0x00000004,
373    /**
374     * Used to obtain the abilityInfo containing disabled abilityInfo.
375     *
376     * @syscap SystemCapability.BundleManager.BundleFramework.Core
377     * @systemapi
378     * @since 9
379     */
380    GET_ABILITY_INFO_WITH_DISABLE = 0x00000008,
381    /**
382     * Used to obtain the abilityInfo only for system app.
383     *
384     * @syscap SystemCapability.BundleManager.BundleFramework.Core
385     * @systemapi
386     * @since 9
387     */
388    /**
389     * Used to obtain the abilityInfo only for system app.
390     *
391     * @syscap SystemCapability.BundleManager.BundleFramework.Core
392     * @systemapi
393     * @since 11
394     */
395    GET_ABILITY_INFO_ONLY_SYSTEM_APP = 0x00000010,
396    /**
397     * Used to obtain the abilityInfo with domain verification.
398     *
399     * @syscap SystemCapability.BundleManager.BundleFramework.Core
400     * @systemapi
401     * @since 12
402     */
403    GET_ABILITY_INFO_WITH_APP_LINKING = 0x00000040,
404    /**
405     * Used to obtain the abilityInfo with Skill
406     *
407     * @syscap SystemCapability.BundleManager.BundleFramework.Core
408     * @systemapi
409     * @since 12
410     */
411    GET_ABILITY_INFO_WITH_SKILL = 0x00000080,
412  }
413
414  /**
415   * Used to query the enumeration value of ExtensionAbilityInfo. Multiple values can be passed in the form.
416   *
417   * @enum { number }
418   * @syscap SystemCapability.BundleManager.BundleFramework.Core
419   * @systemapi
420   * @since 9
421   */
422  enum ExtensionAbilityFlag {
423    /**
424     * Used to obtain the default extensionAbilityInfo. The obtained extensionAbilityInfo does not contain the information of
425     * permission, metadata and disabled abilityInfo.
426     *
427     * @syscap SystemCapability.BundleManager.BundleFramework.Core
428     * @systemapi
429     * @since 9
430     */
431    GET_EXTENSION_ABILITY_INFO_DEFAULT = 0x00000000,
432    /**
433     * Used to obtain the extensionAbilityInfo containing permission.
434     *
435     * @syscap SystemCapability.BundleManager.BundleFramework.Core
436     * @systemapi
437     * @since 9
438     */
439    GET_EXTENSION_ABILITY_INFO_WITH_PERMISSION = 0x00000001,
440    /**
441     * Used to obtain the extensionAbilityInfo containing applicationInfo.
442     *
443     * @syscap SystemCapability.BundleManager.BundleFramework.Core
444     * @systemapi
445     * @since 9
446     */
447    GET_EXTENSION_ABILITY_INFO_WITH_APPLICATION = 0x00000002,
448    /**
449     * Used to obtain the extensionAbilityInfo containing metadata.
450     *
451     * @syscap SystemCapability.BundleManager.BundleFramework.Core
452     * @systemapi
453     * @since 9
454     */
455    GET_EXTENSION_ABILITY_INFO_WITH_METADATA = 0x00000004,
456    /**
457     * Used to obtain the extensionAbilityInfo with Skill
458     *
459     * @syscap SystemCapability.BundleManager.BundleFramework.Core
460     * @systemapi
461     * @since 12
462     */
463    GET_EXTENSION_ABILITY_INFO_WITH_SKILL = 0x00000010,
464  }
465
466  /**
467   * This enumeration value is used to identify various types of extension ability
468   *
469   * @enum { number }
470   * @syscap SystemCapability.BundleManager.BundleFramework.Core
471   * @since 9
472   */
473  /**
474   * This enumeration value is used to identify various types of extension ability
475   *
476   * @enum { number }
477   * @syscap SystemCapability.BundleManager.BundleFramework.Core
478   * @atomicservice
479   * @since 11
480   */
481  export enum ExtensionAbilityType {
482    /**
483     * Indicates extension info with type of form
484     *
485     * @syscap SystemCapability.BundleManager.BundleFramework.Core
486     * @since 9
487     */
488    /**
489     * Indicates extension info with type of form
490     *
491     * @syscap SystemCapability.BundleManager.BundleFramework.Core
492     * @atomicservice
493     * @since 11
494     */
495    FORM = 0,
496
497    /**
498     * Indicates extension info with type of work schedule
499     *
500     * @syscap SystemCapability.BundleManager.BundleFramework.Core
501     * @since 9
502     */
503    WORK_SCHEDULER = 1,
504
505    /**
506     * Indicates extension info with type of input method
507     *
508     * @syscap SystemCapability.BundleManager.BundleFramework.Core
509     * @since 9
510     */
511    INPUT_METHOD = 2,
512
513    /**
514     * Indicates extension info with type of service
515     *
516     * @syscap SystemCapability.BundleManager.BundleFramework.Core
517     * @since 9
518     */
519    SERVICE = 3,
520
521    /**
522     * Indicates extension info with type of accessibility
523     *
524     * @syscap SystemCapability.BundleManager.BundleFramework.Core
525     * @since 9
526     */
527    ACCESSIBILITY = 4,
528
529    /**
530     * Indicates extension info with type of dataShare
531     *
532     * @syscap SystemCapability.BundleManager.BundleFramework.Core
533     * @since 9
534     */
535    DATA_SHARE = 5,
536
537    /**
538     * Indicates extension info with type of filesShare
539     *
540     * @syscap SystemCapability.BundleManager.BundleFramework.Core
541     * @since 9
542     */
543    FILE_SHARE = 6,
544
545    /**
546     * Indicates extension info with type of staticSubscriber
547     *
548     * @syscap SystemCapability.BundleManager.BundleFramework.Core
549     * @since 9
550     */
551    STATIC_SUBSCRIBER = 7,
552
553    /**
554     * Indicates extension info with type of wallpaper
555     *
556     * @syscap SystemCapability.BundleManager.BundleFramework.Core
557     * @since 9
558     */
559    WALLPAPER = 8,
560
561    /**
562     * Indicates extension info with type of backup
563     *
564     * @syscap SystemCapability.BundleManager.BundleFramework.Core
565     * @since 9
566     */
567    BACKUP = 9,
568
569    /**
570     * Indicates extension info with type of window
571     *
572     * @syscap SystemCapability.BundleManager.BundleFramework.Core
573     * @since 9
574     */
575    WINDOW = 10,
576
577    /**
578     * Indicates extension info with type of enterprise admin
579     *
580     * @syscap SystemCapability.BundleManager.BundleFramework.Core
581     * @since 9
582     */
583    ENTERPRISE_ADMIN = 11,
584
585    /**
586     * Indicates extension info with type of thumbnail
587     *
588     * @syscap SystemCapability.BundleManager.BundleFramework.Core
589     * @since 9
590     */
591    THUMBNAIL = 13,
592
593    /**
594     * Indicates extension info with type of preview
595     *
596     * @syscap SystemCapability.BundleManager.BundleFramework.Core
597     * @since 9
598     */
599    PREVIEW = 14,
600
601    /**
602     * Indicates extension info with type of print
603     *
604     * @syscap SystemCapability.BundleManager.BundleFramework.Core
605     * @since 10
606     */
607    PRINT = 15,
608
609    /**
610     * Indicates extension info with type of share
611     *
612     * @syscap SystemCapability.BundleManager.BundleFramework.Core
613     * @since 10
614     */
615    SHARE = 16,
616
617    /**
618     * Indicates extension info with type of push
619     *
620     * @syscap SystemCapability.BundleManager.BundleFramework.Core
621     * @since 10
622     */
623    PUSH = 17,
624
625    /**
626     * Indicates extension info with type of driver
627     *
628     * @syscap SystemCapability.BundleManager.BundleFramework.Core
629     * @since 10
630     */
631    DRIVER = 18,
632
633    /**
634     * Indicates extension info with type of action
635     *
636     * @syscap SystemCapability.BundleManager.BundleFramework.Core
637     * @since 10
638     */
639    ACTION = 19,
640
641    /**
642     * Indicates extension info with type of ads service
643     *
644     * @syscap SystemCapability.BundleManager.BundleFramework.Core
645     * @since 11
646     */
647    ADS_SERVICE = 20,
648
649    /**
650     * Indicates extension info with type of embedded UI
651     *
652     * @syscap SystemCapability.BundleManager.BundleFramework.Core
653     * @since 12
654     */
655    EMBEDDED_UI = 21,
656
657    /**
658     * Indicates extension info with type of insight intent UI
659     *
660     * @syscap SystemCapability.BundleManager.BundleFramework.Core
661     * @since 12
662     */
663    INSIGHT_INTENT_UI = 22,
664
665    /**
666     * Indicates extension info with type of FENCE
667     *
668     * @syscap SystemCapability.BundleManager.BundleFramework.Core
669     * @since 18
670     */
671    FENCE = 24,
672
673    /**
674     * Indicates extension info with type of asset acceleration
675     *
676     * @syscap SystemCapability.BundleManager.BundleFramework.Core
677     * @since 18
678     */
679    ASSET_ACCELERATION = 26,
680
681    /**
682     * Indicates extension info with type of form edit
683     *
684     * @syscap SystemCapability.BundleManager.BundleFramework.Core
685     * @since 18
686     */
687    FORM_EDIT = 27,
688
689    /**
690     * Indicates extension info with type of unspecified
691     *
692     * @syscap SystemCapability.BundleManager.BundleFramework.Core
693     * @since 9
694     */
695    UNSPECIFIED = 255
696  }
697
698  /**
699   * PermissionGrantState
700   *
701   * @enum { number }
702   * @syscap SystemCapability.BundleManager.BundleFramework.Core
703   * @since 9
704   */
705  /**
706   * PermissionGrantState
707   *
708   * @enum { number }
709   * @syscap SystemCapability.BundleManager.BundleFramework.Core
710   * @atomicservice
711   * @since 11
712   */
713  export enum PermissionGrantState {
714    /**
715     * PERMISSION_DENIED
716     *
717     * @syscap SystemCapability.BundleManager.BundleFramework.Core
718     * @since 9
719     */
720    /**
721     * PERMISSION_DENIED
722     *
723     * @syscap SystemCapability.BundleManager.BundleFramework.Core
724     * @atomicservice
725     * @since 11
726     */
727    PERMISSION_DENIED = -1,
728
729    /**
730     * PERMISSION_GRANTED
731     *
732     * @syscap SystemCapability.BundleManager.BundleFramework.Core
733     * @since 9
734     */
735    /**
736     * PERMISSION_GRANTED
737     *
738     * @syscap SystemCapability.BundleManager.BundleFramework.Core
739     * @atomicservice
740     * @since 11
741     */
742    PERMISSION_GRANTED = 0
743  }
744
745  /**
746   * Support window mode
747   *
748   * @enum { number }
749   * @syscap SystemCapability.BundleManager.BundleFramework.Core
750   * @since 9
751   */
752  /**
753   * Support window mode
754   *
755   * @enum { number }
756   * @syscap SystemCapability.BundleManager.BundleFramework.Core
757   * @atomicservice
758   * @since 11
759   */
760  export enum SupportWindowMode {
761    /**
762     * Indicates supported window mode of full screen mode
763     *
764     * @syscap SystemCapability.BundleManager.BundleFramework.Core
765     * @since 9
766     */
767    /**
768     * Indicates supported window mode of full screen mode
769     *
770     * @syscap SystemCapability.BundleManager.BundleFramework.Core
771     * @atomicservice
772     * @since 11
773     */
774    FULL_SCREEN = 0,
775    /**
776     * Indicates supported window mode of split mode
777     *
778     * @syscap SystemCapability.BundleManager.BundleFramework.Core
779     * @since 9
780     */
781    /**
782     * Indicates supported window mode of split mode
783     *
784     * @syscap SystemCapability.BundleManager.BundleFramework.Core
785     * @atomicservice
786     * @since 11
787     */
788    SPLIT = 1,
789    /**
790     * Indicates supported window mode of floating mode
791     *
792     * @syscap SystemCapability.BundleManager.BundleFramework.Core
793     * @since 9
794     */
795    /**
796     * Indicates supported window mode of floating mode
797     *
798     * @syscap SystemCapability.BundleManager.BundleFramework.Core
799     * @atomicservice
800     * @since 11
801     */
802    FLOATING = 2
803  }
804
805  /**
806   * Launch type
807   *
808   * @enum { number }
809   * @syscap SystemCapability.BundleManager.BundleFramework.Core
810   * @since 9
811   */
812  /**
813   * Launch type
814   *
815   * @enum { number }
816   * @syscap SystemCapability.BundleManager.BundleFramework.Core
817   * @crossplatform
818   * @since 10
819   */
820  /**
821   * Launch type
822   *
823   * @enum { number }
824   * @syscap SystemCapability.BundleManager.BundleFramework.Core
825   * @crossplatform
826   * @atomicservice
827   * @since 11
828   */
829  export enum LaunchType {
830    /**
831     * Indicates that the ability has only one instance
832     *
833     * @syscap SystemCapability.BundleManager.BundleFramework.Core
834     * @since 9
835     */
836    /**
837     * Indicates that the ability has only one instance
838     *
839     * @syscap SystemCapability.BundleManager.BundleFramework.Core
840     * @crossplatform
841     * @since 10
842     */
843    /**
844     * Indicates that the ability has only one instance
845     *
846     * @syscap SystemCapability.BundleManager.BundleFramework.Core
847     * @crossplatform
848     * @atomicservice
849     * @since 11
850     */
851    SINGLETON = 0,
852
853    /**
854     * Indicates that the ability can have multiple instances
855     *
856     * @syscap SystemCapability.BundleManager.BundleFramework.Core
857     * @since 9
858     */
859    /**
860     * Indicates that the ability can have multiple instances
861     *
862     * @syscap SystemCapability.BundleManager.BundleFramework.Core
863     * @crossplatform
864     * @since 10
865     */
866    /**
867     * Indicates that the ability can have multiple instances
868     *
869     * @syscap SystemCapability.BundleManager.BundleFramework.Core
870     * @crossplatform
871     * @atomicservice
872     * @since 11
873     */
874    MULTITON = 1,
875
876    /**
877     * Indicates that the ability can have specified instances
878     *
879     * @syscap SystemCapability.BundleManager.BundleFramework.Core
880     * @since 9
881     */
882    /**
883     * Indicates that the ability can have specified instances
884     *
885     * @syscap SystemCapability.BundleManager.BundleFramework.Core
886     * @atomicservice
887     * @since 11
888     */
889    SPECIFIED = 2
890  }
891
892  /**
893   * Indicates ability type
894   *
895   * @enum { number }
896   * @syscap SystemCapability.BundleManager.BundleFramework.Core
897   * @FAModelOnly
898   * @since 9
899   */
900  export enum AbilityType {
901    /**
902     * Indicates that the ability has a UI
903     *
904     * @syscap SystemCapability.BundleManager.BundleFramework.Core
905     * @FAModelOnly
906     * @since 9
907     */
908    PAGE = 1,
909
910    /**
911     * Indicates that the ability does not have a UI
912     *
913     * @syscap SystemCapability.BundleManager.BundleFramework.Core
914     * @FAModelOnly
915     * @since 9
916     */
917    SERVICE = 2,
918
919    /**
920     * Indicates that the ability is used to provide data access services
921     *
922     * @syscap SystemCapability.BundleManager.BundleFramework.Core
923     * @FAModelOnly
924     * @since 9
925     */
926    DATA = 3
927  }
928
929  /**
930   * Display orientation
931   *
932   * @enum { number }
933   * @syscap SystemCapability.BundleManager.BundleFramework.Core
934   * @since 9
935   */
936  /**
937   * Display orientation
938   *
939   * @enum { number }
940   * @syscap SystemCapability.BundleManager.BundleFramework.Core
941   * @atomicservice
942   * @since 11
943   */
944  export enum DisplayOrientation {
945    /**
946     * Indicates that the system automatically determines the display orientation
947     *
948     * @syscap SystemCapability.BundleManager.BundleFramework.Core
949     * @since 9
950     */
951    /**
952     * Indicates that the system automatically determines the display orientation
953     *
954     * @syscap SystemCapability.BundleManager.BundleFramework.Core
955     * @atomicservice
956     * @since 11
957     */
958    UNSPECIFIED,
959
960    /**
961     * Indicates the landscape orientation
962     *
963     * @syscap SystemCapability.BundleManager.BundleFramework.Core
964     * @since 9
965     */
966    /**
967     * Indicates the landscape orientation
968     *
969     * @syscap SystemCapability.BundleManager.BundleFramework.Core
970     * @atomicservice
971     * @since 11
972     */
973    LANDSCAPE,
974
975    /**
976     * Indicates the portrait orientation
977     *
978     * @syscap SystemCapability.BundleManager.BundleFramework.Core
979     * @since 9
980     */
981    /**
982     * Indicates the portrait orientation
983     *
984     * @syscap SystemCapability.BundleManager.BundleFramework.Core
985     * @atomicservice
986     * @since 11
987     */
988    PORTRAIT,
989
990    /**
991     * Indicates the page ability orientation is the same as that of the nearest ability in the stack
992     *
993     * @syscap SystemCapability.BundleManager.BundleFramework.Core
994     * @since 9
995     */
996    /**
997     * Indicates the page ability orientation is the same as that of the nearest ability in the stack
998     *
999     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1000     * @atomicservice
1001     * @since 11
1002     */
1003    FOLLOW_RECENT,
1004
1005    /**
1006     * Indicates the inverted landscape orientation
1007     *
1008     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1009     * @since 9
1010     */
1011    /**
1012     * Indicates the inverted landscape orientation
1013     *
1014     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1015     * @atomicservice
1016     * @since 11
1017     */
1018    LANDSCAPE_INVERTED,
1019
1020    /**
1021     * Indicates the inverted portrait orientation
1022     *
1023     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1024     * @since 9
1025     */
1026    /**
1027     * Indicates the inverted portrait orientation
1028     *
1029     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1030     * @atomicservice
1031     * @since 11
1032     */
1033    PORTRAIT_INVERTED,
1034
1035    /**
1036     * Indicates the orientation can be auto-rotated
1037     *
1038     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1039     * @since 9
1040     */
1041    /**
1042     * Indicates the orientation can be auto-rotated
1043     *
1044     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1045     * @atomicservice
1046     * @since 11
1047     */
1048    AUTO_ROTATION,
1049
1050    /**
1051     * Indicates the landscape orientation rotated with sensor
1052     *
1053     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1054     * @since 9
1055     */
1056    /**
1057     * Indicates the landscape orientation rotated with sensor
1058     *
1059     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1060     * @atomicservice
1061     * @since 11
1062     */
1063    AUTO_ROTATION_LANDSCAPE,
1064
1065    /**
1066     * Indicates the portrait orientation rotated with sensor
1067     *
1068     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1069     * @since 9
1070     */
1071    /**
1072     * Indicates the portrait orientation rotated with sensor
1073     *
1074     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1075     * @atomicservice
1076     * @since 11
1077     */
1078    AUTO_ROTATION_PORTRAIT,
1079
1080    /**
1081     * Indicates the sensor restricted mode
1082     *
1083     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1084     * @since 9
1085     */
1086    /**
1087     * Indicates the sensor restricted mode
1088     *
1089     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1090     * @atomicservice
1091     * @since 11
1092     */
1093    AUTO_ROTATION_RESTRICTED,
1094
1095    /**
1096     * Indicates the sensor landscape restricted mode
1097     *
1098     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1099     * @since 9
1100     */
1101    /**
1102     * Indicates the sensor landscape restricted mode
1103     *
1104     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1105     * @atomicservice
1106     * @since 11
1107     */
1108    AUTO_ROTATION_LANDSCAPE_RESTRICTED,
1109
1110    /**
1111     * Indicates the sensor portrait restricted mode
1112     *
1113     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1114     * @since 9
1115     */
1116    /**
1117     * Indicates the sensor portrait restricted mode
1118     *
1119     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1120     * @atomicservice
1121     * @since 11
1122     */
1123    AUTO_ROTATION_PORTRAIT_RESTRICTED,
1124
1125    /**
1126     * Indicates the locked orientation mode
1127     *
1128     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1129     * @since 9
1130     */
1131    /**
1132     * Indicates the locked orientation mode
1133     *
1134     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1135     * @atomicservice
1136     * @since 11
1137     */
1138    LOCKED,
1139
1140    /**
1141     * Indicates the system automatically determines the sensor restricted mode
1142     *
1143     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1144     * @atomicservice
1145     * @since 12
1146     */
1147    AUTO_ROTATION_UNSPECIFIED,
1148
1149    /**
1150     * Indicates the orientation follow the desktop rotate mode
1151     *
1152     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1153     * @atomicservice
1154     * @since 12
1155     */
1156    FOLLOW_DESKTOP
1157  }
1158
1159  /**
1160   * Indicates module type
1161   *
1162   * @enum { number }
1163   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1164   * @since 9
1165   */
1166  /**
1167   * Indicates module type
1168   *
1169   * @enum { number }
1170   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1171   * @atomicservice
1172   * @since 11
1173   */
1174  export enum ModuleType {
1175    /**
1176     * Indicates entry type
1177     *
1178     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1179     * @since 9
1180     */
1181    /**
1182     * Indicates entry type
1183     *
1184     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1185     * @atomicservice
1186     * @since 11
1187     */
1188    ENTRY = 1,
1189    /**
1190     * Indicates feature type
1191     *
1192     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1193     * @since 9
1194     */
1195    /**
1196     * Indicates feature type
1197     *
1198     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1199     * @atomicservice
1200     * @since 11
1201     */
1202    FEATURE = 2,
1203    /**
1204     * Indicates shared type
1205     *
1206     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1207     * @since 9
1208     */
1209    /**
1210     * Indicates shared type
1211     *
1212     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1213     * @atomicservice
1214     * @since 11
1215     */
1216    SHARED = 3
1217  }
1218
1219  /**
1220   * Indicates bundle type
1221   *
1222   * @enum { number }
1223   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1224   * @since 9
1225   */
1226  /**
1227   * Indicates bundle type
1228   *
1229   * @enum { number }
1230   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1231   * @atomicservice
1232   * @since 11
1233   */
1234  export enum BundleType {
1235    /**
1236     * Indicates app
1237     *
1238     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1239     * @since 9
1240     */
1241    /**
1242     * Indicates app
1243     *
1244     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1245     * @atomicservice
1246     * @since 11
1247     */
1248    APP = 0,
1249    /**
1250     * Indicates atomic service
1251     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1252     * @since 9
1253     */
1254    /**
1255     * Indicates atomic service
1256     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1257     * @atomicservice
1258     * @since 11
1259     */
1260    ATOMIC_SERVICE = 1
1261  }
1262
1263  /**
1264   * Shared bundle compatible policy
1265   *
1266   * @enum { number }
1267   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1268   * @since 10
1269   */
1270  /**
1271   * Shared bundle compatible policy
1272   *
1273   * @enum { number }
1274   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1275   * @atomicservice
1276   * @since 11
1277   */
1278  export enum CompatiblePolicy {
1279    /**
1280     * Indicates that the app is a shared bundle and the shared bundle type is backward compatibility
1281     *
1282     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1283     * @since 10
1284     */
1285    /**
1286     * Indicates that the app is a shared bundle and the shared bundle type is backward compatibility
1287     *
1288     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1289     * @atomicservice
1290     * @since 11
1291     */
1292    BACKWARD_COMPATIBILITY = 1
1293  }
1294
1295  /**
1296   * This enumeration value is used to identify various types of JSON profile.
1297   *
1298   * @enum { number }
1299   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1300   * @systemapi
1301   * @since 11
1302   */
1303  export enum ProfileType {
1304    /**
1305     * Indicates JSON profile about intent framework.
1306     *
1307     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1308     * @systemapi
1309     * @since 11
1310     */
1311    INTENT_PROFILE = 1
1312  }
1313
1314  /**
1315   * This enumeration value is used to identify the distribution type of application.
1316   *
1317   * @enum { number }
1318   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1319   * @systemapi
1320   * @since 12
1321   */
1322  export enum AppDistributionType {
1323    /**
1324     * Indicates the application is distributed by the App Gallery.
1325     *
1326     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1327     * @systemapi
1328     * @since 12
1329     */
1330    APP_GALLERY = 1,
1331
1332    /**
1333     * Indicates the enterprise application, which can be installed in personal devices.
1334     *
1335     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1336     * @systemapi
1337     * @since 12
1338     */
1339    ENTERPRISE = 2,
1340
1341    /**
1342     * Indicates the normal enterprise application.
1343     * This kind of application can only be installed on enterprise devices through the enterprise MDM application and does not require device management privileges.
1344     *
1345     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1346     * @systemapi
1347     * @since 12
1348     */
1349    ENTERPRISE_NORMAL = 3,
1350
1351    /**
1352     * Indicates the enterprise MDM application, which can only be installed on enterprise devices.
1353     * This kind of application requires device management privileges, such as remote locking, which can install normal enterprise applications, etc.
1354     *
1355     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1356     * @systemapi
1357     * @since 12
1358     */
1359    ENTERPRISE_MDM = 4,
1360
1361    /**
1362     * Indicates the system preinstalled application.
1363     *
1364     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1365     * @systemapi
1366     * @since 12
1367     */
1368    OS_INTEGRATION = 5,
1369
1370    /**
1371     * Indicates the crowdtesting application.
1372     *
1373     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1374     * @systemapi
1375     * @since 12
1376     */
1377    CROWDTESTING = 6,
1378
1379    /**
1380     * Indicates other types of application.
1381     *
1382     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1383     * @systemapi
1384     * @since 12
1385     */
1386    NONE = 7
1387  }
1388
1389  /**
1390   * This enumeration value is used to identify various types of extension ability
1391   *
1392   * @enum { number }
1393   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1394   * @since 12
1395  */
1396  export enum MultiAppModeType {
1397    /**
1398     * Indicates multi app mode with type of unspecified
1399     *
1400     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1401     * @since 12
1402     */
1403    UNSPECIFIED = 0,
1404    /**
1405     * Indicates multi app mode with type of multiInstance
1406     *
1407     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1408     * @since 12
1409     */
1410    MULTI_INSTANCE = 1,
1411    /**
1412     * Indicates multi app mode with type of appClone
1413     *
1414     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1415     * @since 12
1416    */
1417    APP_CLONE = 2,
1418  }
1419
1420  /**
1421   * This enumeration value is used to identify various flags of application
1422   *
1423   * @enum { number }
1424   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1425   * @systemapi
1426   * @since 12
1427  */
1428  export enum ApplicationInfoFlag {
1429    /**
1430     * Indicates the application is currently installed for the calling user.
1431     *
1432     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1433     * @systemapi
1434     * @since 12
1435     */
1436    FLAG_INSTALLED = 0x00000001,
1437    /**
1438     * Indicates the application is currently installed for the other user.
1439     *
1440     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1441     * @systemapi
1442     * @since 15
1443     */
1444    FLAG_OTHER_INSTALLED = 0x00000010,
1445    /**
1446     * Indicates the application is a preinstall app.
1447     *
1448     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1449     * @systemapi
1450     * @since 15
1451     */
1452    FLAG_PREINSTALLED_APP = 0x00000020,
1453    /**
1454     * Indicates the application is an updated preinstall app.
1455     *
1456     * @syscap SystemCapability.BundleManager.BundleFramework.Core
1457     * @systemapi
1458     * @since 15
1459     */
1460    FLAG_PREINSTALLED_APP_UPDATE = 0x00000040,
1461  }
1462
1463  /**
1464   * Obtains own bundleInfo.
1465   *
1466   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1467   * @returns { Promise<BundleInfo> } The result of getting the bundle info.
1468   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1469   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1470   * @since 9
1471   */
1472  /**
1473   * Obtains own bundleInfo.
1474   *
1475   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1476   * @returns { Promise<BundleInfo> } The result of getting the bundle info.
1477   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1478   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1479   * @atomicservice
1480   * @since 11
1481   */
1482  function getBundleInfoForSelf(bundleFlags: number): Promise<BundleInfo>;
1483
1484  /**
1485   * Obtains own bundleInfo.
1486   *
1487   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1488   * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
1489   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1490   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1491   * @since 9
1492   */
1493  /**
1494   * Obtains own bundleInfo.
1495   *
1496   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1497   * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
1498   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1499   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1500   * @atomicservice
1501   * @since 11
1502   */
1503  function getBundleInfoForSelf(bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
1504
1505  /**
1506   * Obtains own bundleInfo.
1507   *
1508   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1509   * @returns { BundleInfo } The result of getting the bundle info.
1510   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1511   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1512   * @since 10
1513   */
1514  /**
1515   * Obtains own bundleInfo.
1516   *
1517   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1518   * @returns { BundleInfo } The result of getting the bundle info.
1519   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1520   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1521   * @atomicservice
1522   * @since 11
1523   */
1524  function getBundleInfoForSelfSync(bundleFlags: number): BundleInfo;
1525
1526  /**
1527   * Obtains bundleInfo based on bundleName, bundleFlags.
1528   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
1529   *
1530   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1531   * @param { string } bundleName - Indicates the application bundle name to be queried.
1532   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1533   * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
1534   * @throws { BusinessError } 201 - Permission denied.
1535   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1536   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1537   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1538   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1539   * @since 14
1540   */
1541  function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
1542
1543  /**
1544   * Obtains bundleInfo based on bundleName, bundleFlags and userId.
1545   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
1546   *
1547   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1548   * @param { string } bundleName - Indicates the application bundle name to be queried.
1549   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1550   * @param { number } userId - Indicates the user ID or do not pass user ID.
1551   * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result.
1552   * @throws { BusinessError } 201 - Permission denied.
1553   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1554   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1555   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1556   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1557   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1558   * @since 14
1559   */
1560  function getBundleInfo(bundleName: string,
1561    bundleFlags: number, userId: number, callback: AsyncCallback<BundleInfo>): void;
1562
1563  /**
1564   * Obtains bundleInfo based on bundleName, bundleFlags and userId.
1565   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
1566   *
1567   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1568   * @param { string } bundleName - Indicates the application bundle name to be queried.
1569   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
1570   * @param { number } userId - Indicates the user ID or do not pass user ID.
1571   * @returns { Promise<BundleInfo> } The result of getting the bundle info.
1572   * @throws { BusinessError } 201 - Permission denied.
1573   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1574   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1575   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1576   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1577   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1578   * @since 14
1579   */
1580  function getBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise<BundleInfo>;
1581
1582  /**
1583   * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1584   *
1585   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1586   * @param { string } bundleName - Indicates the application bundle name to be queried.
1587   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1588   * @param { AsyncCallback<ApplicationInfo> } callback - The callback of getting application info result.
1589   * @throws { BusinessError } 201 - Permission denied.
1590   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1591   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1592   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1593   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1594   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1595   * @systemapi
1596   * @since 9
1597   */
1598  function getApplicationInfo(bundleName: string, appFlags: number, callback: AsyncCallback<ApplicationInfo>): void;
1599
1600  /**
1601   * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1602   *
1603   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1604   * @param { string } bundleName - Indicates the application bundle name to be queried.
1605   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1606   * @param { number } userId - Indicates the user ID or do not pass user ID.
1607   * @param { AsyncCallback<ApplicationInfo> } callback - The callback of getting application info result.
1608   * @throws { BusinessError } 201 - Permission denied.
1609   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1610   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1611   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1612   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1613   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1614   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1615   * @systemapi
1616   * @since 9
1617   */
1618  function getApplicationInfo(bundleName: string,
1619    appFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>): void;
1620
1621  /**
1622   * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1623   *
1624   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1625   * @param { string } bundleName - Indicates the application bundle name to be queried.
1626   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1627   * @param { number } userId - Indicates the user ID or do not pass user ID.
1628   * @returns { Promise<ApplicationInfo> } The result of getting the application info.
1629   * @throws { BusinessError } 201 - Permission denied.
1630   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1631   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1632   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1633   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1634   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1635   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1636   * @systemapi
1637   * @since 9
1638   */
1639  function getApplicationInfo(bundleName: string, appFlags: number, userId?: number): Promise<ApplicationInfo>;
1640
1641  /**
1642   * Obtains BundleInfo of all bundles available in the system.
1643   *
1644   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1645   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
1646   * @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects.
1647   * @throws { BusinessError } 201 - Permission denied.
1648   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1649   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1650   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1651   * @systemapi
1652   * @since 9
1653   */
1654  function getAllBundleInfo(bundleFlags: number, callback: AsyncCallback<Array<BundleInfo>>): void;
1655
1656  /**
1657   * Obtains BundleInfo of all bundles available in the system.
1658   *
1659   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1660   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
1661   * @param { number } userId - Indicates the user id.
1662   * @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects.
1663   * @throws { BusinessError } 201 - Permission denied.
1664   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1665   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1666   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1667   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1668   * @systemapi
1669   * @since 9
1670   */
1671  function getAllBundleInfo(bundleFlags: number, userId: number, callback: AsyncCallback<Array<BundleInfo>>): void;
1672
1673  /**
1674   * Obtains BundleInfo of all bundles available in the system.
1675   *
1676   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1677   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned.
1678   * @param { number } userId - Indicates the user id.
1679   * @returns { Promise<Array<BundleInfo>> } Returns a list of BundleInfo objects.
1680   * @throws { BusinessError } 201 - Permission denied.
1681   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1682   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1683   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1684   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1685   * @systemapi
1686   * @since 9
1687   */
1688  function getAllBundleInfo(bundleFlags: number, userId?: number): Promise<Array<BundleInfo>>;
1689
1690  /**
1691   * Obtains information about all installed applications of a specified user.
1692   *
1693   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1694   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1695   * @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects.
1696   * @throws { BusinessError } 201 - Permission denied.
1697   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1698   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1699   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1700   * @systemapi
1701   * @since 9
1702   */
1703  function getAllApplicationInfo(appFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
1704
1705  /**
1706   * Obtains information about all installed applications of a specified user.
1707   *
1708   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1709   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1710   * @param { number } userId - Indicates the user ID or do not pass user ID.
1711   * @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects.
1712   * @throws { BusinessError } 201 - Permission denied.
1713   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1714   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1715   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1716   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1717   * @systemapi
1718   * @since 9
1719   */
1720  function getAllApplicationInfo(appFlags: number,
1721    userId: number, callback: AsyncCallback<Array<ApplicationInfo>>): void;
1722
1723  /**
1724   * Obtains information about all installed applications of a specified user.
1725   *
1726   * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST
1727   * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned.
1728   * @param { number } userId - Indicates the user ID or do not pass user ID.
1729   * @returns { Promise<Array<ApplicationInfo>> } Returns a list of ApplicationInfo objects.
1730   * @throws { BusinessError } 201 - Permission denied.
1731   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1732   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
1733   * @throws { BusinessError } 17700004 - The specified user ID is not found.
1734   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1735   * @systemapi
1736   * @since 9
1737   */
1738  function getAllApplicationInfo(appFlags: number, userId?: number): Promise<Array<ApplicationInfo>>;
1739
1740  /**
1741   * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1742   *
1743   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1744   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1745   * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
1746   * @param { AsyncCallback<Array<AbilityInfo>> } callback - The callback of querying ability info result.
1747   * @throws { BusinessError } 201 - Permission denied.
1748   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1749   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1750   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1751   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1752   * @throws { BusinessError } 17700003 - The specified ability is not found.
1753   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1754   * @throws { BusinessError } 17700029 - The specified ability is disabled.
1755   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1756   * @systemapi
1757   * @since 9
1758   */
1759  function queryAbilityInfo(want: Want, abilityFlags: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
1760
1761  /**
1762   * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1763   *
1764   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1765   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1766   * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
1767   * @param { number } userId - userId Indicates the user ID.
1768   * @param { AsyncCallback<Array<AbilityInfo>> } callback - The callback of querying ability info result.
1769   * @throws { BusinessError } 201 - Permission denied.
1770   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1771   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1772   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1773   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1774   * @throws { BusinessError } 17700003 - The specified ability is not found.
1775   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1776   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1777   * @throws { BusinessError } 17700029 - The specified ability is disabled.
1778   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1779   * @systemapi
1780   * @since 9
1781   */
1782  function queryAbilityInfo(want: Want,
1783    abilityFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void;
1784
1785  /**
1786   * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1787   *
1788   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1789   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1790   * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
1791   * @param { number } userId - userId Indicates the user ID.
1792   * @returns { Promise<Array<AbilityInfo>> } Returns a list of AbilityInfo objects.
1793   * @throws { BusinessError } 201 - Permission denied.
1794   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1795   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1796   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1797   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1798   * @throws { BusinessError } 17700003 - The specified ability is not found.
1799   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1800   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1801   * @throws { BusinessError } 17700029 - The specified ability is disabled.
1802   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1803   * @systemapi
1804   * @since 9
1805   */
1806  function queryAbilityInfo(want: Want, abilityFlags: number, userId?: number): Promise<Array<AbilityInfo>>;
1807
1808  /**
1809   * Query the AbilityInfo by the given Want Array. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1810   *
1811   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1812   * @param { Array<Want> } wants - Indicates the Want Array containing the application bundle name to be queried.
1813   * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
1814   * @param { number } [userId] - userId Indicates the user ID.
1815   * @returns { Promise<Array<AbilityInfo>> } Returns a list of AbilityInfo objects.
1816   * @throws { BusinessError } 201 - Permission denied.
1817   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1818   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1819   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1820   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1821   * @throws { BusinessError } 17700003 - The specified ability is not found.
1822   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1823   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1824   * @throws { BusinessError } 17700029 - The specified ability is disabled.
1825   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1826   * @systemapi
1827   * @since 12
1828   */
1829  function queryAbilityInfo(wants: Array<Want>, abilityFlags: number, userId?: number): Promise<Array<AbilityInfo>>;
1830
1831  /**
1832   * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1833   *
1834   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1835   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1836   * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned.
1837   * @param { number } userId - userId Indicates the user ID.
1838   * @returns { Array<AbilityInfo> } Returns a list of AbilityInfo objects.
1839   * @throws { BusinessError } 201 - Permission denied.
1840   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1841   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1842   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1843   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1844   * @throws { BusinessError } 17700003 - The specified ability is not found.
1845   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1846   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1847   * @throws { BusinessError } 17700029 - The specified ability is disabled.
1848   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1849   * @systemapi
1850   * @since 10
1851   */
1852  function queryAbilityInfoSync(want: Want, abilityFlags: number, userId?: number): Array<AbilityInfo>;
1853
1854  /**
1855   * Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1856   *
1857   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1858   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1859   * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
1860   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1861   *  ExtensionAbilityInfo objects that will be returned.
1862   * @param { AsyncCallback<Array<ExtensionAbilityInfo>> } callback - The callback of querying extension ability info result.
1863   * @throws { BusinessError } 201 - Permission denied.
1864   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1865   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1866   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1867   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1868   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1869   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1870   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1871   * @systemapi
1872   * @since 9
1873   */
1874  function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
1875    extensionAbilityFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
1876
1877  /**
1878   * Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1879   *
1880   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1881   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1882   * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
1883   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1884   *  ExtensionAbilityInfo objects that will be returned.
1885   * @param { number } userId - Indicates the user ID.
1886   * @param { AsyncCallback<Array<ExtensionAbilityInfo>> } callback - The callback of querying extension ability info result.
1887   * @throws { BusinessError } 201 - Permission denied.
1888   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1889   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1890   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1891   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1892   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1893   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1894   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1895   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1896   * @systemapi
1897   * @since 9
1898   */
1899  function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
1900    extensionAbilityFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;
1901
1902  /**
1903   * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1904   *
1905   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1906   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1907   * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
1908   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1909   *  ExtensionAbilityInfo objects that will be returned.
1910   * @param { number } userId - Indicates the user ID.
1911   * @returns { Promise<Array<ExtensionAbilityInfo>> } Returns a list of ExtensionAbilityInfo objects.
1912   * @throws { BusinessError } 201 - Permission denied.
1913   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1914   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1915   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1916   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1917   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1918   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1919   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1920   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1921   * @systemapi
1922   * @since 9
1923   */
1924  function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType,
1925    extensionAbilityFlags: number, userId?: number): Promise<Array<ExtensionAbilityInfo>>;
1926
1927  /**
1928   * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1929   *
1930   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1931   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1932   * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType.
1933   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1934   *  ExtensionAbilityInfo objects that will be returned.
1935   * @param { number } userId - Indicates the user ID.
1936   * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects.
1937   * @throws { BusinessError } 201 - Permission denied.
1938   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1939   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1940   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1941   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1942   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1943   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1944   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1945   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1946   * @systemapi
1947   * @since 10
1948   */
1949  function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: ExtensionAbilityType,
1950    extensionAbilityFlags: number, userId?: number): Array<ExtensionAbilityInfo>;
1951
1952  /**
1953   * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1954   *
1955   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1956   * @param { Want } want - Indicates the Want containing the application bundle name to be queried.
1957   * @param { string } extensionAbilityType - Indicates extensionAbilityType.
1958   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1959   *  ExtensionAbilityInfo objects that will be returned.
1960   * @param { number } userId - Indicates the user ID.
1961   * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects.
1962   * @throws { BusinessError } 201 - Permission denied.
1963   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1964   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1965   * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query.
1966   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
1967   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1968   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1969   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
1970   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1971   * @systemapi
1972   * @since 11
1973   */
1974  function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: string,
1975    extensionAbilityFlags: number, userId?: number): Array<ExtensionAbilityInfo>;
1976
1977  /**
1978   * Query the ExtensionAbilityInfo by extension ability type. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access.
1979   *
1980   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
1981   * @param { string } extensionAbilityType - Indicates ExtensionAbilityType.
1982   * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the
1983   *  ExtensionAbilityInfo objects that will be returned.
1984   * @param { number } userId - Indicates the user ID.
1985   * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects.
1986   * @throws { BusinessError } 201 - Permission denied.
1987   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
1988   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1989   * 2. Incorrect parameter types; 3. Parameter extensionAbilityType is empty.
1990   * @throws { BusinessError } 17700003 - The specified extensionAbility is not found.
1991   * @throws { BusinessError } 17700004 - The specified userId is invalid.
1992   * @syscap SystemCapability.BundleManager.BundleFramework.Core
1993   * @systemapi
1994   * @since 11
1995   */
1996  function queryExtensionAbilityInfoSync(extensionAbilityType: string, extensionAbilityFlags: number,
1997    userId?: number): Array<ExtensionAbilityInfo>;
1998
1999  /**
2000   * Obtains bundle name by the given uid.
2001   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
2002   *
2003   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2004   * @param { number } uid - Indicates the UID of an application.
2005   * @param { AsyncCallback<string> } callback - The callback of getting bundle name.
2006   * @throws { BusinessError } 201 - Permission denied.
2007   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2008   * @throws { BusinessError } 17700021 - The uid is not found.
2009   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2010   * @since 14
2011   */
2012  function getBundleNameByUid(uid: number, callback: AsyncCallback<string>): void;
2013
2014  /**
2015   * Obtains bundle name by the given uid.
2016   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
2017   *
2018   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2019   * @param { number } uid - Indicates the UID of an application.
2020   * @returns { Promise<string> } Returns the bundle name.
2021   * @throws { BusinessError } 201 - Permission denied.
2022   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2023   * @throws { BusinessError } 17700021 - The uid is not found.
2024   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2025   * @since 14
2026   */
2027  function getBundleNameByUid(uid: number): Promise<string>;
2028
2029  /**
2030   * Obtains bundle name by the given uid.
2031   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
2032   *
2033   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2034   * @param { number } uid - Indicates the UID of an application.
2035   * @returns { string } Returns the bundle name.
2036   * @throws { BusinessError } 201 - Permission denied.
2037   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2038   * @throws { BusinessError } 17700021 - The uid is not found.
2039   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2040   * @since 14
2041   */
2042  function getBundleNameByUidSync(uid: number): string;
2043
2044  /**
2045   * Obtains information about an application bundle contained in an ohos Ability Package (HAP).
2046   *
2047   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2048   * @param { string } hapFilePath - Indicates the path storing the HAP.
2049   *  The path should be the relative path to the data directory of the current application.
2050   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned.
2051   * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle archive info result.
2052   * @throws { BusinessError } 201 - Permission denied.
2053   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2054   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2055   * @throws { BusinessError } 17700022 - The hapFilePath is invalid.
2056   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2057   * @systemapi
2058   * @since 9
2059   */
2060  function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void;
2061
2062  /**
2063   * Obtains information about an application bundle contained in an ohos Ability Package (HAP).
2064   *
2065   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2066   * @param { string } hapFilePath - Indicates the path storing the HAP.
2067   *  The path should be the relative path to the data directory of the current application.
2068   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned.
2069   * @returns { Promise<BundleInfo> } Returns the BundleInfo object.
2070   * @throws { BusinessError } 201 - Permission denied.
2071   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2072   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2073   * @throws { BusinessError } 17700022 - The hapFilePath is invalid.
2074   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2075   * @systemapi
2076   * @since 9
2077   */
2078  function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise<BundleInfo>;
2079
2080  /**
2081   * Obtains information about an application bundle contained in an ohos Ability Package (HAP).
2082   *
2083   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2084   * @param { string } hapFilePath - Indicates the path storing the HAP.
2085   *  The path should be the relative path to the data directory of the current application.
2086   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned.
2087   * @returns { BundleInfo } Returns the BundleInfo object.
2088   * @throws { BusinessError } 201 - Permission denied.
2089   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2090   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2091   * @throws { BusinessError } 17700022 - The hapFilePath is invalid.
2092   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2093   * @systemapi
2094   * @since 10
2095   */
2096  function getBundleArchiveInfoSync(hapFilePath: string, bundleFlags: number): BundleInfo;
2097
2098  /**
2099   * Clears cache data of a specified application.
2100   *
2101   * @permission ohos.permission.REMOVE_CACHE_FILES
2102   * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned.
2103   * @param { AsyncCallback<void> } callback - The callback of cleaning bundle cache files result.
2104   * @throws { BusinessError } 201 - Permission denied.
2105   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2106   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2107   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2108   * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files.
2109   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2110   * @systemapi
2111   * @since 9
2112   */
2113  function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void;
2114
2115  /**
2116   * Clears cache data of a specified application.
2117   *
2118   * @permission ohos.permission.REMOVE_CACHE_FILES
2119   * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned.
2120   * @returns { Promise<void> } Clean bundle cache files result
2121   * @throws { BusinessError } 201 - Permission denied.
2122   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2123   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2124   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2125   * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files.
2126   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2127   * @systemapi
2128   * @since 9
2129   */
2130  function cleanBundleCacheFiles(bundleName: string): Promise<void>;
2131
2132  /**
2133   * Clears cache data of a specified application.
2134   *
2135   * @permission ohos.permission.REMOVE_CACHE_FILES
2136   * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned.
2137   * @param { number } appIndex - Indicates the index of clone app.
2138   * @returns { Promise<void> } Clean bundle cache files result
2139   * @throws { BusinessError } 201 - Permission denied.
2140   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2141   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2142   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2143   * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files.
2144   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
2145   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2146   * @systemapi
2147   * @since 15
2148   */
2149  function cleanBundleCacheFiles(bundleName: string, appIndex: number): Promise<void>;
2150
2151  /**
2152   * Get the all bundle cache size of the current user.
2153   *
2154   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2155   * @returns { Promise<number> } Returns all bundle cache size.
2156   * @throws { BusinessError } 201 - Permission denied.
2157   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2158   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2159   * @systemapi
2160   * @since 15
2161   */
2162  function getAllBundleCacheSize(): Promise<number>;
2163
2164  /**
2165   * Clean all bundle cache files of the current user, does not include the currently running program.
2166   *
2167   * @permission ohos.permission.REMOVE_CACHE_FILES
2168   * @returns { Promise<void> } Clear all bundle cache results.
2169   * @throws { BusinessError } 201 - Permission denied.
2170   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2171   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2172   * @systemapi
2173   * @since 15
2174   */
2175  function cleanAllBundleCache(): Promise<void>;
2176
2177  /**
2178   * Sets whether to enable a specified application.
2179   *
2180   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2181   * @param { string } bundleName - Indicates the bundle name of the application.
2182   * @param { number } appIndex - Indicates the index of clone app.
2183   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2184   * @returns { Promise<void> } set app enabled result.
2185   * @throws { BusinessError } 201 - Permission denied.
2186   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2187   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2188   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2189   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
2190   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2191   * @systemapi
2192   * @since 12
2193   */
2194  function setApplicationEnabled(bundleName: string, appIndex: number, isEnabled: boolean): Promise<void>;
2195
2196  /**
2197   * Sets whether to enable a specified application.
2198   *
2199   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2200   * @param { string } bundleName - Indicates the bundle name of the application.
2201   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2202   * @param { AsyncCallback<void> } callback - The callback of setting app enabled result.
2203   * @throws { BusinessError } 201 - Permission denied.
2204   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2205   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2206   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2207   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2208   * @systemapi
2209   * @since 9
2210   */
2211  function setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCallback<void>): void;
2212
2213  /**
2214   * Sets whether to enable a specified application.
2215   *
2216   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2217   * @param { string } bundleName - Indicates the bundle name of the application.
2218   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2219   * @returns { Promise<void> } set app enabled result.
2220   * @throws { BusinessError } 201 - Permission denied.
2221   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2222   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2223   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2224   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2225   * @systemapi
2226   * @since 9
2227   */
2228  function setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise<void>;
2229
2230  /**
2231   * Sets whether to enable a specified application.
2232   *
2233   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2234   * @param { string } bundleName - Indicates the bundle name of the application.
2235   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2236   * @throws { BusinessError } 201 - Permission denied.
2237   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2238   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2239   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2240   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2241   * @systemapi
2242   * @since 10
2243   */
2244  function setApplicationEnabledSync(bundleName: string, isEnabled: boolean): void;
2245
2246  /**
2247   * Sets whether to enable a specified ability.
2248   *
2249   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2250   * @param { AbilityInfo } info - Indicates information about the ability to set.
2251   * @param { number } appIndex - Indicates the index of clone app.
2252   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2253   * @returns { Promise<void> } set ability enabled result.
2254   * @throws { BusinessError } 201 - Permission denied.
2255   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2256   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2257   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2258   * @throws { BusinessError } 17700003 - The specified abilityInfo is not found.
2259   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
2260   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2261   * @systemapi
2262   * @since 12
2263   */
2264  function setAbilityEnabled(info: AbilityInfo, appIndex: number, isEnabled: boolean): Promise<void>;
2265
2266  /**
2267   * Sets whether to enable a specified ability.
2268   *
2269   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2270   * @param { AbilityInfo } info - Indicates information about the ability to set.
2271   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2272   * @param { AsyncCallback<void> } callback - The callback of setting ability enabled result.
2273   * @throws { BusinessError } 201 - Permission denied.
2274   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2275   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2276   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2277   * @throws { BusinessError } 17700003 - The specified abilityInfo is not found.
2278   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2279   * @systemapi
2280   * @since 9
2281   */
2282  function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean, callback: AsyncCallback<void>): void;
2283
2284  /**
2285   * Sets whether to enable a specified ability.
2286   *
2287   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2288   * @param { AbilityInfo } info - Indicates information about the ability to set.
2289   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2290   * @returns { Promise<void> } set ability enabled result.
2291   * @throws { BusinessError } 201 - Permission denied.
2292   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2293   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2294   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2295   * @throws { BusinessError } 17700003 - The specified abilityInfo is not found.
2296   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2297   * @systemapi
2298   * @since 9
2299   */
2300  function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean): Promise<void>;
2301
2302  /**
2303   * Sets whether to enable a specified ability.
2304   *
2305   * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE
2306   * @param { AbilityInfo } info - Indicates information about the ability to set.
2307   * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it.
2308   * @throws { BusinessError } 201 - Permission denied.
2309   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2310   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2311   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2312   * @throws { BusinessError } 17700003 - The specified abilityInfo is not found.
2313   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2314   * @systemapi
2315   * @since 10
2316   */
2317  function setAbilityEnabledSync(info: AbilityInfo, isEnabled: boolean): void;
2318
2319  /**
2320   * Checks whether a specified application is enabled.
2321   *
2322   * @param { string } bundleName - Indicates the bundle name of the application.
2323   * @param { number } appIndex - Indicates the index of clone app.
2324   * @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise.
2325   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2326   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2327   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2328   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
2329   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2330   * @systemapi
2331   * @since 12
2332   */
2333  function isApplicationEnabled(bundleName: string, appIndex: number): Promise<boolean>;
2334
2335  /**
2336   * Checks whether a specified application is enabled.
2337   *
2338   * @param { string } bundleName - Indicates the bundle name of the application.
2339   * @param { AsyncCallback<boolean> } callback - The callback of checking application enabled result. The result is true if enabled, false otherwise.
2340   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2341   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2342   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2343   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2344   * @systemapi
2345   * @since 9
2346   */
2347  function isApplicationEnabled(bundleName: string, callback: AsyncCallback<boolean>): void;
2348
2349  /**
2350   * Checks whether a specified application is enabled.
2351   *
2352   * @param { string } bundleName - Indicates the bundle name of the application.
2353   * @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise.
2354   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2355   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2356   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2357   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2358   * @systemapi
2359   * @since 9
2360   */
2361  function isApplicationEnabled(bundleName: string): Promise<boolean>;
2362
2363  /**
2364   * Checks whether a specified application is enabled.
2365   *
2366   * @param { string } bundleName - Indicates the bundle name of the application.
2367   * @returns { boolean } Returns true if the application is enabled; returns false otherwise.
2368   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2369   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2370   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2371   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2372   * @systemapi
2373   * @since 10
2374   */
2375  function isApplicationEnabledSync(bundleName: string): boolean;
2376
2377  /**
2378   * Checks whether a specified ability is enabled.
2379   *
2380   * @param { AbilityInfo } info - Indicates information about the ability to check.
2381   * @param { number } appIndex - Indicates the index of clone app.
2382   * @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise.
2383   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2384   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2385   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2386   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2387   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
2388   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2389   * @systemapi
2390   * @since 12
2391   */
2392  function isAbilityEnabled(info: AbilityInfo, appIndex: number): Promise<boolean>;
2393
2394  /**
2395   * Checks whether a specified ability is enabled.
2396   *
2397   * @param { AbilityInfo } info - Indicates information about the ability to check.
2398   * @param { AsyncCallback<boolean> } callback - The callback of checking ability enabled result. The result is true if enabled, false otherwise.
2399   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2400   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2401   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2402   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2403   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2404   * @systemapi
2405   * @since 9
2406   */
2407  function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback<boolean>): void;
2408
2409  /**
2410   * Checks whether a specified ability is enabled.
2411   *
2412   * @param { AbilityInfo } info - Indicates information about the ability to check.
2413   * @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise.
2414   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2415   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2416   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2417   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2418   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2419   * @systemapi
2420   * @since 9
2421   */
2422  function isAbilityEnabled(info: AbilityInfo): Promise<boolean>;
2423
2424  /**
2425   * Checks whether a specified ability is enabled.
2426   *
2427   * @param { AbilityInfo } info - Indicates information about the ability to check.
2428   * @returns { boolean } Returns true if the ability is enabled; returns false otherwise.
2429   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2430   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2431   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2432   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2433   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2434   * @systemapi
2435   * @since 10
2436   */
2437  function isAbilityEnabledSync(info: AbilityInfo): boolean;
2438
2439  /**
2440   * Obtains the Want for starting the main ability of an application based on the
2441   * given bundle name. The main ability of an application is the ability that has the
2442   * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
2443   *
2444   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2445   * @param { string } bundleName - Indicates the bundle name of the application.
2446   * @param { number } userId - Indicates the user ID or do not pass user ID.
2447   * @param { AsyncCallback<Want> } callback - The callback for starting the application's main ability.
2448   * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'.
2449   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2450   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2451   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2452   * @throws { BusinessError } 17700004 - The specified user ID is not found.
2453   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2454   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2455   * @systemapi
2456   * @since 9
2457   */
2458  function getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallback<Want>): void;
2459
2460  /**
2461   * Obtains the Want for starting the main ability of an application based on the
2462   * given bundle name. The main ability of an application is the ability that has the
2463   * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
2464   *
2465   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2466   * @param { string } bundleName - Indicates the bundle name of the application.
2467   * @param { AsyncCallback<Want> } callback - The callback for starting the application's main ability.
2468   * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'.
2469   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2470   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2471   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2472   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2473   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2474   * @systemapi
2475   * @since 9
2476   */
2477  function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback<Want>): void;
2478
2479  /**
2480   * Obtains the Want for starting the main ability of an application based on the
2481   * given bundle name. The main ability of an application is the ability that has the
2482   * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
2483   *
2484   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2485   * @param { string } bundleName - Indicates the bundle name of the application.
2486   * @param { number } userId - Indicates the user ID or do not pass user ID.
2487   * @returns { Promise<Want> } the Want for starting the application's main ability.
2488   * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'.
2489   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2490   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2491   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2492   * @throws { BusinessError } 17700004 - The specified user ID is not found.
2493   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2494   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2495   * @systemapi
2496   * @since 9
2497   */
2498  function getLaunchWantForBundle(bundleName: string, userId?: number): Promise<Want>;
2499
2500  /**
2501   * Obtains the Want for starting the main ability of an application based on the
2502   * given bundle name. The main ability of an application is the ability that has the
2503   * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
2504   *
2505   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2506   * @param { string } bundleName - Indicates the bundle name of the application.
2507   * @param { number } userId - Indicates the user ID or do not pass user ID.
2508   * @returns { Want } the Want for starting the application's main ability.
2509   * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'.
2510   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2511   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2512   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2513   * @throws { BusinessError } 17700004 - The specified user ID is not found.
2514   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2515   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2516   * @systemapi
2517   * @since 10
2518   */
2519  function getLaunchWantForBundleSync(bundleName: string, userId?: number): Want;
2520
2521  /**
2522   * Obtains the Want for starting the main ability of own application.
2523   * The main ability of an application is the ability that has the
2524   * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file.
2525   *
2526   * @returns { Want } the Want for starting the application's main ability.
2527   * @throws { BusinessError } 17700072 - The launch want is not found.
2528   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2529   * @atomicservice
2530   * @since 13
2531   */
2532  function getLaunchWant(): Want;
2533
2534  /**
2535   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2536   *
2537   * @param { string } moduleName - Indicates the moduleName of the application.
2538   * @param { string } abilityName - Indicates the abilityName of the application.
2539   * @param { string } metadataName - Indicates the name of metadata in ability.
2540   * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file.
2541   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2542   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2543   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2544   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2545   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2546   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2547   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2548   * @since 9
2549   */
2550  /**
2551   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2552   *
2553   * @param { string } moduleName - Indicates the moduleName of the application.
2554   * @param { string } abilityName - Indicates the abilityName of the application.
2555   * @param { string } metadataName - Indicates the name of metadata in ability.
2556   * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file.
2557   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2558   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2559   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2560   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2561   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2562   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2563   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2564   * @atomicservice
2565   * @since 11
2566   */
2567  function getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void;
2568
2569  /**
2570   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2571   *
2572   * @param { string } moduleName - Indicates the moduleName of the application.
2573   * @param { string } abilityName - Indicates the abilityName of the application.
2574   * @param { string } metadataName - Indicates the name of metadata in ability.
2575   * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file.
2576   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2577   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2578   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2579   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2580   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2581   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2582   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2583   * @since 9
2584   */
2585  /**
2586   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2587   *
2588   * @param { string } moduleName - Indicates the moduleName of the application.
2589   * @param { string } abilityName - Indicates the abilityName of the application.
2590   * @param { string } metadataName - Indicates the name of metadata in ability.
2591   * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file.
2592   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2593   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2594   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2595   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2596   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2597   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2598   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2599   * @atomicservice
2600   * @since 11
2601   */
2602  function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise<Array<string>>;
2603
2604  /**
2605   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2606   *
2607   * @param { string } moduleName - Indicates the moduleName of the application.
2608   * @param { string } abilityName - Indicates the abilityName of the application.
2609   * @param { string } metadataName - Indicates the name of metadata in ability.
2610   * @returns { Array<string> } Returns string in json-format of the corresponding config file.
2611   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2612   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2613   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2614   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2615   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2616   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2617   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2618   * @since 10
2619   */
2620  /**
2621   * Obtains the profile designated by metadata name, abilityName and moduleName from the current application.
2622   *
2623   * @param { string } moduleName - Indicates the moduleName of the application.
2624   * @param { string } abilityName - Indicates the abilityName of the application.
2625   * @param { string } metadataName - Indicates the name of metadata in ability.
2626   * @returns { Array<string> } Returns string in json-format of the corresponding config file.
2627   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2628   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2629   * @throws { BusinessError } 17700003 - The specified abilityName is not existed.
2630   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2631   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2632   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2633   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2634   * @atomicservice
2635   * @since 11
2636   */
2637  function getProfileByAbilitySync(moduleName: string, abilityName: string, metadataName?: string): Array<string>;
2638
2639  /**
2640   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2641   *
2642   * @param { string } moduleName - Indicates the moduleName of the application.
2643   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2644   * @param { string } metadataName - Indicates the name of metadata in ability.
2645   * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file.
2646   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2647   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2648   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2649   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2650   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2651   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2652   * @since 9
2653   */
2654  /**
2655   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2656   *
2657   * @param { string } moduleName - Indicates the moduleName of the application.
2658   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2659   * @param { string } metadataName - Indicates the name of metadata in ability.
2660   * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file.
2661   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2662   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2663   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2664   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2665   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2666   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2667   * @atomicservice
2668   * @since 11
2669   */
2670  function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void;
2671
2672  /**
2673   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2674   *
2675   * @param { string } moduleName - Indicates the moduleName of the application.
2676   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2677   * @param { string } metadataName - Indicates the name of metadata in ability.
2678   * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file.
2679   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2680   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2681   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2682   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2683   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2684   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2685   * @since 9
2686   */
2687  /**
2688   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2689   *
2690   * @param { string } moduleName - Indicates the moduleName of the application.
2691   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2692   * @param { string } metadataName - Indicates the name of metadata in ability.
2693   * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file.
2694   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2695   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2696   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2697   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2698   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2699   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2700   * @atomicservice
2701   * @since 11
2702   */
2703  function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise<Array<string>>;
2704
2705  /**
2706   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2707   *
2708   * @param { string } moduleName - Indicates the moduleName of the application.
2709   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2710   * @param { string } metadataName - Indicates the name of metadata in ability.
2711   * @returns { Array<string> } Returns string in json-format of the corresponding config file.
2712   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2713   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2714   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2715   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2716   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2717   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2718   * @since 10
2719   */
2720  /**
2721   * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application.
2722   *
2723   * @param { string } moduleName - Indicates the moduleName of the application.
2724   * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application.
2725   * @param { string } metadataName - Indicates the name of metadata in ability.
2726   * @returns { Array<string> } Returns string in json-format of the corresponding config file.
2727   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2728   * @throws { BusinessError } 17700002 - The specified moduleName is not existed.
2729   * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed.
2730   * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP.
2731   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2732   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2733   * @atomicservice
2734   * @since 11
2735   */
2736  function getProfileByExtensionAbilitySync(moduleName: string, extensionAbilityName: string, metadataName?: string): Array<string>;
2737
2738  /**
2739   * Get the permission details by permission name.
2740   *
2741   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2742   * @param { string } permissionName - Indicates permission name.
2743   * @param { AsyncCallback<PermissionDef> } callback - The callback of get permissionDef object result.
2744   * @throws { BusinessError } 201 - Permission denied.
2745   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2746   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2747   * @throws { BusinessError } 17700006 - The specified permission is not found.
2748   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2749   * @systemapi
2750   * @since 9
2751   */
2752  function getPermissionDef(permissionName: string, callback: AsyncCallback<PermissionDef>): void;
2753
2754  /**
2755   * Get the permission details by permission name.
2756   *
2757   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2758   * @param { string } permissionName - Indicates permission name.
2759   * @returns { Promise<PermissionDef> } Returns permissionDef object.
2760   * @throws { BusinessError } 201 - Permission denied.
2761   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2762   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2763   * @throws { BusinessError } 17700006 - The specified permission is not found.
2764   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2765   * @systemapi
2766   * @since 9
2767   */
2768  function getPermissionDef(permissionName: string): Promise<PermissionDef>;
2769
2770  /**
2771   * Get the permission details by permission name.
2772   *
2773   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2774   * @param { string } permissionName - Indicates permission name.
2775   * @returns { PermissionDef } Returns permissionDef object.
2776   * @throws { BusinessError } 201 - Permission denied.
2777   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2778   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2779   * @throws { BusinessError } 17700006 - The specified permission is not found.
2780   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2781   * @systemapi
2782   * @since 10
2783   */
2784  function getPermissionDefSync(permissionName: string): PermissionDef;
2785
2786  /**
2787   * Obtains the label of a specified ability.
2788   *
2789   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2790   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
2791   * @param { string } moduleName - Indicates the module name.
2792   * @param { string } abilityName - Indicates the ability name.
2793   * @param { AsyncCallback<string> } callback - The callback of getting ability label result.
2794   * @throws { BusinessError } 201 - Permission denied.
2795   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2796   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2797   * @throws { BusinessError } 801 - Capability not supported.
2798   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2799   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
2800   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2801   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2802   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2803   * @syscap SystemCapability.BundleManager.BundleFramework.Resource
2804   * @systemapi
2805   * @since 9
2806   */
2807  function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback<string>): void;
2808
2809  /**
2810   * Obtains the label of a specified ability.
2811   *
2812   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2813   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
2814   * @param { string } moduleName - Indicates the module name.
2815   * @param { string } abilityName - Indicates the ability name.
2816   * @returns { Promise<string> } Returns the label representing the label of the specified ability.
2817   * @throws { BusinessError } 201 - Permission denied.
2818   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2819   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2820   * @throws { BusinessError } 801 - Capability not supported.
2821   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2822   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
2823   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2824   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2825   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2826   * @syscap SystemCapability.BundleManager.BundleFramework.Resource
2827   * @systemapi
2828   * @since 9
2829   */
2830  function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise<string>;
2831
2832  /**
2833   * Obtains the label of a specified ability.
2834   *
2835   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2836   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
2837   * @param { string } moduleName - Indicates the module name.
2838   * @param { string } abilityName - Indicates the ability name.
2839   * @returns { string } Returns the label representing the label of the specified ability.
2840   * @throws { BusinessError } 201 - Permission denied.
2841   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2842   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2843   * @throws { BusinessError } 801 - Capability not supported.
2844   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2845   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
2846   * @throws { BusinessError } 17700003 - The specified abilityName is not found.
2847   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2848   * @throws { BusinessError } 17700029 - The specified ability is disabled.
2849   * @syscap SystemCapability.BundleManager.BundleFramework.Resource
2850   * @systemapi
2851   * @since 10
2852   */
2853  function getAbilityLabelSync(bundleName: string, moduleName: string, abilityName: string): string;
2854
2855  /**
2856   * Obtains applicationInfo based on a given bundleName and bundleFlags.
2857   *
2858   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2859   * @param { string } bundleName - Indicates the application bundle name to be queried.
2860   * @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
2861   * @param { number } userId - Indicates the user ID or do not pass user ID.
2862   * @returns { ApplicationInfo } - Returns the ApplicationInfo object.
2863   * @throws { BusinessError } 201 - Permission denied.
2864   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2865   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2866   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2867   * @throws { BusinessError } 17700004 - The specified user ID is not found.
2868   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2869   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2870   * @systemapi
2871   * @since 9
2872   */
2873  function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number): ApplicationInfo;
2874
2875  /**
2876   * Obtains applicationInfo based on a given bundleName and bundleFlags.
2877   *
2878   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2879   * @param { string } bundleName - Indicates the application bundle name to be queried.
2880   * @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned.
2881   * @returns { ApplicationInfo } - Returns the ApplicationInfo object.
2882   * @throws { BusinessError } 201 - Permission denied.
2883   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2884   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2885   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2886   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2887   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2888   * @systemapi
2889   * @since 9
2890   */
2891  function getApplicationInfoSync(bundleName: string, applicationFlags: number): ApplicationInfo;
2892
2893  /**
2894   * Obtains bundleInfo based on bundleName, bundleFlags and userId.
2895   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
2896   *
2897   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2898   * @param { string } bundleName - Indicates the application bundle name to be queried.
2899   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned.
2900   * @param { number } userId - Indicates the user ID or do not pass user ID.
2901   * @returns { BundleInfo } - Returns the BundleInfo object.
2902   * @throws { BusinessError } 201 - Permission denied.
2903   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2904   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2905   * @throws { BusinessError } 17700004 - The specified user ID is not found.
2906   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2907   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2908   * @since 14
2909   */
2910  function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo;
2911
2912  /**
2913   * Obtains bundleInfo based on bundleName, bundleFlags.
2914   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
2915   *
2916   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
2917   * @param { string } bundleName - Indicates the application bundle name to be queried.
2918   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned.
2919   * @returns { BundleInfo } - Returns the BundleInfo object.
2920   * @throws { BusinessError } 201 - Permission denied.
2921   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2922   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2923   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
2924   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2925   * @since 14
2926   */
2927  function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo;
2928
2929  /**
2930   * Obtains SharedBundleInfo of all shared bundle available in the system.
2931   *
2932   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2933   * @param { AsyncCallback<Array<SharedBundleInfo>> } callback - The callback of getting a list of SharedBundleInfo objects.
2934   * @throws { BusinessError } 201 - Permission denied.
2935   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2936   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2937   * @systemapi
2938   * @since 10
2939   */
2940  function getAllSharedBundleInfo(callback: AsyncCallback<Array<SharedBundleInfo>>): void;
2941
2942  /**
2943   * Obtains SharedBundleInfo of all shared bundle available in the system.
2944   *
2945   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2946   * @returns { Promise<Array<SharedBundleInfo>> } Returns a list of SharedBundleInfo objects.
2947   * @throws { BusinessError } 201 - Permission denied.
2948   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2949   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2950   * @systemapi
2951   * @since 10
2952   */
2953  function getAllSharedBundleInfo(): Promise<Array<SharedBundleInfo>>;
2954
2955  /**
2956   * Obtains SharedBundleInfo of shared bundle by bundle name and module name.
2957   *
2958   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2959   * @param { string } bundleName - Indicates the bundleName of the application.
2960   * @param { string } moduleName - Indicates the moduleName of the application.
2961   * @param { AsyncCallback<Array<SharedBundleInfo>> } callback - The callback of getting a list of SharedBundleInfo objects.
2962   * @throws { BusinessError } 201 - Permission denied.
2963   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2964   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2965   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2966   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
2967   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2968   * @systemapi
2969   * @since 10
2970   */
2971  function getSharedBundleInfo(bundleName: string, moduleName: string, callback: AsyncCallback<Array<SharedBundleInfo>>): void;
2972
2973  /**
2974   * Obtains SharedBundleInfo of shared bundle by bundle name and module name.
2975   *
2976   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2977   * @param { string } bundleName - Indicates the bundleName of the application.
2978   * @param { string } moduleName - Indicates the moduleName of the application.
2979   * @returns { Promise<Array<SharedBundleInfo>> } Returns a list of SharedBundleInfo objects.
2980   * @throws { BusinessError } 201 - Permission denied.
2981   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2982   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
2983   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
2984   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
2985   * @syscap SystemCapability.BundleManager.BundleFramework.Core
2986   * @systemapi
2987   * @since 10
2988   */
2989  function getSharedBundleInfo(bundleName: string, moduleName: string): Promise<Array<SharedBundleInfo>>;
2990
2991  /**
2992   * Obtains the profile file information of a specified bundle.
2993   *
2994   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
2995   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
2996   * @param { AsyncCallback<AppProvisionInfo> } callback - Indicates the callback of getting AppProvisionInfo result.
2997   * @throws { BusinessError } 201 - Permission denied.
2998   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
2999   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3000   * 2. Incorrect parameter types; 3. Parameter bundleName is empty.
3001   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3002   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3003   * @systemapi
3004   * @since 10
3005   */
3006  function getAppProvisionInfo(bundleName: string, callback: AsyncCallback<AppProvisionInfo>): void;
3007
3008  /**
3009   * Obtains the profile file information of a specified bundle.
3010   *
3011   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3012   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
3013   * @param { number } userId - Indicates the user ID or do not pass user ID.
3014   * @param { AsyncCallback<AppProvisionInfo> } callback - Indicates the callback of getting AppProvisionInfo result.
3015   * @throws { BusinessError } 201 - Permission denied.
3016   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3017   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3018   * 2. Incorrect parameter types; 3. Parameter bundleName is empty.
3019   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3020   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3021   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3022   * @systemapi
3023   * @since 10
3024   */
3025  function getAppProvisionInfo(bundleName: string, userId: number, callback: AsyncCallback<AppProvisionInfo>): void;
3026
3027  /**
3028   * Obtains the profile file information of a specified bundle.
3029   *
3030   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3031   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
3032   * @param { number } userId - Indicates the user ID or do not pass user ID.
3033   * @returns { Promise<AppProvisionInfo> } Returns the AppProvisionInfo object.
3034   * @throws { BusinessError } 201 - Permission denied.
3035   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3036   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3037   * 2. Incorrect parameter types; 3. Parameter bundleName is empty.
3038   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3039   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3040   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3041   * @systemapi
3042   * @since 10
3043   */
3044  function getAppProvisionInfo(bundleName: string, userId?: number): Promise<AppProvisionInfo>;
3045
3046  /**
3047   * Obtains the profile file information of a specified bundle.
3048   *
3049   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3050   * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs.
3051   * @param { number } userId - Indicates the user ID or do not pass user ID.
3052   * @returns { AppProvisionInfo } Returns the AppProvisionInfo object.
3053   * @throws { BusinessError } 201 - Permission denied.
3054   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3055   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3056   *  2. Incorrect parameter types; 3. Parameter bundleName is empty.
3057   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3058   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3059   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3060   * @systemapi
3061   * @since 10
3062   */
3063  function getAppProvisionInfoSync(bundleName: string, userId?: number): AppProvisionInfo;
3064
3065  /**
3066   * Obtains the distribution type specified during bundle installation.
3067   *
3068   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3069   * @param { string } bundleName - Indicates the application bundle name to be queried.
3070   * @returns { string } The specified distribution type.
3071   * @throws { BusinessError } 201 - Permission denied.
3072   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3073   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3074   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3075   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3076   * @systemapi
3077   * @since 10
3078   */
3079  function getSpecifiedDistributionType(bundleName: string): string;
3080
3081  /**
3082   * Obtains the additional information during bundle installation.
3083   *
3084   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3085   * @param { string } bundleName - Indicates the application bundle name to be queried.
3086   * @returns { string } The additional information.
3087   * @throws { BusinessError } 201 - Permission denied.
3088   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3089   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3090   * 2. Incorrect parameter types; 3. Parameter bundleName is empty.
3091   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3092   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3093   * @systemapi
3094   * @since 10
3095   */
3096  function getAdditionalInfo(bundleName: string): string;
3097
3098  /**
3099   * Obtains the JSON profile designated by profileType, bundleName and moduleName.
3100   *
3101   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
3102   * @param { ProfileType } profileType - Indicates the type of profile to be obtained.
3103   * @param { string } bundleName - Indicates the name of the bundle to which the profile belongs.
3104   * @param { string } moduleName - Indicates the name of the module to which the profile belongs.
3105   * @returns { string } Returns string in json-format of the designated profile.
3106   * @throws { BusinessError } 201 - Permission denied.
3107   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3108   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3109   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3110   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
3111   * @throws { BusinessError } 17700024 - Failed to get the profile because the specified profile is not found in the HAP.
3112   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
3113   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3114   * @systemapi
3115   * @since 11
3116   */
3117  /**
3118   * Obtains the JSON profile designated by profileType, bundleName, moduleName and userId.
3119   *
3120   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
3121   * @param { ProfileType } profileType - Indicates the type of profile to be obtained.
3122   * @param { string } bundleName - Indicates the name of the bundle to which the profile belongs.
3123   * @param { string } moduleName - Indicates the name of the module to which the profile belongs.
3124   * @param { number } userId - Indicates the user ID or do not pass user ID.
3125   * @returns { string } Returns string in json-format of the designated profile.
3126   * @throws { BusinessError } 201 - Permission denied.
3127   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3128   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3129   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3130   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
3131   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3132   * @throws { BusinessError } 17700024 - Failed to get the profile because the specified profile is not found in the HAP.
3133   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
3134   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3135   * @systemapi
3136   * @since 12
3137   */
3138  function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: number): string;
3139
3140   /**
3141   * Get extend resources.
3142   *
3143   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
3144   * @param { string } bundleName - Indicates the bundleName.
3145   * @returns { Promise<Array<string>> } Returns getExtResource result.
3146   * @throws { BusinessError } 201 - Permission denied.
3147   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3148   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3149   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3150   * @throws { BusinessError } 17700303 - Failed to obtain extended resources.
3151   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3152   * @systemapi
3153   * @since 12
3154   */
3155   function getExtResource(bundleName: string): Promise<Array<string>>;
3156
3157  /**
3158   * Enable dynamic icon.
3159   *
3160   * @permission ohos.permission.ACCESS_DYNAMIC_ICON
3161   * @param { string } bundleName - Indicates the bundleName.
3162   * @param { string } moduleName - Indicates the moduleName for extend resource.
3163   * @returns { Promise<void> } Returns enableDynamicIcon result.
3164   * @throws { BusinessError } 201 - Permission denied.
3165   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3166   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3167   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3168   * @throws { BusinessError } 17700002 - The specified moduleName is not found.
3169   * @throws { BusinessError } 17700304 - Failed to enable the dynamic icon.
3170   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3171   * @systemapi
3172   * @since 12
3173   */
3174  function enableDynamicIcon(bundleName: string, moduleName: string): Promise<void>;
3175
3176  /**
3177   * Disable dynamic icon.
3178   *
3179   * @permission ohos.permission.ACCESS_DYNAMIC_ICON
3180   * @param { string } bundleName - Indicates the bundleName.
3181   * @returns { Promise<void> } Returns disableDynamicIcon result.
3182   * @throws { BusinessError } 201 - Permission denied.
3183   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3184   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3185   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3186   * @throws { BusinessError } 17700305 - Failed to disable the dynamic icon.
3187   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3188   * @systemapi
3189   * @since 12
3190   */
3191  function disableDynamicIcon(bundleName: string): Promise<void>;
3192
3193  /**
3194   * Get dynamic icon.
3195   *
3196   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
3197   * @param { string } bundleName - Indicates the bundleName.
3198   * @returns { Promise<string> } Returns dynamic icon key.
3199   * @throws { BusinessError } 201 - Permission denied.
3200   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3201   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3202   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3203   * @throws { BusinessError } 17700306 - Failed to obtain the dynamic icon.
3204   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3205   * @systemapi
3206   * @since 12
3207   */
3208  function getDynamicIcon(bundleName: string): Promise<string>;
3209
3210  /**
3211   * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM.
3212   *
3213   * @permission ohos.permission.RUN_DYN_CODE
3214   * @param { Array<string> } abcPaths - The abc path.
3215   * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files.
3216   * @param { AsyncCallback<void> } callback - Indicates the callback of verifyAbc result.
3217   * @throws { BusinessError } 201 - Permission denied.
3218   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3219   * @throws { BusinessError } 17700201 - Failed to verify the abc file.
3220   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3221   * @since 11
3222   */
3223  /**
3224   * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM.
3225   *
3226   * @permission ohos.permission.RUN_DYN_CODE
3227   * @param { Array<string> } abcPaths - The abc path.
3228   * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files.
3229   * @param { AsyncCallback<void> } callback - Indicates the callback of verifyAbc result.
3230   * @throws { BusinessError } 201 - Permission denied.
3231   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3232   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3233   * @throws { BusinessError } 17700201 - Failed to verify the abc file.
3234   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3235   * @systemapi
3236   * @since 12
3237   */
3238  function verifyAbc(abcPaths: Array<string>, deleteOriginalFiles: boolean, callback: AsyncCallback<void>): void;
3239
3240  /**
3241   * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM.
3242   *
3243   * @permission ohos.permission.RUN_DYN_CODE
3244   * @param { Array<string> } abcPaths - The abc path.
3245   * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files.
3246   * @returns { Promise<void> } Returns verifyAbc result.
3247   * @throws { BusinessError } 201 - Permission denied.
3248   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3249   * @throws { BusinessError } 17700201 - Failed to verify the abc file.
3250   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3251   * @since 11
3252   */
3253  /**
3254   * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM.
3255   *
3256   * @permission ohos.permission.RUN_DYN_CODE
3257   * @param { Array<string> } abcPaths - The abc path.
3258   * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files.
3259   * @returns { Promise<void> } Returns verifyAbc result.
3260   * @throws { BusinessError } 201 - Permission denied.
3261   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3262   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3263   * @throws { BusinessError } 17700201 - Failed to verify the abc file.
3264   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3265   * @systemapi
3266   * @since 12
3267   */
3268  function verifyAbc(abcPaths: Array<string>, deleteOriginalFiles: boolean): Promise<void>;
3269
3270  /**
3271   * Obtains recoverable preinstalled applications.
3272   *
3273   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3274   * @param { AsyncCallback<Array<RecoverableApplicationInfo>> } callback - The callback of getting a list of RecoverableApplicationInfo objects.
3275   * @throws { BusinessError } 201 - Permission denied.
3276   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3277   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3278   * @systemapi
3279   * @since 11
3280   */
3281  function getRecoverableApplicationInfo(callback: AsyncCallback<Array<RecoverableApplicationInfo>>): void;
3282
3283  /**
3284   * Obtains recoverable preinstalled applications.
3285   *
3286   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3287   * @returns { Promise<Array<RecoverableApplicationInfo>> } Returns a list of RecoverableApplicationInfo objects.
3288   * @throws { BusinessError } 201 - Permission denied.
3289   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3290   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3291   * @systemapi
3292   * @since 11
3293   */
3294  function getRecoverableApplicationInfo(): Promise<Array<RecoverableApplicationInfo>>;
3295
3296  /**
3297   * Set additional information to the specified application.
3298   *
3299   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3300   * @param { string } bundleName - Indicates the bundle name of the application.
3301   * @param { string } additionalInfo - The additional information.
3302   * @throws { BusinessError } 201 - Permission denied.
3303   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3304   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3305   * 2. Incorrect parameter types; 3. Parameter bundleName is empty.
3306   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3307   * @throws { BusinessError } 17700053 - The caller is not AppGallery.
3308   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3309   * @systemapi
3310   * @since 11
3311   */
3312  function setAdditionalInfo(bundleName: string, additionalInfo: string): void;
3313
3314  /**
3315   * Delete the verified .abc file.
3316   *
3317   * @permission ohos.permission.RUN_DYN_CODE
3318   * @param { string } abcPath - The abc path.
3319   * @returns { Promise<void> } Returns deleteAbc result.
3320   * @throws { BusinessError } 201 - Permission denied.
3321   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3322   * @throws { BusinessError } 17700202 - Failed to delete the abc file.
3323   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3324   * @since 11
3325   */
3326  /**
3327   * Delete the verified .abc file.
3328   *
3329   * @permission ohos.permission.RUN_DYN_CODE
3330   * @param { string } abcPath - The abc path.
3331   * @returns { Promise<void> } Returns deleteAbc result.
3332   * @throws { BusinessError } 201 - Permission denied.
3333   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3334   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3335   * @throws { BusinessError } 17700202 - Failed to delete the abc file.
3336   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3337   * @systemapi
3338   * @since 12
3339   */
3340  function deleteAbc(abcPath: string): Promise<void>;
3341
3342  /**
3343   * Check whether the link can be opened.
3344   *
3345   * @param { string } link - Indicates the link to be opened.
3346   * @returns { boolean } Returns true if the link can be opened; returns false otherwise.
3347   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3348   * @throws { BusinessError } 17700055 - The specified link is invalid.
3349   * @throws { BusinessError } 17700056 - The scheme of the specified link is not in the querySchemes.
3350   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3351   * @atomicservice
3352   * @since 12
3353   */
3354  function canOpenLink(link: string): boolean;
3355
3356  /**
3357   * Obtains PreinstalledApplicationInfo of all applications preinstalled in the system.
3358   *
3359   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3360   * @returns { Promise<Array<PreinstalledApplicationInfo>> } Returns a list of PreinstalledApplicationInfo objects.
3361   * @throws { BusinessError } 201 - Permission denied.
3362   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3363   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3364   * @systemapi
3365   * @since 12
3366   */
3367  function getAllPreinstalledApplicationInfo(): Promise<Array<PreinstalledApplicationInfo>>;
3368
3369  /**
3370   * Get a list of BundleInfo objects by developerId.
3371   *
3372   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3373   * @param { string } developerId - Indicates the developerId of the application.
3374   * @returns { Array<BundleInfo> } Returns a list of BundleInfo objects.
3375   * @throws { BusinessError } 201 - Permission denied.
3376   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3377   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3378   * 2. Incorrect parameter types; 3. Parameter developerId is empty.
3379   * @throws { BusinessError } 17700059 - The specified developerId is invalid.
3380   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3381   * @systemapi
3382   * @since 12
3383   */
3384  function getAllBundleInfoByDeveloperId(developerId: string): Array<BundleInfo>;
3385
3386  /**
3387   * Get a list of developedId by distribution type.
3388   *
3389   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3390   * @param { number } appDistributionType - Indicates the distribution type of the application, and if not passed in, it gets all the developerId.
3391   * @returns { Array<String> } Returns a list of developerId.
3392   * @throws { BusinessError } 201 - Permission denied.
3393   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3394   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3395   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3396   * @systemapi
3397   * @since 12
3398   */
3399  function getDeveloperIds(appDistributionType?: number): Array<String>;
3400
3401  /**
3402   * Switch uninstall state of a specified application.
3403   *
3404   * @permission ohos.permission.CHANGE_BUNDLE_UNINSTALL_STATE
3405   * @param { string } bundleName - Indicates the bundle name of the application.
3406   * @param { boolean } state - Indicates whether the specified application can be uninstalled.
3407   * @throws { BusinessError } 201 - Permission denied.
3408   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3409   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3410   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3411   * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled.
3412   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3413   * @systemapi
3414   * @since 12
3415   */
3416  function switchUninstallState(bundleName: string, state: boolean): void;
3417
3418  /**
3419   * Get the SignatureInfo of the application through UID.
3420   *
3421   * @permission ohos.permission.GET_SIGNATURE_INFO
3422   * @param { number } uid - Indicates the UID of an application.
3423   * @returns { SignatureInfo } The result of getting the signature info.
3424   * @throws { BusinessError } 201 - Permission denied.
3425   * @throws { BusinessError } 17700021 - The uid is not found.
3426   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3427   * @since 18
3428   */
3429  function getSignatureInfo(uid: number): SignatureInfo;
3430
3431  /**
3432   * Get the BundleInfo of the specified MultiIsolation App.
3433   *
3434   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3435   * @param { string } bundleName - Indicates the application bundle name to be queried.
3436   * @param { number } appIndex - Indicates the index of clone app.
3437   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
3438   * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default.
3439   * @returns { Promise<BundleInfo> } Returns A BundleInfo Of MultiApp Mode.
3440   * @throws { BusinessError } 201 - Permission denied.
3441   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3442   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3443   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3444   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3445   * @throws { BusinessError } 17700026 - The specified bundle is disabled.
3446   * @throws { BusinessError } 17700061 - AppIndex not in valid range.
3447   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3448   * @systemapi
3449   * @since 12
3450   */
3451  function getAppCloneBundleInfo(bundleName: string, appIndex: number, bundleFlags: number, userId?: number): Promise<BundleInfo>;
3452
3453  /**
3454   * Get all BundleInfo of clone app.
3455   *
3456   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
3457   * @param { string } bundleName - Indicates the application bundle name to be queried.
3458   * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned.
3459   * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default.
3460   * @returns { Promise<Array<BundleInfo>> } Returns BundleInfo Arrays Of MultiApp Mode.
3461   * @throws { BusinessError } 201 - Permission denied.
3462   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3463   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3464   * @throws { BusinessError } 17700001 - The specified bundleName is not found.
3465   * @throws { BusinessError } 17700004 - The specified user ID is not found.
3466   * @throws { BusinessError } 17700026 - The specified bundle and clone apps are all disabled.
3467   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3468   * @systemapi
3469   * @since 12
3470   */
3471  function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise<Array<BundleInfo>>;
3472
3473  /**
3474   * Obtains AppCloneIdentity contains bundleName and appIndex by the given uid.
3475   * The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO.
3476   *
3477   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO
3478   * @param { number } uid - Indicates the UID of an application.
3479   * @returns { Promise<AppCloneIdentity> } Returns the clone Identity contains bundleName and appIndex.
3480   * @throws { BusinessError } 201 - Permission denied.
3481   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
3482   * @throws { BusinessError } 17700021 - The uid is not found.
3483   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3484   * @since 14
3485   */
3486  function getAppCloneIdentity(uid: number): Promise<AppCloneIdentity>;
3487
3488  /**
3489   * Migrate files from the source paths to the destination path.
3490   *
3491   * @permission ohos.permission.MIGRATE_DATA
3492   * @param { Array<string> } sourcePaths - Indicates the source paths to be migrated.
3493   * @param { string } destinationPath - Target path for data migration.
3494   * @returns { Promise<void> } The result of migrating data.
3495   * @throws { BusinessError } 201 - Permission denied.
3496   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
3497   * @throws { BusinessError } 17700080 - The source paths are invalid.
3498   * @throws { BusinessError } 17700081 - The destination path is invalid.
3499   * @throws { BusinessError } 17700082 - User authentication failed.
3500   * @throws { BusinessError } 17700083 - Waiting for user authentication timeout.
3501   * @throws { BusinessError } 17700084 - There are inaccessible path in the source paths.
3502   * @throws { BusinessError } 17700085 - The destination path cannot be accessed.
3503   * @throws { BusinessError } 17700086 - System error occurred during copy execution.
3504   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3505   * @systemapi
3506   * @since 18
3507   */
3508  function migrateData(sourcePaths: Array<string>, destinationPath: string): Promise<void>;
3509
3510  /**
3511   * Obtains configuration information about an application.
3512   *
3513   * @typedef { _ApplicationInfo }
3514   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3515   * @since 9
3516   */
3517  /**
3518   * Obtains configuration information about an application.
3519   *
3520   * @typedef { _ApplicationInfo }
3521   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3522   * @atomicservice
3523   * @since 11
3524   */
3525  export type ApplicationInfo = _ApplicationInfo;
3526
3527  /**
3528   * Indicates the metadata information about a module.
3529   *
3530   * @typedef { _ModuleMetadata }
3531   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3532   * @since 10
3533   */
3534  /**
3535   * Indicates the metadata information about a module.
3536   *
3537   * @typedef { _ModuleMetadata }
3538   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3539   * @atomicservice
3540   * @since 11
3541   */
3542  export type ModuleMetadata = _ModuleMetadata;
3543
3544  /**
3545   * Indicates the Metadata.
3546   *
3547   * @typedef { _Metadata }
3548   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3549   * @since 9
3550   */
3551  /**
3552   * Indicates the Metadata.
3553   *
3554   * @typedef { _Metadata }
3555   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3556   * @atomicservice
3557   * @since 11
3558   */
3559  export type Metadata = _Metadata;
3560
3561  /**
3562   * Obtains configuration information about a bundle.
3563   *
3564   * @typedef { _BundleInfo.BundleInfo }
3565   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3566   * @since 9
3567   */
3568  /**
3569   * Obtains configuration information about a bundle.
3570   *
3571   * @typedef { _BundleInfo.BundleInfo }
3572   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3573   * @atomicservice
3574   * @since 11
3575   */
3576  export type BundleInfo = _BundleInfo.BundleInfo;
3577
3578  /**
3579   * The scene which is used.
3580   *
3581   * @typedef { _BundleInfo.UsedScene }
3582   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3583   * @since 9
3584   */
3585  /**
3586   * The scene which is used.
3587   *
3588   * @typedef { _BundleInfo.UsedScene }
3589   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3590   * @atomicservice
3591   * @since 11
3592   */
3593  export type UsedScene = _BundleInfo.UsedScene;
3594
3595  /**
3596   * Indicates the required permissions details defined in file config.json.
3597   *
3598   * @typedef { _BundleInfo.ReqPermissionDetail }
3599   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3600   * @since 9
3601   */
3602  /**
3603   * Indicates the required permissions details defined in file config.json.
3604   *
3605   * @typedef { _BundleInfo.ReqPermissionDetail }
3606   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3607   * @atomicservice
3608   * @since 11
3609   */
3610  export type ReqPermissionDetail = _BundleInfo.ReqPermissionDetail;
3611
3612  /**
3613   * Indicates the SignatureInfo.
3614   *
3615   * @typedef { _BundleInfo.SignatureInfo }
3616   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3617   * @since 9
3618   */
3619  /**
3620   * Indicates the SignatureInfo.
3621   *
3622   * @typedef { _BundleInfo.SignatureInfo }
3623   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3624   * @atomicservice
3625   * @since 11
3626   */
3627  export type SignatureInfo = _BundleInfo.SignatureInfo;
3628
3629  /**
3630   * AppCloneIdentity Contain BundleName and appIndex.
3631   *
3632   * @typedef { _BundleInfo.AppCloneIdentity }
3633   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3634   * @since 15
3635   */
3636  export type AppCloneIdentity = _BundleInfo.AppCloneIdentity;
3637
3638  /**
3639   * Obtains configuration information about a module.
3640   *
3641   * @typedef { _HapModuleInfo.HapModuleInfo }
3642   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3643   * @since 9
3644   */
3645  /**
3646   * Obtains configuration information about a module.
3647   *
3648   * @typedef { _HapModuleInfo.HapModuleInfo }
3649   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3650   * @atomicservice
3651   * @since 11
3652   */
3653  export type HapModuleInfo = _HapModuleInfo.HapModuleInfo;
3654
3655  /**
3656   * Obtains preload information about a module.
3657   *
3658   * @typedef { _HapModuleInfo.PreloadItem }
3659   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3660   * @since 9
3661   */
3662  /**
3663   * Obtains preload information about a module.
3664   *
3665   * @typedef { _HapModuleInfo.PreloadItem }
3666   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3667   * @atomicservice
3668   * @since 11
3669   */
3670  export type PreloadItem = _HapModuleInfo.PreloadItem;
3671
3672  /**
3673   * Obtains dependency information about a module.
3674   *
3675   * @typedef { _HapModuleInfo.Dependency }
3676   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3677   * @since 9
3678   */
3679  /**
3680   * Obtains dependency information about a module.
3681   *
3682   * @typedef { _HapModuleInfo.Dependency }
3683   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3684   * @atomicservice
3685   * @since 11
3686   */
3687  export type Dependency = _HapModuleInfo.Dependency;
3688
3689  /**
3690   * Obtains the router item about a module.
3691   *
3692   * @typedef { _HapModuleInfo.RouterItem}
3693   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3694   * @atomicservice
3695   * @since 12
3696   */
3697  export type RouterItem = _HapModuleInfo.RouterItem;
3698
3699  /**
3700   * Obtains the data item within router item.
3701   *
3702   * @typedef { _HapModuleInfo.DataItem }
3703   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3704   * @atomicservice
3705   * @since 12
3706   */
3707  export type DataItem = _HapModuleInfo.DataItem;
3708
3709  /**
3710   * Obtains configuration information about an ability.
3711   *
3712   * @typedef { _AbilityInfo.AbilityInfo }
3713   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3714   * @since 9
3715   */
3716  /**
3717   * Obtains configuration information about an ability.
3718   *
3719   * @typedef { _AbilityInfo.AbilityInfo }
3720   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3721   * @atomicservice
3722   * @since 11
3723   */
3724  export type AbilityInfo = _AbilityInfo.AbilityInfo;
3725
3726  /**
3727   * Contains basic Ability information. Indicates the window size..
3728   *
3729   * @typedef { _AbilityInfo.WindowSize }
3730   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3731   * @since 9
3732   */
3733  /**
3734   * Contains basic Ability information. Indicates the window size..
3735   *
3736   * @typedef { _AbilityInfo.WindowSize }
3737   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3738   * @atomicservice
3739   * @since 11
3740   */
3741  export type WindowSize = _AbilityInfo.WindowSize;
3742
3743  /**
3744   * Obtains extension information about a bundle.
3745   *
3746   * @typedef { _ExtensionAbilityInfo.ExtensionAbilityInfo }
3747   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3748   * @since 9
3749   */
3750  /**
3751   * Obtains extension information about a bundle.
3752   *
3753   * @typedef { _ExtensionAbilityInfo.ExtensionAbilityInfo }
3754   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3755   * @atomicservice
3756   * @since 11
3757   */
3758  export type ExtensionAbilityInfo = _ExtensionAbilityInfo.ExtensionAbilityInfo;
3759
3760  /**
3761   * Indicates the defined permission details in file config.json.
3762   *
3763   * @typedef { _PermissionDef }
3764   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3765   * @systemapi
3766   * @since 9
3767   */
3768  export type PermissionDef = _PermissionDef;
3769
3770  /**
3771   * Contains basic Ability information, which uniquely identifies an ability.
3772   *
3773   * @typedef { _ElementName }
3774   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3775   * @since 9
3776   */
3777  /**
3778   * Contains basic Ability information, which uniquely identifies an ability.
3779   *
3780   * @typedef { _ElementName }
3781   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3782   * @atomicservice
3783   * @since 11
3784   */
3785  export type ElementName = _ElementName;
3786
3787  /**
3788   * Contains shared bundle info.
3789   *
3790   * @typedef { _SharedBundleInfo }
3791   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3792   * @systemapi
3793   * @since 10
3794   */
3795  export type SharedBundleInfo = _SharedBundleInfo;
3796
3797  /**
3798   * Obtains profile file information about a bundle.
3799   *
3800   * @typedef { _AppProvisionInfo.AppProvisionInfo }
3801   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3802   * @systemapi
3803   * @since 10
3804   */
3805  export type AppProvisionInfo = _AppProvisionInfo.AppProvisionInfo;
3806
3807  /**
3808   * Obtains profile file validity about a bundle.
3809   *
3810   * @typedef { _AppProvisionInfo.Validity }
3811   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3812   * @systemapi
3813   * @since 10
3814   */
3815  export type Validity = _AppProvisionInfo.Validity;
3816
3817  /**
3818   * Obtains information about a recoverable preinstalled application.
3819   *
3820   * @typedef { _RecoverableApplicationInfo }
3821   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3822   * @systemapi
3823   * @since 11
3824   */
3825  export type RecoverableApplicationInfo = _RecoverableApplicationInfo;
3826
3827  /**
3828   * Obtains configuration information about an skill
3829   *
3830   * @typedef { _Skill.Skill }
3831   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3832   * @atomicservice
3833   * @since 12
3834   */
3835  export type Skill = _Skill.Skill;
3836
3837  /**
3838   * Obtains configuration information about an skillUri
3839   *
3840   * @typedef { _Skill.SkillUri }
3841   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3842   * @atomicservice
3843   * @since 12
3844   */
3845  export type SkillUrl = _Skill.SkillUri;
3846
3847  /**
3848   * Indicates the information of preinstalled application.
3849   *
3850   * @typedef { _PreinstalledApplicationInfo  }
3851   * @syscap SystemCapability.BundleManager.BundleFramework.Core
3852   * @systemapi
3853   * @since 12
3854   */
3855  export type PreinstalledApplicationInfo = _PreinstalledApplicationInfo;
3856}
3857
3858export default bundleManager;
3859