• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import type { ElementName } from './bundleManager/ElementName';
23import Want from './@ohos.app.ability.Want';
24
25/**
26 * Used for application interception control
27 *
28 * @namespace appControl
29 * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
30 * @systemapi
31 * @since 9
32 */
33declare namespace appControl {
34  /**
35   * Indicates the ability component type.
36   *
37   * @enum { number }
38   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
39   * @systemapi
40   * @since 11
41   */
42  export enum ComponentType {
43    /**
44     * Indicates the UI ability type.
45     *
46     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
47     * @systemapi
48     * @since 11
49     */
50    UI_ABILITY = 1,
51
52    /**
53     * Indicates the extension ability type.
54     *
55     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
56     * @systemapi
57     * @since 11
58     */
59    UI_EXTENSION = 2
60  }
61
62  /**
63   * Indicates the ability component type when uninstalled.
64   *
65   * @enum { number }
66   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
67   * @systemapi
68   * @since 15
69   */
70  export enum UninstallComponentType {
71    /**
72     * Indicates the service extension ability type.
73     *
74     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
75     * @systemapi
76     * @since 15
77     */
78    EXTENSION = 1,
79  }
80
81  /**
82   * Indicates when to intercept the specified application.
83   *
84   * @enum { number }
85   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
86   * @systemapi
87   * @since 11
88   */
89  export enum DisposedType {
90    /**
91     * All abilities will be blocked.
92     *
93     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
94     * @systemapi
95     * @since 11
96     */
97    BLOCK_APPLICATION = 1,
98    /**
99     * Only the specified abilities will be blocked.
100     *
101     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
102     * @systemapi
103     * @since 11
104     */
105    BLOCK_ABILITY = 2,
106    /**
107     * All abilities will not be blocked.
108     *
109     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
110     * @systemapi
111     * @since 11
112     */
113    NON_BLOCK = 3
114  }
115
116  /**
117   * Indicates the strategy to intercept the specified application.
118   *
119   * @enum { number }
120   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
121   * @systemapi
122   * @since 11
123   */
124  export enum ControlType {
125    /**
126     * Only the specified abilities are allowed to run.
127     *
128     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
129     * @systemapi
130     * @since 11
131     */
132    ALLOWED_LIST = 1,
133    /**
134     * The specified abilities are not allowed to run.
135     *
136     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
137     * @systemapi
138     * @since 11
139     */
140    DISALLOWED_LIST = 2
141  }
142
143  /**
144   * Indicates the rule for interception.
145   *
146   * @typedef DisposedRule
147   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
148   * @systemapi
149   * @since 11
150   */
151  export interface DisposedRule {
152    /**
153     * Indicates the ability that will be pulled up when interception occurs.
154     *
155     * @type { Want }
156     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
157     * @systemapi
158     * @since 11
159     */
160    want: Want;
161
162    /**
163     * Indicates the type of the ability that will be pulled up when interception occurs.
164     *
165     * @type { ComponentType }
166     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
167     * @systemapi
168     * @since 11
169     */
170    componentType: ComponentType;
171
172    /**
173     * Indicates when to intercept the specified application.
174     *
175     * @type { DisposedType }
176     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
177     * @systemapi
178     * @since 11
179     */
180    disposedType: DisposedType;
181
182    /**
183     * Indicates the interception policy.
184     *
185     * @type { ControlType }
186     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
187     * @systemapi
188     * @since 11
189     */
190    controlType: ControlType;
191
192    /**
193     * Indicates the abilities to be disposed of the specified application.
194     *
195     * @type { Array<ElementName> }
196     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
197     * @systemapi
198     * @since 11
199     */
200    elementList: Array<ElementName> ;
201
202    /**
203     * Indicates priority of the rule.
204     *
205     * @type { number }
206     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
207     * @systemapi
208     * @since 11
209     */
210    priority: number;
211  }
212
213  /**
214   * Indicates the uninstall rule for interception.
215   *
216   * @typedef UninstallDisposedRule
217   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
218   * @systemapi
219   * @since 15
220   */
221  export interface UninstallDisposedRule {
222    /**
223     * Indicates the ability that will be pulled up when interception occurs.
224     *
225     * @type { Want }
226     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
227     * @systemapi
228     * @since 15
229     */
230    want: Want;
231
232    /**
233     * Indicates the type of the ability that will be pulled up when interception occurs.
234     *
235     * @type { UninstallComponentType }
236     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
237     * @systemapi
238     * @since 15
239     */
240    uninstallComponentType: UninstallComponentType;
241
242    /**
243     * Indicates priority of the rule.
244     *
245     * @type { number }
246     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
247     * @systemapi
248     * @since 15
249     */
250    priority: number;
251  }
252
253  /**
254   * Indicate the configuration for batch interception settings.
255   *
256   * @typedef DisposedRuleConfiguration
257   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
258   * @systemapi
259   * @since 20
260   */
261  export interface DisposedRuleConfiguration {
262    /**
263     * Indicates the app ID of the application.
264     *
265     * @type { string }
266     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
267     * @systemapi
268     * @since 20
269     */
270    appId: string;
271
272    /**
273     * Indicates the index of clone app.
274     *
275     * @type { number }
276     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
277     * @systemapi
278     * @since 20
279     */
280    appIndex: number;
281
282    /**
283     * Indicates the rule for interception.
284     *
285     * @type { DisposedRule }
286     * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
287     * @systemapi
288     * @since 20
289     */
290    disposedRule: DisposedRule;
291  }
292
293  /**
294   * Set the disposed status of a specified bundle.
295   *
296   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
297   * @param { string } appId - Indicates the app ID of the application.
298   * @param { Want } disposedWant - Indicates the disposed want.
299   * @param { AsyncCallback<void> } callback - The callback of setting the disposed status result.
300   * @throws { BusinessError } 201 - Permission denied.
301   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
302   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
303   * @throws { BusinessError } 801 - Capability not supported.
304   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
305   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
306   * @systemapi
307   * @since 9
308   */
309  function setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback<void>): void;
310
311  /**
312   * Set the disposed status of a specified bundle.
313   *
314   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
315   * @param { string } appId - Indicates the app ID of the application.
316   * @param { Want } disposedWant - Indicates the disposed want.
317   * @returns { Promise<void> } The result of setting the disposed status of a specified bundle.
318   * @throws { BusinessError } 201 - Permission denied.
319   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
320   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
321   * @throws { BusinessError } 801 - Capability not supported.
322   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
323   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
324   * @systemapi
325   * @since 9
326   */
327  function setDisposedStatus(appId: string, disposedWant: Want): Promise<void>;
328
329  /**
330   * Set the disposed status of a specified bundle.
331   *
332   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
333   * @param { string } appId - Indicates the app ID of the application.
334   * @param { Want } disposedWant - Indicates the disposed want.
335   * @throws { BusinessError } 201 - Permission denied.
336   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
337   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
338   * @throws { BusinessError } 801 - Capability not supported.
339   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
340   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
341   * @systemapi
342   * @since 10
343   */
344  function setDisposedStatusSync(appId: string, disposedWant: Want): void;
345
346  /**
347   * Obtains the disposed status of a specified bundle.
348   *
349   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
350   * @param { string } appId - Indicates the app ID of the application.
351   * @param { AsyncCallback<Want> } callback - The callback of getting the disposed status of a specified bundle result.
352   * @throws { BusinessError } 201 - Permission denied.
353   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
354   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
355   * @throws { BusinessError } 801 - Capability not supported.
356   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
357   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
358   * @systemapi
359   * @since 9
360   */
361  function getDisposedStatus(appId: string, callback: AsyncCallback<Want>): void;
362
363  /**
364   * Obtains the disposed status of a specified bundle.
365   *
366   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
367   * @param { string } appId - Indicates the app ID of the application.
368   * @returns { Promise<Want> } Returns the disposed status of a specified bundle.
369   * @throws { BusinessError } 201 - Permission denied.
370   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
371   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
372   * @throws { BusinessError } 801 - Capability not supported.
373   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
374   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
375   * @systemapi
376   * @since 9
377   */
378  function getDisposedStatus(appId: string): Promise<Want>;
379
380  /**
381   * Obtains the disposed status of a specified bundle.
382   *
383   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
384   * @param { string } appId - Indicates the app ID of the application.
385   * @returns { Want } Returns the disposed status of a specified bundle.
386   * @throws { BusinessError } 201 - Permission denied.
387   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
388   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
389   * @throws { BusinessError } 801 - Capability not supported.
390   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
391   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
392   * @systemapi
393   * @since 10
394   */
395  function getDisposedStatusSync(appId: string): Want;
396
397  /**
398   * Delete the disposed status of a specified bundle.
399   *
400   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
401   * @param { string } appId - Indicates the app ID of the application.
402   * @param { AsyncCallback<void> } callback - the callback of deleting the disposed status of a specified bundle result.
403   * @throws { BusinessError } 201 - Permission denied.
404   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
405   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
406   * @throws { BusinessError } 801 - Capability not supported.
407   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
408   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
409   * @systemapi
410   * @since 9
411   */
412  function deleteDisposedStatus(appId: string, callback: AsyncCallback<void>): void;
413
414  /**
415   * Delete the disposed status of a specified bundle.
416   *
417   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
418   * @param { string } appId - Indicates the app ID of the application.
419   * @returns { Promise<void> } Returns the result of deleting the disposed status of a specified bundle.
420   * @throws { BusinessError } 201 - Permission denied.
421   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
422   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
423   * @throws { BusinessError } 801 - Capability not supported.
424   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
425   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
426   * @systemapi
427   * @since 9
428   */
429  function deleteDisposedStatus(appId: string): Promise<void>;
430
431  /**
432   * Delete the disposed status of a specified bundle.
433   *
434   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
435   * @param { string } appId - Indicates the app ID of the application.
436   * @throws { BusinessError } 201 - Permission denied.
437   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
438   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
439   * @throws { BusinessError } 801 - Capability not supported.
440   * @throws { BusinessError } 17700005 - The specified app ID is empty string.
441   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
442   * @systemapi
443   * @since 10
444   */
445  /**
446   * Delete the disposed status of a specified bundle.
447   *
448   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
449   * @param { string } appId - Indicates the app ID of the application.
450   * @param { number } [appIndex] Indicates the index of clone app.
451   * @throws { BusinessError } 201 - Permission denied.
452   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
453   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
454   * @throws { BusinessError } 801 - Capability not supported.
455   * @throws { BusinessError } 17700005 - The specified app ID is invalid.
456   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
457   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
458   * @systemapi
459   * @since 12
460   */
461  function deleteDisposedStatusSync(appId: string, appIndex?: number): void;
462
463  /**
464   * Obtains the disposed rule of a specified bundle.
465   *
466   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
467   * @param { string } appId - Indicates the app ID of the application.
468   * @returns { DisposedRule } Returns the disposed rule of a specified bundle.
469   * @throws { BusinessError } 201 - Permission denied.
470   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
471   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
472   * @throws { BusinessError } 801 - Capability not supported.
473   * @throws { BusinessError } 17700005 - The specified app ID is an empty string.
474   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
475   * @systemapi
476   * @since 11
477   */
478  /**
479   * Obtains the disposed rule of a specified bundle.
480   *
481   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
482   * @param { string } appId - Indicates the app ID of the application.
483   * @param { number } [appIndex] Indicates the index of clone app.
484   * @returns { DisposedRule } Returns the disposed rule of a specified bundle.
485   * @throws { BusinessError } 201 - Permission denied.
486   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
487   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
488   * @throws { BusinessError } 801 - Capability not supported.
489   * @throws { BusinessError } 17700005 - The specified app ID is invalid.
490   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
491   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
492   * @systemapi
493   * @since 12
494   */
495  function getDisposedRule(appId: string, appIndex?: number): DisposedRule;
496
497  /**
498   * Sets the disposed rule of a specified bundle.
499   *
500   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
501   * @param { string } appId - Indicates the app ID of the application.
502   * @param { DisposedRule } rule - Indicates the disposed rule of a specified bundle.
503   * @throws { BusinessError } 201 - Permission denied.
504   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
505   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
506   * @throws { BusinessError } 801 - Capability not supported.
507   * @throws { BusinessError } 17700005 - The specified app ID is an empty string.
508   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
509   * @systemapi
510   * @since 11
511   */
512  /**
513   * Sets the disposed rule of a specified bundle.
514   *
515   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
516   * @param { string } appId - Indicates the app ID of the application.
517   * @param { DisposedRule } rule - Indicates the disposed rule of a specified bundle.
518   * @param { number } [appIndex] Indicates the index of clone app.
519   * @throws { BusinessError } 201 - Permission denied.
520   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
521   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
522   * @throws { BusinessError } 801 - Capability not supported.
523   * @throws { BusinessError } 17700005 - The specified app ID is invalid.
524   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
525   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
526   * @systemapi
527   * @since 12
528   */
529    function setDisposedRule(appId: string, rule: DisposedRule, appIndex?: number): void;
530
531  /**
532   * Sets the uninstall disposed rule of a specified bundle.
533   *
534   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
535   * @param { string } appIdentifier - Indicates the appIdentifier of the application.
536   * @param { UninstallDisposedRule } rule - Indicates the uninstall disposed rule of a specified bundle.
537   * @param { number } [appIndex] Indicates the index of clone app.
538   * @throws { BusinessError } 201 - Permission denied.
539   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
540   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
541   * @throws { BusinessError } 801 - Capability not supported.
542   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
543   * @throws { BusinessError } 17700074 - The specified appIdentifier is invalid.
544   * @throws { BusinessError } 17700075 - The specified bundleName of want is not the same with caller.
545   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
546   * @systemapi
547   * @since 15
548   */
549  function setUninstallDisposedRule(appIdentifier: string, rule: UninstallDisposedRule, appIndex?: number): void;
550
551  /**
552   * Obtains the uninstall disposed rule of a specified bundle.
553   *
554   * @permission ohos.permission.GET_DISPOSED_APP_STATUS or ohos.permission.MANAGE_DISPOSED_APP_STATUS
555   * @param { string } appIdentifier - Indicates the appIdentifier of the application.
556   * @param { number } [appIndex] Indicates the index of clone app.
557   * @returns { UninstallDisposedRule } Returns the uninstall disposed rule of a specified bundle.
558   * @throws { BusinessError } 201 - Permission denied.
559   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
560   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
561   * @throws { BusinessError } 801 - Capability not supported.
562   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
563   * @throws { BusinessError } 17700074 - The specified appIdentifier is invalid.
564   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
565   * @systemapi
566   * @since 15
567   */
568  function getUninstallDisposedRule(appIdentifier: string, appIndex?: number): UninstallDisposedRule;
569
570  /**
571   * Delete the uninstall disposed rule of a specified bundle.
572   *
573   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
574   * @param { string } appIdentifier - Indicates the appIdentifier of the application.
575   * @param { number } [appIndex] Indicates the index of clone app.
576   * @throws { BusinessError } 201 - Permission denied.
577   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
578   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
579   * @throws { BusinessError } 801 - Capability not supported.
580   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
581   * @throws { BusinessError } 17700074 - The specified appIdentifier is invalid.
582   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
583   * @systemapi
584   * @since 15
585   */
586  function deleteUninstallDisposedRule(appIdentifier: string, appIndex?: number): void;
587
588  /**
589   * Batch set disposed rules for specified bundles.
590   *
591   * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS
592   * @param { Array<DisposedRuleConfiguration> } disposedRuleConfigurations - Indicate the configuration for batch interception settings.
593   * @throws { BusinessError } 201 - Permission denied.
594   * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API.
595   * @throws { BusinessError } 801 - Capability not supported.
596   * @throws { BusinessError } 17700005 - The specified app ID is invalid.
597   * @throws { BusinessError } 17700061 - AppIndex is not in the valid range.
598   * @syscap SystemCapability.BundleManager.BundleFramework.AppControl
599   * @systemapi
600   * @since 20
601   */
602  function setDisposedRules(disposedRuleConfigurations: Array<DisposedRuleConfiguration>): void;
603}
604
605export default appControl;
606