• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-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 MDMKit
19 */
20
21import type { AsyncCallback } from '@ohos.base';
22import type Want from '@ohos.app.ability.Want';
23
24/**
25 * This module provides the capability to manage restriction policy of the enterprise devices.
26 *
27 * @namespace restrictions
28 * @syscap SystemCapability.Customization.EnterpriseDeviceManager
29 * @since 10
30 */
31declare namespace restrictions {
32  /**
33   * Disable or enable the printing function of the device
34   * This function can be called by a super administrator.
35   *
36   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
37   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
38   *                         The admin must have the corresponding permission.
39   * @param { boolean } disabled - true if the user disables the printing function.
40   * @param { AsyncCallback<void> } callback - the callback of setPrinterDisabled.
41   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
42   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
43   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
44   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
45   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
46   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
47   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
48   * @systemapi
49   * @stagemodelonly
50   * @since 10
51   */
52  function setPrinterDisabled(admin: Want, disabled: boolean, callback: AsyncCallback<void>): void;
53
54  /**
55   * Disable or enable the printing function of the device
56   * This function can be called by a super administrator.
57   *
58   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
59   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
60   *                         The admin must have the corresponding permission.
61   * @param { boolean } disabled - true if the user disables the printing function.
62   * @returns { Promise<void> } the promise returned by the setPrinterDisabled.
63   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
64   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
65   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
66   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
67   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
68   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
69   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
70   * @systemapi
71   * @stagemodelonly
72   * @since 10
73   */
74  function setPrinterDisabled(admin: Want, disabled: boolean): Promise<void>;
75
76  /**
77   * Is the printing function of the device disabled
78   * This function can be called by a super administrator.
79   *
80   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
81   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
82   *                         If the admin is not empty, it must have the corresponding permission.
83   * @param { AsyncCallback<boolean> } callback - the callback of isPrinterDisabled.
84   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
85   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
86   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
87   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
88   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
89   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
90   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
91   * @systemapi
92   * @stagemodelonly
93   * @since 10
94   */
95  function isPrinterDisabled(admin: Want, callback: AsyncCallback<boolean>): void;
96
97  /**
98   * Is the printing function of the device disabled
99   * This function can be called by a super administrator.
100   *
101   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
102   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
103   *                         If the admin is not empty, it must have the corresponding permission.
104   * @returns { Promise<boolean> } the promise returned by the isPrinterDisabled.
105   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
106   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
107   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
108   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
109   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
110   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
111   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
112   * @systemapi
113   * @stagemodelonly
114   * @since 10
115   */
116  function isPrinterDisabled(admin: Want): Promise<boolean>;
117
118  /**
119   * Disable or enable the HDC function of the device
120   * This function can be called by a super administrator.
121   *
122   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
123   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
124   *                         The admin must have the corresponding permission.
125   * @param { boolean } disabled - true if the user disables the HDC function.
126   * @param { AsyncCallback<void> } callback - the callback of setHdcDisabled.
127   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
128   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
129   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
130   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
131   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
132   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
133   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
134   * @systemapi
135   * @stagemodelonly
136   * @since 10
137   */
138  function setHdcDisabled(admin: Want, disabled: boolean, callback: AsyncCallback<void>): void;
139
140  /**
141   * Disable or enable the HDC function of the device
142   * This function can be called by a super administrator.
143   *
144   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
145   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
146   *                         The admin must have the corresponding permission.
147   * @param { boolean } disabled - true if the user disables the HDC function.
148   * @returns { Promise<void> } the promise returned by the setHdcDisabled.
149   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
150   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
151   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
152   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
153   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
154   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
155   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
156   * @systemapi
157   * @stagemodelonly
158   * @since 10
159   */
160  function setHdcDisabled(admin: Want, disabled: boolean): Promise<void>;
161
162  /**
163   * Is the HDC function of the device disabled
164   * This function can be called by a super administrator.
165   *
166   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
167   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
168   *                         If the admin is not empty, it must have the corresponding permission.
169   * @param { AsyncCallback<boolean> } callback - the callback of isHdcDisabled.
170   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
171   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
172   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
173   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
174   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
175   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
176   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
177   * @systemapi
178   * @stagemodelonly
179   * @since 10
180   */
181  function isHdcDisabled(admin: Want, callback: AsyncCallback<boolean>): void;
182
183  /**
184   * Is the HDC function of the device disabled
185   * This function can be called by a super administrator.
186   *
187   * @permission ohos.permission.ENTERPRISE_RESTRICT_POLICY
188   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
189   *                         If the admin is not empty, it must have the corresponding permission.
190   * @returns { Promise<boolean> } the promise returned by the isHdcDisabled.
191   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
192   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
193   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
194   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
195   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
196   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
197   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
198   * @systemapi
199   * @stagemodelonly
200   * @since 10
201   */
202  function isHdcDisabled(admin: Want): Promise<boolean>;
203
204  /**
205   * Disables the microphone of device.
206   *
207   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
208   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
209   *                         The admin must have the corresponding permission.
210   * @param { boolean } disable - true if disable the microphone of device, otherwise false.
211   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
212   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
213   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
214   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
215   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
216   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
217   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
218   * @systemapi
219   * @stagemodelonly
220   * @since 11
221   */
222  function disableMicrophone(admin: Want, disable: boolean): void;
223
224  /**
225   * Queries whether the microphone of device is disabled.
226   *
227   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
228   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
229   *                         If the admin is not empty, it must have the corresponding permission.
230   * @returns { boolean } true if the microphone of device is disabled, otherwise false.
231   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
232   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
233   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
234   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
235   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
236   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
237   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
238   * @systemapi
239   * @stagemodelonly
240   * @since 11
241   */
242  function isMicrophoneDisabled(admin: Want): boolean;
243
244  /**
245   * Sets the device fingerprint authorization capability disabled.
246   *
247   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
248   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
249   *                         The admin must have the corresponding permission.
250   * @param { boolean } disabled - true if set the fingerprint authorization capability disabled.
251   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
252   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
253   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
254   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
255   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
256   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
257   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
258   * @systemapi
259   * @stagemodelonly
260   * @since 11
261   */
262  function setFingerprintAuthDisabled(admin: Want, disabled: boolean): void;
263
264  /**
265   * Queries device fingerprint authorization capability is disabled or enabled.
266   *
267   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
268   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
269   *                         If the admin is not empty, it must have the corresponding permission.
270   * @returns { boolean } true if the fingerprint authorization capability is disabled.
271   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
272   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
273   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
274   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
275   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
276   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
277   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
278   * @systemapi
279   * @stagemodelonly
280   * @since 11
281   */
282  function isFingerprintAuthDisabled(admin: Want): boolean;
283
284  /**
285   * Disallows the specific feature of the device.
286   *
287   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
288   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
289   *                         The admin must have the corresponding permission.
290   * @param { string } feature - feature indicates the specific feature to be disallowed or allowed,
291   *                             the supported device features include modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb and wifi.
292   * @param { boolean } disallow - true if disallow the specific feature of device, otherwise false.
293   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
294   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
295   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
296   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
297   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
298   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
299   * @stagemodelonly
300   * @since 12
301   */
302  /**
303   * Disallows the specific feature of the device.
304   *
305   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS or ohos.permission.PERSONAL_MANAGE_RESTRICTIONS
306   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
307   *                         The admin must have the corresponding permission.
308   * @param { string } feature - feature indicates the specific feature to be disallowed or allowed,
309   *                             the supported device features include modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb and wifi.
310   * @param { boolean } disallow - true if disallow the specific feature of device, otherwise false.
311   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
312   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
313   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
314   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
315   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
316   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
317   * @stagemodelonly
318   * @since 15
319   */
320  function setDisallowedPolicy(admin: Want, feature: string, disallow: boolean): void;
321
322  /**
323   * Queries whether the specific feature of the device is disallowed.
324   *
325   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
326   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
327   *                         If the admin is not empty, it must have the corresponding permission.
328   * @param { string } feature - feature indicates the specific feature to be queried,
329   *                             the supported device features include modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb and wifi.
330   * @returns { boolean } true if the specific feature of device is disallowed, otherwise false.
331   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
332   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
333   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
334   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
335   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
336   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
337   * @stagemodelonly
338   * @since 12
339   */
340  /**
341   * Queries whether the specific feature of the device is disallowed.
342   *
343   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS or ohos.permission.PERSONAL_MANAGE_RESTRICTIONS
344   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
345   *                         If the admin is not empty, it must have the corresponding permission.
346   * @param { string } feature - feature indicates the specific feature to be queried,
347   *                             the supported device features include modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb and wifi.
348   * @returns { boolean } true if the specific feature of device is disallowed, otherwise false.
349   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
350   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
351   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
352   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
353   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
354   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
355   * @stagemodelonly
356   * @since 15
357   */
358  function getDisallowedPolicy(admin: Want, feature: string): boolean;
359
360  /**
361   * Disallows the specific feature of the device for the specified account.
362   *
363   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
364   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
365   * @param { string } feature - feature indicates the specific feature to be disallowed or allowed.
366   * @param { boolean } disallow - true if disallow the specific feature of device, otherwise false.
367   * @param { number } accountId - accountId indicates the account ID to be queried.
368   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
369   * @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device.
370   * @throws { BusinessError } 9200010 - A conflict policy has been configured.
371   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
372   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
373   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
374   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
375   * @stagemodelonly
376   * @since 14
377   */
378  function setDisallowedPolicyForAccount(admin: Want, feature: string, disallow: boolean, accountId: number): void;
379
380  /**
381   * Queries whether the specific feature of the device is disallowed for the specified account.
382   *
383   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
384   * @param { Want } admin - admin indicates the enterprise admin extension ability information.
385   * @param { string } feature - feature indicates the specific feature to be queried.
386   * @param { number } accountId - accountId indicates the account ID to be queried.
387   * @returns { boolean } true if the specific feature of device is disallowed, otherwise false.
388   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
389   * @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device.
390   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
391   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
392   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
393   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
394   * @stagemodelonly
395   * @since 14
396   */
397  function getDisallowedPolicyForAccount(admin: Want, feature: string, accountId: number): boolean;
398
399  /**
400   * Adds applications or bundles or other contents to the list to restrict them from using a specific feature.
401   *
402   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
403   * @param { Want } admin - admin indicates the administrator ability information.
404   * @param { string } feature - feature indicates the specific feature to be disallowed.
405   * @param { Array<string> } list - list of restricted applications or bundles or other contents.
406   * @param { number } accountId - indicates the account ID.
407   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
408   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
409   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
410   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
411   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
412   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
413   * @stagemodelonly
414   * @since 14
415   */
416  function addDisallowedListForAccount(admin: Want, feature: string, list: Array<string>, accountId: number): void;
417
418  /**
419   * Removes applications or bundles or other contents from the list to unblock them from using a specific feature.
420   *
421   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
422   * @param { Want } admin - admin indicates the administrator ability information.
423   * @param { string } feature - feature indicates the specific feature to be disallowed.
424   * @param { Array<string> } list - list of unblock applications or bundles or other contents.
425   * @param { number } accountId - indicates the account ID.
426   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
427   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
428   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
429   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
430   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
431   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
432   * @stagemodelonly
433   * @since 14
434   */
435  function removeDisallowedListForAccount(admin: Want, feature: string, list: Array<string>, accountId: number): void;
436
437  /**
438   * Gets the list of applications or bundles or other contents that are restrict from using a specific feature.
439   *
440   * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
441   * @param { Want } admin - admin indicates the administrator ability information.
442   * @param { string } feature - feature indicates the specific feature to be disallowed.
443   * @param { number } accountId - indicates the account ID.
444   * @returns { Array<string> } list - list of applications or bundles or other contents.
445   * @throws { BusinessError } 9200001 - The application is not an administrator application of the device.
446   * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device.
447   * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
448   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
449   *                                 2. Incorrect parameter types; 3. Parameter verification failed.
450   * @syscap SystemCapability.Customization.EnterpriseDeviceManager
451   * @stagemodelonly
452   * @since 14
453   */
454  function getDisallowedListForAccount(admin: Want, feature: string, accountId: number): Array<string>;
455}
456
457export default restrictions;
458