161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit BasicServicesKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport type distributedAccount from './@ohos.account.distributedAccount';
2261847f8eSopenharmony_ciimport type { AsyncCallback, Callback } from './@ohos.base';
2361847f8eSopenharmony_ci
2461847f8eSopenharmony_ci/**
2561847f8eSopenharmony_ci * This module provides the capability to manage os accounts.
2661847f8eSopenharmony_ci *
2761847f8eSopenharmony_ci * @namespace osAccount
2861847f8eSopenharmony_ci * @syscap SystemCapability.Account.OsAccount
2961847f8eSopenharmony_ci * @since 7
3061847f8eSopenharmony_ci */
3161847f8eSopenharmony_cideclare namespace osAccount {
3261847f8eSopenharmony_ci  /**
3361847f8eSopenharmony_ci   * Obtains the AccountManager instance.
3461847f8eSopenharmony_ci   *
3561847f8eSopenharmony_ci   * @returns { AccountManager } Returns the instance of the AccountManager.
3661847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
3761847f8eSopenharmony_ci   * @since 7
3861847f8eSopenharmony_ci   */
3961847f8eSopenharmony_ci  function getAccountManager(): AccountManager;
4061847f8eSopenharmony_ci
4161847f8eSopenharmony_ci  /**
4261847f8eSopenharmony_ci   * Provides abilities for you to manage and perform operations on your OS accounts.
4361847f8eSopenharmony_ci   *
4461847f8eSopenharmony_ci   * @interface AccountManager
4561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
4661847f8eSopenharmony_ci   * @since 7
4761847f8eSopenharmony_ci   */
4861847f8eSopenharmony_ci  interface AccountManager {
4961847f8eSopenharmony_ci    /**
5061847f8eSopenharmony_ci     * Activates a specified OS account.
5161847f8eSopenharmony_ci     * <p>
5261847f8eSopenharmony_ci     * If multiple OS accounts are available, you can call this method to enable a specific OS account
5361847f8eSopenharmony_ci     * to run in the foreground. Then, the OS account originally running in the foreground will be
5461847f8eSopenharmony_ci     * switched to the background.
5561847f8eSopenharmony_ci     * </p>
5661847f8eSopenharmony_ci     *
5761847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
5861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
5961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
6061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
6161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
6261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
6361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
6461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
6561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
6661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
6761847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
6861847f8eSopenharmony_ci     * @throws { BusinessError } 12300009 - Account has been activated.
6961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
7061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
7161847f8eSopenharmony_ci     * @since 7
7261847f8eSopenharmony_ci     */
7361847f8eSopenharmony_ci    /**
7461847f8eSopenharmony_ci     * Activates a specified OS account.
7561847f8eSopenharmony_ci     * <p>
7661847f8eSopenharmony_ci     * If multiple OS accounts are available, you can call this method to enable a specific OS account
7761847f8eSopenharmony_ci     * to run in the foreground. Then, the OS account originally running in the foreground will be
7861847f8eSopenharmony_ci     * switched to the background.
7961847f8eSopenharmony_ci     * </p>
8061847f8eSopenharmony_ci     *
8161847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
8261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
8361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
8461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
8561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
8661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
8761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
8861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
8961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
9061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
9161847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
9261847f8eSopenharmony_ci     * @throws { BusinessError } 12300016 - The number of logged in accounts reaches the upper limit.
9361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
9461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
9561847f8eSopenharmony_ci     * @since 12
9661847f8eSopenharmony_ci     */
9761847f8eSopenharmony_ci    activateOsAccount(localId: number, callback: AsyncCallback<void>): void;
9861847f8eSopenharmony_ci
9961847f8eSopenharmony_ci    /**
10061847f8eSopenharmony_ci     * Activates a specified OS account.
10161847f8eSopenharmony_ci     * <p>
10261847f8eSopenharmony_ci     * If multiple OS accounts are available, you can call this method to enable a specific OS account
10361847f8eSopenharmony_ci     * to run in the foreground. Then, the OS account originally running in the foreground will be
10461847f8eSopenharmony_ci     * switched to the background.
10561847f8eSopenharmony_ci     * </p>
10661847f8eSopenharmony_ci     *
10761847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
10861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
10961847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
11061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
11161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
11261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
11361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
11461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
11561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
11661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
11761847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
11861847f8eSopenharmony_ci     * @throws { BusinessError } 12300009 - Account has been activated.
11961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
12061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
12161847f8eSopenharmony_ci     * @since 7
12261847f8eSopenharmony_ci     */
12361847f8eSopenharmony_ci    /**
12461847f8eSopenharmony_ci     * Activates a specified OS account.
12561847f8eSopenharmony_ci     * <p>
12661847f8eSopenharmony_ci     * If multiple OS accounts are available, you can call this method to enable a specific OS account
12761847f8eSopenharmony_ci     * to run in the foreground. Then, the OS account originally running in the foreground will be
12861847f8eSopenharmony_ci     * switched to the background.
12961847f8eSopenharmony_ci     * </p>
13061847f8eSopenharmony_ci     *
13161847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
13261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
13361847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
13461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
13561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
13661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
13761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
13861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
13961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
14061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
14161847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
14261847f8eSopenharmony_ci     * @throws { BusinessError } 12300016 - The number of logged in accounts reaches the upper limit.
14361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
14461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
14561847f8eSopenharmony_ci     * @since 12
14661847f8eSopenharmony_ci     */
14761847f8eSopenharmony_ci    activateOsAccount(localId: number): Promise<void>;
14861847f8eSopenharmony_ci
14961847f8eSopenharmony_ci    /**
15061847f8eSopenharmony_ci     * Deactivates a specified OS account.
15161847f8eSopenharmony_ci     *
15261847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
15361847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
15461847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
15561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
15661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
15761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
15861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
15961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
16061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
16161847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
16261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
16361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
16461847f8eSopenharmony_ci     * @since 12
16561847f8eSopenharmony_ci     */
16661847f8eSopenharmony_ci    deactivateOsAccount(localId: number): Promise<void>;
16761847f8eSopenharmony_ci
16861847f8eSopenharmony_ci    /**
16961847f8eSopenharmony_ci     * Checks whether the function of supporting multiple OS accounts is enabled.
17061847f8eSopenharmony_ci     *
17161847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if this function is enabled; returns {@code false} otherwise.
17261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
17361847f8eSopenharmony_ci     * @since 7
17461847f8eSopenharmony_ci     * @deprecated since 9
17561847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkMultiOsAccountEnabled
17661847f8eSopenharmony_ci     */
17761847f8eSopenharmony_ci    isMultiOsAccountEnable(callback: AsyncCallback<boolean>): void;
17861847f8eSopenharmony_ci
17961847f8eSopenharmony_ci    /**
18061847f8eSopenharmony_ci     * Checks whether the function of supporting multiple OS accounts is enabled.
18161847f8eSopenharmony_ci     *
18261847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if this function is enabled; returns {@code false} otherwise.
18361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
18461847f8eSopenharmony_ci     * @since 7
18561847f8eSopenharmony_ci     * @deprecated since 9
18661847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkMultiOsAccountEnabled
18761847f8eSopenharmony_ci     */
18861847f8eSopenharmony_ci    isMultiOsAccountEnable(): Promise<boolean>;
18961847f8eSopenharmony_ci
19061847f8eSopenharmony_ci    /**
19161847f8eSopenharmony_ci     * Checks whether the function of supporting multiple OS accounts is enabled.
19261847f8eSopenharmony_ci     *
19361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if this function is enabled; returns {@code false} otherwise.
19461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
19561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
19661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
19761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
19861847f8eSopenharmony_ci     * @since 9
19961847f8eSopenharmony_ci     */
20061847f8eSopenharmony_ci    checkMultiOsAccountEnabled(callback: AsyncCallback<boolean>): void;
20161847f8eSopenharmony_ci
20261847f8eSopenharmony_ci    /**
20361847f8eSopenharmony_ci     * Checks whether the function of supporting multiple OS accounts is enabled.
20461847f8eSopenharmony_ci     *
20561847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if this function is enabled; returns {@code false} otherwise.
20661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
20761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
20861847f8eSopenharmony_ci     * @since 9
20961847f8eSopenharmony_ci     */
21061847f8eSopenharmony_ci    checkMultiOsAccountEnabled(): Promise<boolean>;
21161847f8eSopenharmony_ci
21261847f8eSopenharmony_ci    /**
21361847f8eSopenharmony_ci     * Checks whether an OS account is activated based on its local ID.
21461847f8eSopenharmony_ci     *
21561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
21661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
21761847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the OS account is activated.
21861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
21961847f8eSopenharmony_ci     * @since 7
22061847f8eSopenharmony_ci     * @deprecated since 9
22161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountActivated
22261847f8eSopenharmony_ci     */
22361847f8eSopenharmony_ci    isOsAccountActived(localId: number, callback: AsyncCallback<boolean>): void;
22461847f8eSopenharmony_ci
22561847f8eSopenharmony_ci    /**
22661847f8eSopenharmony_ci     * Checks whether an OS account is activated based on its local ID.
22761847f8eSopenharmony_ci     *
22861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
22961847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
23061847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if the OS account is activated; returns {@code false} otherwise.
23161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
23261847f8eSopenharmony_ci     * @since 7
23361847f8eSopenharmony_ci     * @deprecated since 9
23461847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountActivated
23561847f8eSopenharmony_ci     */
23661847f8eSopenharmony_ci    isOsAccountActived(localId: number): Promise<boolean>;
23761847f8eSopenharmony_ci
23861847f8eSopenharmony_ci    /**
23961847f8eSopenharmony_ci     * Checks whether an OS account is activated based on its local ID.
24061847f8eSopenharmony_ci     *
24161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
24261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
24361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the OS account is activated.
24461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
24561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
24661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
24761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
24861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
24961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
25061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
25161847f8eSopenharmony_ci     * @since 9
25261847f8eSopenharmony_ci     * @deprecated since 11
25361847f8eSopenharmony_ci     */
25461847f8eSopenharmony_ci    checkOsAccountActivated(localId: number, callback: AsyncCallback<boolean>): void;
25561847f8eSopenharmony_ci
25661847f8eSopenharmony_ci    /**
25761847f8eSopenharmony_ci     * Checks whether an OS account is activated based on its local ID.
25861847f8eSopenharmony_ci     *
25961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
26061847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
26161847f8eSopenharmony_ci     * @returns { Promise<boolean> } - Returns {@code true} if the OS account is activated; returns {@code false} otherwise.
26261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
26361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
26461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
26561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
26661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
26761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
26861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
26961847f8eSopenharmony_ci     * @since 9
27061847f8eSopenharmony_ci     * @deprecated since 11
27161847f8eSopenharmony_ci     */
27261847f8eSopenharmony_ci    checkOsAccountActivated(localId: number): Promise<boolean>;
27361847f8eSopenharmony_ci
27461847f8eSopenharmony_ci    /**
27561847f8eSopenharmony_ci     * Checks whether an OS account is activated based on its local ID.
27661847f8eSopenharmony_ci     *
27761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
27861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
27961847f8eSopenharmony_ci     * @returns { Promise<boolean> } - Returns {@code true} if the OS account is activated; returns {@code false} otherwise.
28061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
28161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
28261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
28361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
28461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
28561847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
28661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
28761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
28861847f8eSopenharmony_ci     * @since 11
28961847f8eSopenharmony_ci     */
29061847f8eSopenharmony_ci    isOsAccountActivated(localId: number): Promise<boolean>;
29161847f8eSopenharmony_ci
29261847f8eSopenharmony_ci    /**
29361847f8eSopenharmony_ci     * Checks whether a constraint has been enabled for an OS account based on its local ID.
29461847f8eSopenharmony_ci     *
29561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
29661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
29761847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. The value can be:
29861847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
29961847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
30061847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
30161847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
30261847f8eSopenharmony_ci     * <br> from unknown sources.
30361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the constraint is enabled for the specified OS account.
30461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
30561847f8eSopenharmony_ci     * @since 7
30661847f8eSopenharmony_ci     * @deprecated since 9
30761847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountConstraintEnabled
30861847f8eSopenharmony_ci     */
30961847f8eSopenharmony_ci    isOsAccountConstraintEnable(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
31061847f8eSopenharmony_ci
31161847f8eSopenharmony_ci    /**
31261847f8eSopenharmony_ci     * Checks whether a constraint has been enabled for an OS account based on its local ID.
31361847f8eSopenharmony_ci     *
31461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
31561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
31661847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. The value can be:
31761847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
31861847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
31961847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
32061847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
32161847f8eSopenharmony_ci     * <br> from unknown sources.
32261847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if the constraint has been enabled for the OS account;
32361847f8eSopenharmony_ci     *         returns {@code false} otherwise.
32461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
32561847f8eSopenharmony_ci     * @since 7
32661847f8eSopenharmony_ci     * @deprecated since 9
32761847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountConstraintEnabled
32861847f8eSopenharmony_ci     */
32961847f8eSopenharmony_ci    isOsAccountConstraintEnable(localId: number, constraint: string): Promise<boolean>;
33061847f8eSopenharmony_ci
33161847f8eSopenharmony_ci    /**
33261847f8eSopenharmony_ci     * Checks whether the given constraint is enabled for the specified OS account.
33361847f8eSopenharmony_ci     *
33461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
33561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
33661847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. For example: the value can be:
33761847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
33861847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
33961847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
34061847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
34161847f8eSopenharmony_ci     * <br> from unknown sources.
34261847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the constraint is enabled for the specified OS account.
34361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
34461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
34561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
34661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
34761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or constraint.
34861847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
34961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
35061847f8eSopenharmony_ci     * @since 9
35161847f8eSopenharmony_ci     * @deprecated since 11
35261847f8eSopenharmony_ci     */
35361847f8eSopenharmony_ci    checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
35461847f8eSopenharmony_ci
35561847f8eSopenharmony_ci    /**
35661847f8eSopenharmony_ci     * Checks whether the given constraint is enabled for the specified OS account.
35761847f8eSopenharmony_ci     *
35861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
35961847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
36061847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. For example: the value can be:
36161847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
36261847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
36361847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
36461847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
36561847f8eSopenharmony_ci     * <br> from unknown sources.
36661847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the given constraint is enabled for the specified OS account.
36761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
36861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
36961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
37061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
37161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or constraint.
37261847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
37361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
37461847f8eSopenharmony_ci     * @since 9
37561847f8eSopenharmony_ci     * @deprecated since 11
37661847f8eSopenharmony_ci     */
37761847f8eSopenharmony_ci    checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
37861847f8eSopenharmony_ci
37961847f8eSopenharmony_ci    /**
38061847f8eSopenharmony_ci     * Checks whether the given constraint is enabled for the current OS account.
38161847f8eSopenharmony_ci     *
38261847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. For example: the value can be:
38361847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
38461847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
38561847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
38661847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
38761847f8eSopenharmony_ci     * <br> from unknown sources.
38861847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the given constraint is enabled for the current OS account.
38961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
39061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
39161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
39261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
39361847f8eSopenharmony_ci     * @since 11
39461847f8eSopenharmony_ci     */
39561847f8eSopenharmony_ci    isOsAccountConstraintEnabled(constraint: string): Promise<boolean>;
39661847f8eSopenharmony_ci
39761847f8eSopenharmony_ci    /**
39861847f8eSopenharmony_ci     * Checks whether the given constraint is enabled for the specified OS account.
39961847f8eSopenharmony_ci     *
40061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
40161847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
40261847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to check. For example: the value can be:
40361847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
40461847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
40561847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
40661847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
40761847f8eSopenharmony_ci     * <br> from unknown sources.
40861847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the given constraint is enabled for the specified OS account.
40961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
41061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
41161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
41261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
41361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
41461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
41561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
41661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
41761847f8eSopenharmony_ci     * @since 11
41861847f8eSopenharmony_ci     */
41961847f8eSopenharmony_ci    isOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
42061847f8eSopenharmony_ci
42161847f8eSopenharmony_ci    /**
42261847f8eSopenharmony_ci     * Checks whether this OS account is a test OS account.
42361847f8eSopenharmony_ci     *
42461847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if this OS account is a test OS account; returns {@code false} otherwise.
42561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
42661847f8eSopenharmony_ci     * @since 7
42761847f8eSopenharmony_ci     * @deprecated since 9
42861847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountTestable
42961847f8eSopenharmony_ci     */
43061847f8eSopenharmony_ci    isTestOsAccount(callback: AsyncCallback<boolean>): void;
43161847f8eSopenharmony_ci
43261847f8eSopenharmony_ci    /**
43361847f8eSopenharmony_ci     * Checks whether this OS account is a test OS account.
43461847f8eSopenharmony_ci     *
43561847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if this OS account is a test OS account; returns {@code false} otherwise.
43661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
43761847f8eSopenharmony_ci     * @since 7
43861847f8eSopenharmony_ci     * @deprecated since 9
43961847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountTestable
44061847f8eSopenharmony_ci     */
44161847f8eSopenharmony_ci    isTestOsAccount(): Promise<boolean>;
44261847f8eSopenharmony_ci
44361847f8eSopenharmony_ci    /**
44461847f8eSopenharmony_ci     * Checks whether current OS account is testable.
44561847f8eSopenharmony_ci     *
44661847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if this account is testable; returns {@code false} otherwise.
44761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
44861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
44961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
45061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
45161847f8eSopenharmony_ci     * @since 9
45261847f8eSopenharmony_ci     */
45361847f8eSopenharmony_ci    checkOsAccountTestable(callback: AsyncCallback<boolean>): void;
45461847f8eSopenharmony_ci
45561847f8eSopenharmony_ci    /**
45661847f8eSopenharmony_ci     * Checks whether current OS account is testable.
45761847f8eSopenharmony_ci     *
45861847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if this account is testable; returns {@code false} otherwise.
45961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
46061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
46161847f8eSopenharmony_ci     * @since 9
46261847f8eSopenharmony_ci     */
46361847f8eSopenharmony_ci    checkOsAccountTestable(): Promise<boolean>;
46461847f8eSopenharmony_ci
46561847f8eSopenharmony_ci    /**
46661847f8eSopenharmony_ci     * Checks whether an OS account has been verified based on its local ID.
46761847f8eSopenharmony_ci     *
46861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
46961847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if the OS account has been verified successfully;
47061847f8eSopenharmony_ci     *          returns {@code false} otherwise.
47161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
47261847f8eSopenharmony_ci     * @since 7
47361847f8eSopenharmony_ci     * @deprecated since 9
47461847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountVerified
47561847f8eSopenharmony_ci     */
47661847f8eSopenharmony_ci    isOsAccountVerified(callback: AsyncCallback<boolean>): void;
47761847f8eSopenharmony_ci
47861847f8eSopenharmony_ci    /**
47961847f8eSopenharmony_ci     * Checks whether an OS account has been verified based on its local ID.
48061847f8eSopenharmony_ci     *
48161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
48261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
48361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if the OS account has been verified successfully;
48461847f8eSopenharmony_ci     *          returns {@code false} otherwise.
48561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
48661847f8eSopenharmony_ci     * @since 7
48761847f8eSopenharmony_ci     * @deprecated since 9
48861847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountVerified
48961847f8eSopenharmony_ci     */
49061847f8eSopenharmony_ci    isOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): void;
49161847f8eSopenharmony_ci
49261847f8eSopenharmony_ci    /**
49361847f8eSopenharmony_ci     * Checks whether an OS account has been verified based on its local ID.
49461847f8eSopenharmony_ci     *
49561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
49661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
49761847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if the OS account has been verified successfully;
49861847f8eSopenharmony_ci     *          returns {@code false} otherwise.
49961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
50061847f8eSopenharmony_ci     * @since 7
50161847f8eSopenharmony_ci     * @deprecated since 9
50261847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#checkOsAccountVerified
50361847f8eSopenharmony_ci     */
50461847f8eSopenharmony_ci    isOsAccountVerified(localId?: number): Promise<boolean>;
50561847f8eSopenharmony_ci
50661847f8eSopenharmony_ci    /**
50761847f8eSopenharmony_ci     * Checks whether the current OS account is verified.
50861847f8eSopenharmony_ci     *
50961847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the current OS account is verified.
51061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
51161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
51261847f8eSopenharmony_ci     * @since 9
51361847f8eSopenharmony_ci     * @deprecated since 11
51461847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#isOsAccountUnlocked
51561847f8eSopenharmony_ci     */
51661847f8eSopenharmony_ci    checkOsAccountVerified(callback: AsyncCallback<boolean>): void;
51761847f8eSopenharmony_ci
51861847f8eSopenharmony_ci    /**
51961847f8eSopenharmony_ci     * Checks whether the current OS account is verified.
52061847f8eSopenharmony_ci     *
52161847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the current OS account is verified.
52261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
52361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
52461847f8eSopenharmony_ci     * @since 9
52561847f8eSopenharmony_ci     * @deprecated since 11
52661847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#isOsAccountUnlocked
52761847f8eSopenharmony_ci     */
52861847f8eSopenharmony_ci    checkOsAccountVerified(): Promise<boolean>;
52961847f8eSopenharmony_ci
53061847f8eSopenharmony_ci    /**
53161847f8eSopenharmony_ci     * Checks whether the specified OS account is verified.
53261847f8eSopenharmony_ci     *
53361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
53461847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
53561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for checking whether the specified OS account is verified.
53661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
53761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
53861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
53961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
54061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
54161847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
54261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
54361847f8eSopenharmony_ci     * @since 9
54461847f8eSopenharmony_ci     * @deprecated since 11
54561847f8eSopenharmony_ci     */
54661847f8eSopenharmony_ci    checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): void;
54761847f8eSopenharmony_ci
54861847f8eSopenharmony_ci    /**
54961847f8eSopenharmony_ci     * Checks whether the specified OS account is verified.
55061847f8eSopenharmony_ci     *
55161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
55261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
55361847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the specified OS account is verified.
55461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
55561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
55661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
55761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
55861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
55961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
56061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
56161847f8eSopenharmony_ci     * @since 9
56261847f8eSopenharmony_ci     * @deprecated since 11
56361847f8eSopenharmony_ci     */
56461847f8eSopenharmony_ci    checkOsAccountVerified(localId: number): Promise<boolean>;
56561847f8eSopenharmony_ci
56661847f8eSopenharmony_ci    /**
56761847f8eSopenharmony_ci     * Checks whether the current OS account is unlocked.
56861847f8eSopenharmony_ci     *
56961847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the current OS account is unlocked.
57061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
57161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
57261847f8eSopenharmony_ci     * @since 11
57361847f8eSopenharmony_ci     */
57461847f8eSopenharmony_ci    isOsAccountUnlocked(): Promise<boolean>;
57561847f8eSopenharmony_ci
57661847f8eSopenharmony_ci    /**
57761847f8eSopenharmony_ci     * Checks whether the specified OS account is unlocked.
57861847f8eSopenharmony_ci     *
57961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
58061847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
58161847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the specified OS account is unlocked.
58261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
58361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
58461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
58561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
58661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
58761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
58861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
58961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
59061847f8eSopenharmony_ci     * @since 11
59161847f8eSopenharmony_ci     */
59261847f8eSopenharmony_ci    isOsAccountUnlocked(localId: number): Promise<boolean>;
59361847f8eSopenharmony_ci
59461847f8eSopenharmony_ci    /**
59561847f8eSopenharmony_ci     * Removes an OS account based on its local ID.
59661847f8eSopenharmony_ci     *
59761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
59861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
59961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the callback for removing the specified OS account.
60061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
60161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
60261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
60361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
60461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
60561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
60661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
60761847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
60861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
60961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
61061847f8eSopenharmony_ci     * @since 7
61161847f8eSopenharmony_ci     */
61261847f8eSopenharmony_ci    removeOsAccount(localId: number, callback: AsyncCallback<void>): void;
61361847f8eSopenharmony_ci
61461847f8eSopenharmony_ci    /**
61561847f8eSopenharmony_ci     * Removes an OS account based on its local ID.
61661847f8eSopenharmony_ci     *
61761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
61861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
61961847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
62061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
62161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
62261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
62361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
62461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
62561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
62661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
62761847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
62861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
62961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
63061847f8eSopenharmony_ci     * @since 7
63161847f8eSopenharmony_ci     */
63261847f8eSopenharmony_ci    removeOsAccount(localId: number): Promise<void>;
63361847f8eSopenharmony_ci
63461847f8eSopenharmony_ci    /**
63561847f8eSopenharmony_ci     * Sets constraints for an OS account based on its local ID.
63661847f8eSopenharmony_ci     *
63761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
63861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
63961847f8eSopenharmony_ci     * @param { Array<string> } constraints - Indicates the constraints to set for the OS account. The value can be:
64061847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
64161847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
64261847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
64361847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
64461847f8eSopenharmony_ci     * <br> from unknown sources.
64561847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable the constraint.
64661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the callback for setting the specified OS account constraints.
64761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
64861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
64961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
65061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
65161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
65261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or constraints.
65361847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
65461847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
65561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
65661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
65761847f8eSopenharmony_ci     * @since 7
65861847f8eSopenharmony_ci     */
65961847f8eSopenharmony_ci    setOsAccountConstraints(
66061847f8eSopenharmony_ci      localId: number,
66161847f8eSopenharmony_ci      constraints: Array<string>,
66261847f8eSopenharmony_ci      enable: boolean,
66361847f8eSopenharmony_ci      callback: AsyncCallback<void>
66461847f8eSopenharmony_ci    ): void;
66561847f8eSopenharmony_ci
66661847f8eSopenharmony_ci    /**
66761847f8eSopenharmony_ci     * Sets constraints for an OS account based on its local ID.
66861847f8eSopenharmony_ci     *
66961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
67061847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
67161847f8eSopenharmony_ci     * @param { Array<string> } constraints - Indicates the constraints to set for the OS account. The value can be:
67261847f8eSopenharmony_ci     * <br> {@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point.
67361847f8eSopenharmony_ci     * <br> {@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages.
67461847f8eSopenharmony_ci     * <br> {@code constraint.calls.outgoing} - Indicates the constraint on making calls.
67561847f8eSopenharmony_ci     * <br> {@code constraint.unknown.sources.install} - Indicates the constraint on installing applications
67661847f8eSopenharmony_ci     * <br> from unknown sources.
67761847f8eSopenharmony_ci     * @param { boolean } enable - Specifies whether to enable the constraint.
67861847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
67961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
68061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
68161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
68261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
68361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
68461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or constraints.
68561847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
68661847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
68761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
68861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
68961847f8eSopenharmony_ci     * @since 7
69061847f8eSopenharmony_ci     */
69161847f8eSopenharmony_ci    setOsAccountConstraints(localId: number, constraints: Array<string>, enable: boolean): Promise<void>;
69261847f8eSopenharmony_ci
69361847f8eSopenharmony_ci    /**
69461847f8eSopenharmony_ci     * Sets the local name for an OS account based on its local ID.
69561847f8eSopenharmony_ci     *
69661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
69761847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
69861847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name to set for the OS account.
69961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the callback for setting the specified OS account name.
70061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
70161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
70261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
70361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
70461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
70561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or localName.
70661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
70761847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
70861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
70961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
71061847f8eSopenharmony_ci     * @since 7
71161847f8eSopenharmony_ci     */
71261847f8eSopenharmony_ci    setOsAccountName(localId: number, localName: string, callback: AsyncCallback<void>): void;
71361847f8eSopenharmony_ci
71461847f8eSopenharmony_ci    /**
71561847f8eSopenharmony_ci     * Sets the local name for an OS account based on its local ID.
71661847f8eSopenharmony_ci     *
71761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
71861847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
71961847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name to set for the OS account.
72061847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
72161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
72261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
72361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
72461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
72561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
72661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or localName.
72761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
72861847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
72961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
73061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
73161847f8eSopenharmony_ci     * @since 7
73261847f8eSopenharmony_ci     */
73361847f8eSopenharmony_ci    setOsAccountName(localId: number, localName: string): Promise<void>;
73461847f8eSopenharmony_ci
73561847f8eSopenharmony_ci    /**
73661847f8eSopenharmony_ci     * Gets the name of the OS account to which the caller belongs.
73761847f8eSopenharmony_ci     *
73861847f8eSopenharmony_ci     * @returns { Promise<string> } The promise returned by the function.
73961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
74061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
74161847f8eSopenharmony_ci     * @since 12
74261847f8eSopenharmony_ci     */
74361847f8eSopenharmony_ci    getOsAccountName(): Promise<string>;
74461847f8eSopenharmony_ci
74561847f8eSopenharmony_ci    /**
74661847f8eSopenharmony_ci     * Obtains the number of all OS accounts created on a device.
74761847f8eSopenharmony_ci     *
74861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
74961847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the number of created OS accounts.
75061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
75161847f8eSopenharmony_ci     * @since 7
75261847f8eSopenharmony_ci     * @deprecated since 9
75361847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountCount
75461847f8eSopenharmony_ci     */
75561847f8eSopenharmony_ci    getCreatedOsAccountsCount(callback: AsyncCallback<number>): void;
75661847f8eSopenharmony_ci
75761847f8eSopenharmony_ci    /**
75861847f8eSopenharmony_ci     * Obtains the number of all OS accounts created on a device.
75961847f8eSopenharmony_ci     *
76061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
76161847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the number of created OS accounts.
76261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
76361847f8eSopenharmony_ci     * @since 7
76461847f8eSopenharmony_ci     * @deprecated since 9
76561847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountCount
76661847f8eSopenharmony_ci     */
76761847f8eSopenharmony_ci    getCreatedOsAccountsCount(): Promise<number>;
76861847f8eSopenharmony_ci
76961847f8eSopenharmony_ci    /**
77061847f8eSopenharmony_ci     * Obtains the number of all OS accounts created on a device.
77161847f8eSopenharmony_ci     *
77261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
77361847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the number of created OS accounts.
77461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
77561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
77661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
77761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
77861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
77961847f8eSopenharmony_ci     * This API can be called only by system applications.
78061847f8eSopenharmony_ci     * @since 9
78161847f8eSopenharmony_ci     */
78261847f8eSopenharmony_ci    getOsAccountCount(callback: AsyncCallback<number>): void;
78361847f8eSopenharmony_ci
78461847f8eSopenharmony_ci    /**
78561847f8eSopenharmony_ci     * Obtains the number of all OS accounts created on a device.
78661847f8eSopenharmony_ci     *
78761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
78861847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the number of created OS accounts.
78961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
79061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
79161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
79261847f8eSopenharmony_ci     * This API can be called only by system applications.
79361847f8eSopenharmony_ci     * @since 9
79461847f8eSopenharmony_ci     */
79561847f8eSopenharmony_ci    getOsAccountCount(): Promise<number>;
79661847f8eSopenharmony_ci
79761847f8eSopenharmony_ci    /**
79861847f8eSopenharmony_ci     * Obtains the local ID of an OS account from the current process UID.
79961847f8eSopenharmony_ci     *
80061847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the local ID of the OS account.
80161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
80261847f8eSopenharmony_ci     * @since 7
80361847f8eSopenharmony_ci     * @deprecated since 9
80461847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalId
80561847f8eSopenharmony_ci     */
80661847f8eSopenharmony_ci    getOsAccountLocalIdFromProcess(callback: AsyncCallback<number>): void;
80761847f8eSopenharmony_ci
80861847f8eSopenharmony_ci    /**
80961847f8eSopenharmony_ci     * Obtains the local ID of an OS account from the current process UID.
81061847f8eSopenharmony_ci     *
81161847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the OS account.
81261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
81361847f8eSopenharmony_ci     * @since 7
81461847f8eSopenharmony_ci     * @deprecated since 9
81561847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalId
81661847f8eSopenharmony_ci     */
81761847f8eSopenharmony_ci    getOsAccountLocalIdFromProcess(): Promise<number>;
81861847f8eSopenharmony_ci
81961847f8eSopenharmony_ci    /**
82061847f8eSopenharmony_ci     * Gets the local ID of the current OS account.
82161847f8eSopenharmony_ci     *
82261847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for getting the local ID of the current OS account.
82361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
82461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
82561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
82661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
82761847f8eSopenharmony_ci     * @since 9
82861847f8eSopenharmony_ci     */
82961847f8eSopenharmony_ci    getOsAccountLocalId(callback: AsyncCallback<number>): void;
83061847f8eSopenharmony_ci
83161847f8eSopenharmony_ci    /**
83261847f8eSopenharmony_ci     * Get the local ID of the current OS account.
83361847f8eSopenharmony_ci     *
83461847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the current account.
83561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
83661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
83761847f8eSopenharmony_ci     * @since 9
83861847f8eSopenharmony_ci     */
83961847f8eSopenharmony_ci    getOsAccountLocalId(): Promise<number>;
84061847f8eSopenharmony_ci
84161847f8eSopenharmony_ci    /**
84261847f8eSopenharmony_ci     * Gets the local ID of an OS account from the process UID
84361847f8eSopenharmony_ci     *
84461847f8eSopenharmony_ci     * @param { number } uid - Indicates the process UID.
84561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the local ID of the OS account.
84661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
84761847f8eSopenharmony_ci     * @since 7
84861847f8eSopenharmony_ci     * @deprecated since 9
84961847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForUid
85061847f8eSopenharmony_ci     */
85161847f8eSopenharmony_ci    getOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback<number>): void;
85261847f8eSopenharmony_ci
85361847f8eSopenharmony_ci    /**
85461847f8eSopenharmony_ci     * Gets the local ID of an OS account from the process UID
85561847f8eSopenharmony_ci     *
85661847f8eSopenharmony_ci     * @param { number } uid - Indicates the process UID.
85761847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the OS account.
85861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
85961847f8eSopenharmony_ci     * @since 7
86061847f8eSopenharmony_ci     * @deprecated since 9
86161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForUid
86261847f8eSopenharmony_ci     */
86361847f8eSopenharmony_ci    getOsAccountLocalIdFromUid(uid: number): Promise<number>;
86461847f8eSopenharmony_ci
86561847f8eSopenharmony_ci    /**
86661847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the specified UID.
86761847f8eSopenharmony_ci     *
86861847f8eSopenharmony_ci     * @param { number } uid - Indicates the process UID.
86961847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for getting the local ID of the OS account associated with the specified UID.
87061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
87161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
87261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
87361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
87461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
87561847f8eSopenharmony_ci     * @since 9
87661847f8eSopenharmony_ci     */
87761847f8eSopenharmony_ci    getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback<number>): void;
87861847f8eSopenharmony_ci
87961847f8eSopenharmony_ci    /**
88061847f8eSopenharmony_ci     * Get the local ID of the OS account associated with the specified UID.
88161847f8eSopenharmony_ci     *
88261847f8eSopenharmony_ci     * @param { number } uid - Indicates the process UID.
88361847f8eSopenharmony_ci     * @returns { Promise<number> } - Returns the local ID of the OS account associated with the specified UID.
88461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
88561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
88661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
88761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
88861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
88961847f8eSopenharmony_ci     * @since 9
89061847f8eSopenharmony_ci     */
89161847f8eSopenharmony_ci    getOsAccountLocalIdForUid(uid: number): Promise<number>;
89261847f8eSopenharmony_ci
89361847f8eSopenharmony_ci    /**
89461847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the specified UID synchronously.
89561847f8eSopenharmony_ci     *
89661847f8eSopenharmony_ci     * @param { number } uid - Indicates the process UID.
89761847f8eSopenharmony_ci     * @returns { number } Returns the local ID of the OS account associated with the specified UID.
89861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
89961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
90061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
90161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
90261847f8eSopenharmony_ci     * @since 10
90361847f8eSopenharmony_ci     */
90461847f8eSopenharmony_ci    getOsAccountLocalIdForUidSync(uid: number): number;
90561847f8eSopenharmony_ci
90661847f8eSopenharmony_ci    /**
90761847f8eSopenharmony_ci     * Queries the local ID of an OS account which is bound to the specified domain account.
90861847f8eSopenharmony_ci     *
90961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
91061847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
91161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the local ID of the OS account.
91261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
91361847f8eSopenharmony_ci     * @since 8
91461847f8eSopenharmony_ci     * @deprecated since 9
91561847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForDomain
91661847f8eSopenharmony_ci     */
91761847f8eSopenharmony_ci    getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
91861847f8eSopenharmony_ci
91961847f8eSopenharmony_ci    /**
92061847f8eSopenharmony_ci     * Queries the local ID of an OS account which is bound to the specified domain account.
92161847f8eSopenharmony_ci     *
92261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
92361847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
92461847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the OS account.
92561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
92661847f8eSopenharmony_ci     * @since 8
92761847f8eSopenharmony_ci     * @deprecated since 9
92861847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForDomain
92961847f8eSopenharmony_ci     */
93061847f8eSopenharmony_ci    getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise<number>;
93161847f8eSopenharmony_ci
93261847f8eSopenharmony_ci    /**
93361847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the specified domain account.
93461847f8eSopenharmony_ci     *
93561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
93661847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
93761847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for
93861847f8eSopenharmony_ci     *   getting the local ID of the OS account associated with the specified domain account.
93961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
94061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
94161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
94261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
94361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid domainInfo.
94461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
94561847f8eSopenharmony_ci     * This API can be called only by system applications.
94661847f8eSopenharmony_ci     * @since 9
94761847f8eSopenharmony_ci     */
94861847f8eSopenharmony_ci    getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
94961847f8eSopenharmony_ci
95061847f8eSopenharmony_ci    /**
95161847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the specified domain account.
95261847f8eSopenharmony_ci     *
95361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
95461847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
95561847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the OS account associated with the specified domain account.
95661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
95761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
95861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
95961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
96061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid domainInfo.
96161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
96261847f8eSopenharmony_ci     * This API can be called only by system applications.
96361847f8eSopenharmony_ci     * @since 9
96461847f8eSopenharmony_ci     */
96561847f8eSopenharmony_ci    getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise<number>;
96661847f8eSopenharmony_ci
96761847f8eSopenharmony_ci    /**
96861847f8eSopenharmony_ci     * Queries the maximum number of OS accounts that can be created on a device.
96961847f8eSopenharmony_ci     *
97061847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the maximum number of OS accounts that can be created.
97161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
97261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
97361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
97461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
97561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
97661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
97761847f8eSopenharmony_ci     * @since 7
97861847f8eSopenharmony_ci     */
97961847f8eSopenharmony_ci    queryMaxOsAccountNumber(callback: AsyncCallback<number>): void;
98061847f8eSopenharmony_ci
98161847f8eSopenharmony_ci    /**
98261847f8eSopenharmony_ci     * Queries the maximum number of OS accounts that can be created on a device.
98361847f8eSopenharmony_ci     *
98461847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the maximum number of OS accounts that can be created.
98561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
98661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
98761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
98861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
98961847f8eSopenharmony_ci     * @since 7
99061847f8eSopenharmony_ci     */
99161847f8eSopenharmony_ci    queryMaxOsAccountNumber(): Promise<number>;
99261847f8eSopenharmony_ci
99361847f8eSopenharmony_ci    /**
99461847f8eSopenharmony_ci     * Queries the maximum number of OS accounts that can be logged in.
99561847f8eSopenharmony_ci     *
99661847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the maximum number of OS accounts that can be logged in.
99761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
99861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
99961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
100061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
100161847f8eSopenharmony_ci     * @since 12
100261847f8eSopenharmony_ci     */
100361847f8eSopenharmony_ci    queryMaxLoggedInOsAccountNumber(): Promise<number>;
100461847f8eSopenharmony_ci
100561847f8eSopenharmony_ci    /**
100661847f8eSopenharmony_ci     * Obtains all constraints of an OS account based on its local ID.
100761847f8eSopenharmony_ci     *
100861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
100961847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
101061847f8eSopenharmony_ci     * @param { AsyncCallback<Array<string>> } callback - Returns a list of constraints.
101161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
101261847f8eSopenharmony_ci     * @since 7
101361847f8eSopenharmony_ci     * @deprecated since 9
101461847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountConstraints
101561847f8eSopenharmony_ci     */
101661847f8eSopenharmony_ci    getOsAccountAllConstraints(localId: number, callback: AsyncCallback<Array<string>>): void;
101761847f8eSopenharmony_ci
101861847f8eSopenharmony_ci    /**
101961847f8eSopenharmony_ci     * Obtains all constraints of an OS account based on its local ID.
102061847f8eSopenharmony_ci     *
102161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
102261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
102361847f8eSopenharmony_ci     * @returns { Promise<Array<string>> } Returns a list of constraints.
102461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
102561847f8eSopenharmony_ci     * @since 7
102661847f8eSopenharmony_ci     * @deprecated since 9
102761847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountConstraints
102861847f8eSopenharmony_ci     */
102961847f8eSopenharmony_ci    getOsAccountAllConstraints(localId: number): Promise<Array<string>>;
103061847f8eSopenharmony_ci
103161847f8eSopenharmony_ci    /**
103261847f8eSopenharmony_ci     * Obtains all constraints of an account based on its ID.
103361847f8eSopenharmony_ci     *
103461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
103561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
103661847f8eSopenharmony_ci     * @param { AsyncCallback<Array<string>> } callback - Returns a list of constraints.
103761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
103861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
103961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
104061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
104161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
104261847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
104361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
104461847f8eSopenharmony_ci     * @since 9
104561847f8eSopenharmony_ci     * @deprecated since 11
104661847f8eSopenharmony_ci     */
104761847f8eSopenharmony_ci    getOsAccountConstraints(localId: number, callback: AsyncCallback<Array<string>>): void;
104861847f8eSopenharmony_ci
104961847f8eSopenharmony_ci    /**
105061847f8eSopenharmony_ci     * Obtains all constraints of an account based on its ID.
105161847f8eSopenharmony_ci     *
105261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
105361847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
105461847f8eSopenharmony_ci     * @returns { Promise<Array<string>> } Returns a list of constraints.
105561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
105661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
105761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
105861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
105961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
106061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
106161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
106261847f8eSopenharmony_ci     * @since 9
106361847f8eSopenharmony_ci     * @deprecated since 11
106461847f8eSopenharmony_ci     */
106561847f8eSopenharmony_ci    getOsAccountConstraints(localId: number): Promise<Array<string>>;
106661847f8eSopenharmony_ci
106761847f8eSopenharmony_ci    /**
106861847f8eSopenharmony_ci     * Gets all enabled constraints of the specified OS account by its local ID.
106961847f8eSopenharmony_ci     *
107061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
107161847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
107261847f8eSopenharmony_ci     * @returns { Promise<Array<string>> } Returns a list of constraints.
107361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
107461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
107561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
107661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
107761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
107861847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
107961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
108061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
108161847f8eSopenharmony_ci     * @since 11
108261847f8eSopenharmony_ci     */
108361847f8eSopenharmony_ci    getEnabledOsAccountConstraints(localId: number): Promise<Array<string>>;
108461847f8eSopenharmony_ci
108561847f8eSopenharmony_ci    /**
108661847f8eSopenharmony_ci     * Queries the list of all the OS accounts that have been created in the system.
108761847f8eSopenharmony_ci     *
108861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
108961847f8eSopenharmony_ci     * @param { AsyncCallback<Array<OsAccountInfo>> } callback - Returns a list of OS accounts.
109061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
109161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
109261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
109361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
109461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
109561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
109661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
109761847f8eSopenharmony_ci     * @since 7
109861847f8eSopenharmony_ci     */
109961847f8eSopenharmony_ci    queryAllCreatedOsAccounts(callback: AsyncCallback<Array<OsAccountInfo>>): void;
110061847f8eSopenharmony_ci
110161847f8eSopenharmony_ci    /**
110261847f8eSopenharmony_ci     * Queries the list of all the OS accounts that have been created in the system.
110361847f8eSopenharmony_ci     *
110461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
110561847f8eSopenharmony_ci     * @returns { Promise<Array<OsAccountInfo>> } Returns a list of OS accounts.
110661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
110761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
110861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
110961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
111061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
111161847f8eSopenharmony_ci     * @since 7
111261847f8eSopenharmony_ci     */
111361847f8eSopenharmony_ci    queryAllCreatedOsAccounts(): Promise<Array<OsAccountInfo>>;
111461847f8eSopenharmony_ci
111561847f8eSopenharmony_ci    /**
111661847f8eSopenharmony_ci     * Queries the id list of all activated OS accounts.
111761847f8eSopenharmony_ci     *
111861847f8eSopenharmony_ci     * @param { AsyncCallback<Array<number>> } callback - Returns a id list of OS accounts.
111961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
112061847f8eSopenharmony_ci     * @since 8
112161847f8eSopenharmony_ci     * @deprecated since 9
112261847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getActivatedOsAccountLocalIds
112361847f8eSopenharmony_ci     */
112461847f8eSopenharmony_ci    queryActivatedOsAccountIds(callback: AsyncCallback<Array<number>>): void;
112561847f8eSopenharmony_ci
112661847f8eSopenharmony_ci    /**
112761847f8eSopenharmony_ci     * Queries the id list of all activated OS accounts.
112861847f8eSopenharmony_ci     *
112961847f8eSopenharmony_ci     * @returns { Promise<Array<number>> } Returns a id list of OS accounts.
113061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
113161847f8eSopenharmony_ci     * @since 8
113261847f8eSopenharmony_ci     * @deprecated since 9
113361847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getActivatedOsAccountLocalIds
113461847f8eSopenharmony_ci     */
113561847f8eSopenharmony_ci    queryActivatedOsAccountIds(): Promise<Array<number>>;
113661847f8eSopenharmony_ci
113761847f8eSopenharmony_ci    /**
113861847f8eSopenharmony_ci     * Gets the local IDs of all activated OS accounts.
113961847f8eSopenharmony_ci     *
114061847f8eSopenharmony_ci     * @param { AsyncCallback<Array<number>> } callback - Indicates the callback for getting the local IDs of all activated OS accounts.
114161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
114261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
114361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
114461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
114561847f8eSopenharmony_ci     * @since 9
114661847f8eSopenharmony_ci     */
114761847f8eSopenharmony_ci    getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<number>>): void;
114861847f8eSopenharmony_ci
114961847f8eSopenharmony_ci    /**
115061847f8eSopenharmony_ci     * Gets the local IDs of all activated OS accounts.
115161847f8eSopenharmony_ci     *
115261847f8eSopenharmony_ci     * @returns { Promise<Array<number>> } Returns all activated accounts.
115361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
115461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
115561847f8eSopenharmony_ci     * @since 9
115661847f8eSopenharmony_ci     */
115761847f8eSopenharmony_ci    getActivatedOsAccountLocalIds(): Promise<Array<number>>;
115861847f8eSopenharmony_ci
115961847f8eSopenharmony_ci    /**
116061847f8eSopenharmony_ci     * Gets the local ID of the foreground OS account.
116161847f8eSopenharmony_ci     *
116261847f8eSopenharmony_ci     * @returns { Promise<number> } Returns local ID of the foreground OS account.
116361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
116461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
116561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
116661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
116761847f8eSopenharmony_ci     * @since 12
116861847f8eSopenharmony_ci     */
116961847f8eSopenharmony_ci    getForegroundOsAccountLocalId(): Promise<number>;
117061847f8eSopenharmony_ci
117161847f8eSopenharmony_ci    /**
117261847f8eSopenharmony_ci     * Creates an OS account using the local name and account type.
117361847f8eSopenharmony_ci     *
117461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
117561847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name of the OS account to create.
117661847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
117761847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
117861847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the created OS account; returns {@code null} if the creation fails.
117961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
118061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
118161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
118261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
118361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
118461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localName or type.
118561847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
118661847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
118761847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
118861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
118961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
119061847f8eSopenharmony_ci     * @since 7
119161847f8eSopenharmony_ci     */
119261847f8eSopenharmony_ci    /**
119361847f8eSopenharmony_ci     * Creates an OS account with the specified local name and type.
119461847f8eSopenharmony_ci     *
119561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
119661847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name of the OS account to create.
119761847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
119861847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
119961847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the created OS account; returns {@code null} if the creation fails.
120061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
120161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
120261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
120361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
120461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
120561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localName or type.
120661847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Local name already exists.
120761847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
120861847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
120961847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
121061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
121161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
121261847f8eSopenharmony_ci     * @since 12
121361847f8eSopenharmony_ci     */
121461847f8eSopenharmony_ci    createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback<OsAccountInfo>): void;
121561847f8eSopenharmony_ci
121661847f8eSopenharmony_ci    /**
121761847f8eSopenharmony_ci     * Creates an OS account using the local name and account type.
121861847f8eSopenharmony_ci     *
121961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
122061847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name of the OS account to create.
122161847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
122261847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
122361847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the created OS account; returns {@code null} if the creation fails.
122461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
122561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
122661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
122761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
122861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
122961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localName or type.
123061847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
123161847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
123261847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
123361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
123461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
123561847f8eSopenharmony_ci     * @since 7
123661847f8eSopenharmony_ci     */
123761847f8eSopenharmony_ci    /**
123861847f8eSopenharmony_ci     * Creates an OS account with the specified local name, type and options.
123961847f8eSopenharmony_ci     *
124061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
124161847f8eSopenharmony_ci     * @param { string } localName - Indicates the local name of the OS account to create.
124261847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
124361847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
124461847f8eSopenharmony_ci     * @param { CreateOsAccountOptions } [options] - Indicates the options for creating an OS account.
124561847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the created OS account; returns {@code null} if the creation fails.
124661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
124761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
124861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
124961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
125061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
125161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localName, type or options.
125261847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Local name already exists.
125361847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
125461847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
125561847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
125661847f8eSopenharmony_ci     * @throws { BusinessError } 12300015 - The short name already exists.
125761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
125861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
125961847f8eSopenharmony_ci     * @since 12
126061847f8eSopenharmony_ci     */
126161847f8eSopenharmony_ci    createOsAccount(localName: string, type: OsAccountType, options?: CreateOsAccountOptions): Promise<OsAccountInfo>;
126261847f8eSopenharmony_ci
126361847f8eSopenharmony_ci    /**
126461847f8eSopenharmony_ci     * Creates an OS account using the account type and domain account info.
126561847f8eSopenharmony_ci     *
126661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
126761847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
126861847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
126961847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
127061847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the created OS account; returns {@code null} if the creation fails.
127161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
127261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
127361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
127461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
127561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
127661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or domainInfo.
127761847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
127861847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
127961847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
128061847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
128161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
128261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
128361847f8eSopenharmony_ci     * @since 8
128461847f8eSopenharmony_ci     */
128561847f8eSopenharmony_ci    /**
128661847f8eSopenharmony_ci     * Creates an OS account using the account type and domain account info.
128761847f8eSopenharmony_ci     *
128861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
128961847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
129061847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
129161847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
129261847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the created OS account; returns {@code null} if the creation fails.
129361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
129461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
129561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
129661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
129761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
129861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
129961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or domainInfo.
130061847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
130161847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
130261847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
130361847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
130461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
130561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
130661847f8eSopenharmony_ci     * @since 12
130761847f8eSopenharmony_ci     */
130861847f8eSopenharmony_ci    createOsAccountForDomain(
130961847f8eSopenharmony_ci      type: OsAccountType,
131061847f8eSopenharmony_ci      domainInfo: DomainAccountInfo,
131161847f8eSopenharmony_ci      callback: AsyncCallback<OsAccountInfo>
131261847f8eSopenharmony_ci    ): void;
131361847f8eSopenharmony_ci
131461847f8eSopenharmony_ci    /**
131561847f8eSopenharmony_ci     * Creates an OS account using the account type and domain account info.
131661847f8eSopenharmony_ci     *
131761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
131861847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
131961847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
132061847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
132161847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the created OS account; returns {@code null} if the creation fails.
132261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
132361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
132461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
132561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
132661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
132761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or domainInfo.
132861847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
132961847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
133061847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
133161847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
133261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
133361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
133461847f8eSopenharmony_ci     * @since 8
133561847f8eSopenharmony_ci     */
133661847f8eSopenharmony_ci    /**
133761847f8eSopenharmony_ci     * Creates an OS account using the account type, domain account info and options.
133861847f8eSopenharmony_ci     *
133961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
134061847f8eSopenharmony_ci     * @param { OsAccountType } type - Indicates the type of the OS account to create.
134161847f8eSopenharmony_ci     *        {@link OsAccountType} specifies the account types available in the system.
134261847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainInfo - Indicates the domain account info.
134361847f8eSopenharmony_ci     * @param { CreateOsAccountForDomainOptions } [options] - Indicates the options to create an OS account for domain.
134461847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the created OS account; returns {@code null} if the creation fails.
134561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
134661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
134761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
134861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
134961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
135061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
135161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type, domainInfo or options.
135261847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
135361847f8eSopenharmony_ci     * @throws { BusinessError } 12300005 - Multi-user not supported.
135461847f8eSopenharmony_ci     * @throws { BusinessError } 12300006 - Unsupported account type.
135561847f8eSopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit.
135661847f8eSopenharmony_ci     * @throws { BusinessError } 12300015 - The short name already exists.
135761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
135861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
135961847f8eSopenharmony_ci     * @since 12
136061847f8eSopenharmony_ci     */
136161847f8eSopenharmony_ci    createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, options?: CreateOsAccountForDomainOptions): Promise<OsAccountInfo>;
136261847f8eSopenharmony_ci
136361847f8eSopenharmony_ci    /**
136461847f8eSopenharmony_ci     * Queries information about the current OS account.
136561847f8eSopenharmony_ci     *
136661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
136761847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the current OS account; returns {@code null} if the query fails.
136861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
136961847f8eSopenharmony_ci     * @since 7
137061847f8eSopenharmony_ci     * @deprecated since 9
137161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getCurrentOsAccount
137261847f8eSopenharmony_ci     */
137361847f8eSopenharmony_ci    queryCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>): void;
137461847f8eSopenharmony_ci
137561847f8eSopenharmony_ci    /**
137661847f8eSopenharmony_ci     * Queries information about the current OS account.
137761847f8eSopenharmony_ci     *
137861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
137961847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the current OS account; returns {@code null} if the query fails.
138061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
138161847f8eSopenharmony_ci     * @since 7
138261847f8eSopenharmony_ci     * @deprecated since 9
138361847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getCurrentOsAccount
138461847f8eSopenharmony_ci     */
138561847f8eSopenharmony_ci    queryCurrentOsAccount(): Promise<OsAccountInfo>;
138661847f8eSopenharmony_ci
138761847f8eSopenharmony_ci    /**
138861847f8eSopenharmony_ci     * Gets information about the current OS account.
138961847f8eSopenharmony_ci     *
139061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
139161847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the current OS account; returns {@code null} if the query fails.
139261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
139361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
139461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
139561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
139661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
139761847f8eSopenharmony_ci     * @since 9
139861847f8eSopenharmony_ci     * @deprecated since 11
139961847f8eSopenharmony_ci     */
140061847f8eSopenharmony_ci    /**
140161847f8eSopenharmony_ci     * Gets information about the current OS account.
140261847f8eSopenharmony_ci     *
140361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.GET_LOCAL_ACCOUNTS
140461847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns information about the current OS account; returns {@code null} if the query fails.
140561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
140661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
140761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
140861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
140961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
141061847f8eSopenharmony_ci     * @since 10
141161847f8eSopenharmony_ci     * @deprecated since 11
141261847f8eSopenharmony_ci     */
141361847f8eSopenharmony_ci    getCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>): void;
141461847f8eSopenharmony_ci
141561847f8eSopenharmony_ci    /**
141661847f8eSopenharmony_ci     * Gets information about the current OS account.
141761847f8eSopenharmony_ci     *
141861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
141961847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the current OS account; returns {@code null} if the query fails.
142061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
142161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
142261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
142361847f8eSopenharmony_ci     * @since 9
142461847f8eSopenharmony_ci     * @deprecated since 11
142561847f8eSopenharmony_ci     */
142661847f8eSopenharmony_ci    /**
142761847f8eSopenharmony_ci     * Gets information about the current OS account.
142861847f8eSopenharmony_ci     *
142961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.GET_LOCAL_ACCOUNTS
143061847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the current OS account; returns {@code null} if the query fails.
143161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
143261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
143361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
143461847f8eSopenharmony_ci     * @since 10
143561847f8eSopenharmony_ci     * @deprecated since 11
143661847f8eSopenharmony_ci     */
143761847f8eSopenharmony_ci    getCurrentOsAccount(): Promise<OsAccountInfo>;
143861847f8eSopenharmony_ci
143961847f8eSopenharmony_ci    /**
144061847f8eSopenharmony_ci     * Queries the current OS account information.
144161847f8eSopenharmony_ci     *
144261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.GET_LOCAL_ACCOUNTS
144361847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns information about the current OS account
144461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
144561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
144661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
144761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
144861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
144961847f8eSopenharmony_ci     * @since 11
145061847f8eSopenharmony_ci     */
145161847f8eSopenharmony_ci    queryOsAccount(): Promise<OsAccountInfo>;
145261847f8eSopenharmony_ci
145361847f8eSopenharmony_ci    /**
145461847f8eSopenharmony_ci     * Queries OS account information based on the local ID.
145561847f8eSopenharmony_ci     *
145661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
145761847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
145861847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountInfo> } callback - Returns the OS account information; returns {@code null} if the query fails.
145961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
146061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
146161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
146261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
146361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
146461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
146561847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
146661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
146761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
146861847f8eSopenharmony_ci     * @since 7
146961847f8eSopenharmony_ci     */
147061847f8eSopenharmony_ci    queryOsAccountById(localId: number, callback: AsyncCallback<OsAccountInfo>): void;
147161847f8eSopenharmony_ci
147261847f8eSopenharmony_ci    /**
147361847f8eSopenharmony_ci     * Queries OS account information based on the local ID.
147461847f8eSopenharmony_ci     *
147561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
147661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
147761847f8eSopenharmony_ci     * @returns { Promise<OsAccountInfo> } Returns the OS account information; returns {@code null} if the query fails.
147861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
147961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
148061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
148161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
148261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
148361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
148461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
148561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
148661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
148761847f8eSopenharmony_ci     * @since 7
148861847f8eSopenharmony_ci     */
148961847f8eSopenharmony_ci    queryOsAccountById(localId: number): Promise<OsAccountInfo>;
149061847f8eSopenharmony_ci
149161847f8eSopenharmony_ci    /**
149261847f8eSopenharmony_ci     * Obtains the type of this OS account from the current process.
149361847f8eSopenharmony_ci     *
149461847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountType> } callback - Returns the OS account type. The value can be {@link OsAccountType#ADMIN},
149561847f8eSopenharmony_ci     *         {@link OsAccountType#NORMAL}, and {@link OsAccountType#GUEST}.
149661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
149761847f8eSopenharmony_ci     * @since 7
149861847f8eSopenharmony_ci     * @deprecated since 9
149961847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountType
150061847f8eSopenharmony_ci     */
150161847f8eSopenharmony_ci    getOsAccountTypeFromProcess(callback: AsyncCallback<OsAccountType>): void;
150261847f8eSopenharmony_ci
150361847f8eSopenharmony_ci    /**
150461847f8eSopenharmony_ci     * Obtains the type of this OS account from the current process.
150561847f8eSopenharmony_ci     *
150661847f8eSopenharmony_ci     * @returns { Promise<OsAccountType> } Returns the OS account type. The value can be {@link OsAccountType#ADMIN},
150761847f8eSopenharmony_ci     *         {@link OsAccountType#NORMAL}, and {@link OsAccountType#GUEST}.
150861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
150961847f8eSopenharmony_ci     * @since 7
151061847f8eSopenharmony_ci     * @deprecated since 9
151161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountType
151261847f8eSopenharmony_ci     */
151361847f8eSopenharmony_ci    getOsAccountTypeFromProcess(): Promise<OsAccountType>;
151461847f8eSopenharmony_ci
151561847f8eSopenharmony_ci    /**
151661847f8eSopenharmony_ci     * Obtains the type of this OS account from the current process.
151761847f8eSopenharmony_ci     *
151861847f8eSopenharmony_ci     * @param { AsyncCallback<OsAccountType> } callback - Returns the OS account type. The value can be {@link OsAccountType#ADMIN},
151961847f8eSopenharmony_ci     *         {@link OsAccountType#NORMAL}, and {@link OsAccountType#GUEST}.
152061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
152161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
152261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
152361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
152461847f8eSopenharmony_ci     * @since 9
152561847f8eSopenharmony_ci     */
152661847f8eSopenharmony_ci    getOsAccountType(callback: AsyncCallback<OsAccountType>): void;
152761847f8eSopenharmony_ci
152861847f8eSopenharmony_ci    /**
152961847f8eSopenharmony_ci     * Obtains the type of this OS account from the current process.
153061847f8eSopenharmony_ci     *
153161847f8eSopenharmony_ci     * @returns { Promise<OsAccountType> } Returns the OS account type. The value can be {@link OsAccountType#ADMIN},
153261847f8eSopenharmony_ci     *         {@link OsAccountType#NORMAL}, and {@link OsAccountType#GUEST}.
153361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
153461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
153561847f8eSopenharmony_ci     * @since 9
153661847f8eSopenharmony_ci     */
153761847f8eSopenharmony_ci    getOsAccountType(): Promise<OsAccountType>;
153861847f8eSopenharmony_ci
153961847f8eSopenharmony_ci    /**
154061847f8eSopenharmony_ci     * Gets the type of the specified OS account.
154161847f8eSopenharmony_ci     *
154261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
154361847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
154461847f8eSopenharmony_ci     * @returns { Promise<OsAccountType> } Returns the OS account type.
154561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
154661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
154761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
154861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
154961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
155061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
155161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
155261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
155361847f8eSopenharmony_ci     * @since 12
155461847f8eSopenharmony_ci     */
155561847f8eSopenharmony_ci    getOsAccountType(localId: number): Promise<OsAccountType>;
155661847f8eSopenharmony_ci
155761847f8eSopenharmony_ci    /**
155861847f8eSopenharmony_ci     * Obtains the distributed virtual device ID (DVID).
155961847f8eSopenharmony_ci     * <p>
156061847f8eSopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
156161847f8eSopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs.
156261847f8eSopenharmony_ci     * The same application running on different devices obtains the same DVID, whereas different applications
156361847f8eSopenharmony_ci     * obtain different DVIDs.
156461847f8eSopenharmony_ci     * <p>
156561847f8eSopenharmony_ci     *
156661847f8eSopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
156761847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Returns the DVID if obtained; returns an empty string if no OHOS account has logged in.
156861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
156961847f8eSopenharmony_ci     * @since 7
157061847f8eSopenharmony_ci     * @deprecated since 9
157161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#queryDistributedVirtualDeviceId
157261847f8eSopenharmony_ci     */
157361847f8eSopenharmony_ci    getDistributedVirtualDeviceId(callback: AsyncCallback<string>): void;
157461847f8eSopenharmony_ci
157561847f8eSopenharmony_ci    /**
157661847f8eSopenharmony_ci     * Obtains the distributed virtual device ID (DVID).
157761847f8eSopenharmony_ci     * <p>
157861847f8eSopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
157961847f8eSopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs.
158061847f8eSopenharmony_ci     * The same application running on different devices obtains the same DVID, whereas different applications
158161847f8eSopenharmony_ci     * obtain different DVIDs.
158261847f8eSopenharmony_ci     * <p>
158361847f8eSopenharmony_ci     *
158461847f8eSopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
158561847f8eSopenharmony_ci     * @returns { Promise<string> } Returns the DVID if obtained; returns an empty string if no OHOS account has logged in.
158661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
158761847f8eSopenharmony_ci     * @since 7
158861847f8eSopenharmony_ci     * @deprecated since 9
158961847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#queryDistributedVirtualDeviceId
159061847f8eSopenharmony_ci     */
159161847f8eSopenharmony_ci    getDistributedVirtualDeviceId(): Promise<string>;
159261847f8eSopenharmony_ci
159361847f8eSopenharmony_ci    /**
159461847f8eSopenharmony_ci     * Queries the distributed virtual device ID (DVID).
159561847f8eSopenharmony_ci     * <p>
159661847f8eSopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
159761847f8eSopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs.
159861847f8eSopenharmony_ci     * The same application running on different devices obtains the same DVID, whereas different applications
159961847f8eSopenharmony_ci     * obtain different DVIDs.
160061847f8eSopenharmony_ci     * <p>
160161847f8eSopenharmony_ci     *
160261847f8eSopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
160361847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Returns the DVID if obtained; returns an empty string if no OHOS account has logged in.
160461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
160561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
160661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
160761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
160861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
160961847f8eSopenharmony_ci     * @since 9
161061847f8eSopenharmony_ci     */
161161847f8eSopenharmony_ci    queryDistributedVirtualDeviceId(callback: AsyncCallback<string>): void;
161261847f8eSopenharmony_ci
161361847f8eSopenharmony_ci    /**
161461847f8eSopenharmony_ci     * Queries the distributed virtual device ID (DVID).
161561847f8eSopenharmony_ci     * <p>
161661847f8eSopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
161761847f8eSopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs.
161861847f8eSopenharmony_ci     * The same application running on different devices obtains the same DVID, whereas different applications
161961847f8eSopenharmony_ci     * obtain different DVIDs.
162061847f8eSopenharmony_ci     * <p>
162161847f8eSopenharmony_ci     *
162261847f8eSopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
162361847f8eSopenharmony_ci     * @returns { Promise<string> } Returns the DVID if obtained; returns an empty string if no OHOS account has logged in.
162461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
162561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
162661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
162761847f8eSopenharmony_ci     * @since 9
162861847f8eSopenharmony_ci     */
162961847f8eSopenharmony_ci    queryDistributedVirtualDeviceId(): Promise<string>;
163061847f8eSopenharmony_ci
163161847f8eSopenharmony_ci    /**
163261847f8eSopenharmony_ci     * Obtains the profile photo of an OS account based on its local ID.
163361847f8eSopenharmony_ci     *
163461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
163561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
163661847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Returns the profile photo if obtained;
163761847f8eSopenharmony_ci     *         returns {@code null} if the profile photo fails to be obtained.
163861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
163961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
164061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
164161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
164261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
164361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
164461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
164561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
164661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
164761847f8eSopenharmony_ci     * @since 7
164861847f8eSopenharmony_ci     */
164961847f8eSopenharmony_ci    getOsAccountProfilePhoto(localId: number, callback: AsyncCallback<string>): void;
165061847f8eSopenharmony_ci
165161847f8eSopenharmony_ci    /**
165261847f8eSopenharmony_ci     * Obtains the profile photo of an OS account based on its local ID.
165361847f8eSopenharmony_ci     *
165461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
165561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
165661847f8eSopenharmony_ci     * @returns { Promise<string> } Returns the profile photo if obtained;
165761847f8eSopenharmony_ci     *         returns {@code null} if the profile photo fails to be obtained.
165861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
165961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
166061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
166161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
166261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
166361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
166461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
166561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
166661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
166761847f8eSopenharmony_ci     * @since 7
166861847f8eSopenharmony_ci     */
166961847f8eSopenharmony_ci    getOsAccountProfilePhoto(localId: number): Promise<string>;
167061847f8eSopenharmony_ci
167161847f8eSopenharmony_ci    /**
167261847f8eSopenharmony_ci     * Sets the profile photo for an OS account based on its local ID.
167361847f8eSopenharmony_ci     *
167461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
167561847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
167661847f8eSopenharmony_ci     * @param { string } photo - Indicates the profile photo to set for the OS account.
167761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
167861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
167961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
168061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
168161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
168261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
168361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or photo.
168461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
168561847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
168661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
168761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
168861847f8eSopenharmony_ci     * @since 7
168961847f8eSopenharmony_ci     */
169061847f8eSopenharmony_ci    setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback<void>): void;
169161847f8eSopenharmony_ci
169261847f8eSopenharmony_ci    /**
169361847f8eSopenharmony_ci     * Sets the profile photo for an OS account based on its local ID.
169461847f8eSopenharmony_ci     *
169561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
169661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
169761847f8eSopenharmony_ci     * @param { string } photo - Indicates the profile photo to set for the OS account.
169861847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
169961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
170061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
170161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
170261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
170361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
170461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId or photo.
170561847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
170661847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted Account.
170761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
170861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
170961847f8eSopenharmony_ci     * @since 7
171061847f8eSopenharmony_ci     */
171161847f8eSopenharmony_ci    setOsAccountProfilePhoto(localId: number, photo: string): Promise<void>;
171261847f8eSopenharmony_ci
171361847f8eSopenharmony_ci    /**
171461847f8eSopenharmony_ci     * Obtain localId according to serial number
171561847f8eSopenharmony_ci     *
171661847f8eSopenharmony_ci     * @param { number } serialNumber - Indicates serial number.
171761847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns localId.
171861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
171961847f8eSopenharmony_ci     * @since 8
172061847f8eSopenharmony_ci     * @deprecated since 9
172161847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForSerialNumber
172261847f8eSopenharmony_ci     */
172361847f8eSopenharmony_ci    getOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
172461847f8eSopenharmony_ci
172561847f8eSopenharmony_ci    /**
172661847f8eSopenharmony_ci     * Obtain localId according to serial number
172761847f8eSopenharmony_ci     *
172861847f8eSopenharmony_ci     * @param { number } serialNumber - Indicates serial number.
172961847f8eSopenharmony_ci     * @returns { Promise<number> } Returns localId.
173061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
173161847f8eSopenharmony_ci     * @since 8
173261847f8eSopenharmony_ci     * @deprecated since 9
173361847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getOsAccountLocalIdForSerialNumber
173461847f8eSopenharmony_ci     */
173561847f8eSopenharmony_ci    getOsAccountLocalIdBySerialNumber(serialNumber: number): Promise<number>;
173661847f8eSopenharmony_ci
173761847f8eSopenharmony_ci    /**
173861847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the serial number.
173961847f8eSopenharmony_ci     *
174061847f8eSopenharmony_ci     * @param { number } serialNumber - Indicates serial number.
174161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for getting the local ID of the OS account associated with the serial number.
174261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
174361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
174461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
174561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid serialNumber.
174661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - The account indicated by serialNumber dose not exist.
174761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
174861847f8eSopenharmony_ci     * @since 9
174961847f8eSopenharmony_ci     */
175061847f8eSopenharmony_ci    getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
175161847f8eSopenharmony_ci
175261847f8eSopenharmony_ci    /**
175361847f8eSopenharmony_ci     * Gets the local ID of the OS account associated with the serial number.
175461847f8eSopenharmony_ci     *
175561847f8eSopenharmony_ci     * @param { number } serialNumber - Indicates serial number.
175661847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the local ID of the OS account associated with the serial number.
175761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
175861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
175961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
176061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid serialNumber.
176161847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - The account indicated by serialNumber dose not exist.
176261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
176361847f8eSopenharmony_ci     * @since 9
176461847f8eSopenharmony_ci     */
176561847f8eSopenharmony_ci    getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise<number>;
176661847f8eSopenharmony_ci
176761847f8eSopenharmony_ci    /**
176861847f8eSopenharmony_ci     * Obtain serial number according to localId.
176961847f8eSopenharmony_ci     *
177061847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
177161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns serial number.
177261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
177361847f8eSopenharmony_ci     * @since 8
177461847f8eSopenharmony_ci     * @deprecated since 9
177561847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getSerialNumberForOsAccountLocalId
177661847f8eSopenharmony_ci     */
177761847f8eSopenharmony_ci    getSerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
177861847f8eSopenharmony_ci
177961847f8eSopenharmony_ci    /**
178061847f8eSopenharmony_ci     * Obtain serial number according to localId.
178161847f8eSopenharmony_ci     *
178261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
178361847f8eSopenharmony_ci     * @returns { Promise<number> } Returns serial number.
178461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
178561847f8eSopenharmony_ci     * @since 8
178661847f8eSopenharmony_ci     * @deprecated since 9
178761847f8eSopenharmony_ci     * @useinstead osAccount.AccountManager#getSerialNumberForOsAccountLocalId
178861847f8eSopenharmony_ci     */
178961847f8eSopenharmony_ci    getSerialNumberByOsAccountLocalId(localId: number): Promise<number>;
179061847f8eSopenharmony_ci
179161847f8eSopenharmony_ci    /**
179261847f8eSopenharmony_ci     * Gets the serial number for the specified os account local id.
179361847f8eSopenharmony_ci     *
179461847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
179561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for getting the serial number for the specified os account local id.
179661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
179761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
179861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
179961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
180061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
180161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
180261847f8eSopenharmony_ci     * @since 9
180361847f8eSopenharmony_ci     */
180461847f8eSopenharmony_ci    getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
180561847f8eSopenharmony_ci
180661847f8eSopenharmony_ci    /**
180761847f8eSopenharmony_ci     * Gets the serial number for the specified os account local id.
180861847f8eSopenharmony_ci     *
180961847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
181061847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the serial number according to local ID.
181161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
181261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
181361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
181461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
181561847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
181661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
181761847f8eSopenharmony_ci     * @since 9
181861847f8eSopenharmony_ci     */
181961847f8eSopenharmony_ci    getSerialNumberForOsAccountLocalId(localId: number): Promise<number>;
182061847f8eSopenharmony_ci
182161847f8eSopenharmony_ci    /**
182261847f8eSopenharmony_ci     * Subscribes to the change events of accounts.
182361847f8eSopenharmony_ci     * <p>
182461847f8eSopenharmony_ci     * When user change the account, the subscriber will receive a notification
182561847f8eSopenharmony_ci     * about the account change event.
182661847f8eSopenharmony_ci     *
182761847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
182861847f8eSopenharmony_ci     * @param { 'activate' | 'activating' } type - Event type.
182961847f8eSopenharmony_ci     * @param { string } name - Indicates the name of subscriber.
183061847f8eSopenharmony_ci     * @param { Callback<number> } callback - Asynchronous callback interface.
183161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
183261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
183361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
183461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
183561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
183661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or name.
183761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
183861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
183961847f8eSopenharmony_ci     * @since 7
184061847f8eSopenharmony_ci     */
184161847f8eSopenharmony_ci    on(type: 'activate' | 'activating', name: string, callback: Callback<number>): void;
184261847f8eSopenharmony_ci
184361847f8eSopenharmony_ci    /**
184461847f8eSopenharmony_ci     * Unsubscribes from account events.
184561847f8eSopenharmony_ci     *
184661847f8eSopenharmony_ci     * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
184761847f8eSopenharmony_ci     * @param { 'activate' | 'activating' } type - Event type.
184861847f8eSopenharmony_ci     * @param { string } name - Indicates the name of subscriber.
184961847f8eSopenharmony_ci     * @param { Callback<number> } callback - Asynchronous callback interface.
185061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
185161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
185261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
185361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
185461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
185561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or name.
185661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
185761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
185861847f8eSopenharmony_ci     * @since 7
185961847f8eSopenharmony_ci     */
186061847f8eSopenharmony_ci    off(type: 'activate' | 'activating', name: string, callback?: Callback<number>): void;
186161847f8eSopenharmony_ci
186261847f8eSopenharmony_ci    /**
186361847f8eSopenharmony_ci     * Subscribes to the OS account switching event.
186461847f8eSopenharmony_ci     *
186561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
186661847f8eSopenharmony_ci     * @param { 'switching' } type - Indicates the event type.
186761847f8eSopenharmony_ci     * @param { Callback<OsAccountSwitchEventData> } callback - Indicates the callback for getting the event data.
186861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
186961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
187061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
187161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
187261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
187361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type.
187461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
187561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
187661847f8eSopenharmony_ci     * @since 12
187761847f8eSopenharmony_ci     */
187861847f8eSopenharmony_ci    on(type: 'switching', callback: Callback<OsAccountSwitchEventData>): void;
187961847f8eSopenharmony_ci
188061847f8eSopenharmony_ci    /**
188161847f8eSopenharmony_ci     * Unsubscribes from the OS account switching event.
188261847f8eSopenharmony_ci     *
188361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
188461847f8eSopenharmony_ci     * @param { 'switching' } type - Indicates the event type.
188561847f8eSopenharmony_ci     * @param { Callback<OsAccountSwitchEventData> } [callback] - Indicates the callback for getting the event data.
188661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
188761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
188861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
188961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
189061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
189161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type.
189261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
189361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
189461847f8eSopenharmony_ci     * @since 12
189561847f8eSopenharmony_ci     */
189661847f8eSopenharmony_ci    off(type: 'switching', callback?: Callback<OsAccountSwitchEventData>): void;
189761847f8eSopenharmony_ci
189861847f8eSopenharmony_ci    /**
189961847f8eSopenharmony_ci     * Subscribes to the OS account switched event.
190061847f8eSopenharmony_ci     *
190161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
190261847f8eSopenharmony_ci     * @param { 'switched' } type - Indicates the event type.
190361847f8eSopenharmony_ci     * @param { Callback<OsAccountSwitchEventData> } callback - Indicates the callback for getting the event data.
190461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
190561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
190661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
190761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
190861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
190961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type.
191061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
191161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
191261847f8eSopenharmony_ci     * @since 12
191361847f8eSopenharmony_ci     */
191461847f8eSopenharmony_ci    on(type: 'switched', callback: Callback<OsAccountSwitchEventData>): void;
191561847f8eSopenharmony_ci
191661847f8eSopenharmony_ci    /**
191761847f8eSopenharmony_ci     * Unsubscribes from the OS account switched event.
191861847f8eSopenharmony_ci     *
191961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
192061847f8eSopenharmony_ci     * @param { 'switched' } type - Indicates the event type.
192161847f8eSopenharmony_ci     * @param { Callback<OsAccountSwitchEventData> } [callback] - Indicates the callback for getting the event data.
192261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
192361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
192461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
192561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
192661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
192761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type.
192861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
192961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
193061847f8eSopenharmony_ci     * @since 12
193161847f8eSopenharmony_ci     */
193261847f8eSopenharmony_ci    off(type: 'switched', callback?: Callback<OsAccountSwitchEventData>): void;
193361847f8eSopenharmony_ci
193461847f8eSopenharmony_ci    /**
193561847f8eSopenharmony_ci     * Gets the bundle ID associated with the specified UID.
193661847f8eSopenharmony_ci     *
193761847f8eSopenharmony_ci     * @param { number } uid - Indicates the target uid.
193861847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Indicates the callback for getting the bundle ID associated with the specified UID.
193961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
194061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
194161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
194261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
194361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
194461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
194561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
194661847f8eSopenharmony_ci     * @since 9
194761847f8eSopenharmony_ci     */
194861847f8eSopenharmony_ci    getBundleIdForUid(uid: number, callback: AsyncCallback<number>): void;
194961847f8eSopenharmony_ci
195061847f8eSopenharmony_ci    /**
195161847f8eSopenharmony_ci     * Gets the bundle ID associated with the specified UID.
195261847f8eSopenharmony_ci     *
195361847f8eSopenharmony_ci     * @param { number } uid - Indicates the target uid.
195461847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the bundle ID associated with the specified UID.
195561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
195661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
195761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
195861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
195961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
196061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
196161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
196261847f8eSopenharmony_ci     * @since 9
196361847f8eSopenharmony_ci     */
196461847f8eSopenharmony_ci    getBundleIdForUid(uid: number): Promise<number>;
196561847f8eSopenharmony_ci
196661847f8eSopenharmony_ci    /**
196761847f8eSopenharmony_ci     * Gets the bundle ID associated with the specified UID synchronously.
196861847f8eSopenharmony_ci     *
196961847f8eSopenharmony_ci     * @param { number } uid - Indicates the target uid.
197061847f8eSopenharmony_ci     * @returns { number } Returns the bundle ID associated with the specified UID.
197161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
197261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
197361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
197461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid uid.
197561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
197661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
197761847f8eSopenharmony_ci     * @since 10
197861847f8eSopenharmony_ci     */
197961847f8eSopenharmony_ci    getBundleIdForUidSync(uid: number): number;
198061847f8eSopenharmony_ci
198161847f8eSopenharmony_ci    /**
198261847f8eSopenharmony_ci     * Check whether current process belongs to the main account.
198361847f8eSopenharmony_ci     *
198461847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
198561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if current process belongs to the main os account;
198661847f8eSopenharmony_ci     *         returns {@code false} otherwise.
198761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
198861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
198961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
199061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
199161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
199261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
199361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
199461847f8eSopenharmony_ci     * @since 9
199561847f8eSopenharmony_ci     */
199661847f8eSopenharmony_ci    isMainOsAccount(callback: AsyncCallback<boolean>): void;
199761847f8eSopenharmony_ci
199861847f8eSopenharmony_ci    /**
199961847f8eSopenharmony_ci     * Check whether current process belongs to the main account.
200061847f8eSopenharmony_ci     *
200161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
200261847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if current process belongs to the main os account;
200361847f8eSopenharmony_ci     *         returns {@code false} otherwise.
200461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
200561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
200661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
200761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
200861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
200961847f8eSopenharmony_ci     * @since 9
201061847f8eSopenharmony_ci     */
201161847f8eSopenharmony_ci    isMainOsAccount(): Promise<boolean>;
201261847f8eSopenharmony_ci
201361847f8eSopenharmony_ci    /**
201461847f8eSopenharmony_ci     * Gets a list of constraint source types for the specified os account.
201561847f8eSopenharmony_ci     *
201661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
201761847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
201861847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to query the source type.
201961847f8eSopenharmony_ci     * @param { AsyncCallback<Array<ConstraintSourceTypeInfo>> } callback - Indicates the callback for
202061847f8eSopenharmony_ci     *   getting a list of constraint source types for the specified os account.
202161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
202261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
202361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
202461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
202561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
202661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or constraint.
202761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
202861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
202961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
203061847f8eSopenharmony_ci     * @since 9
203161847f8eSopenharmony_ci     */
203261847f8eSopenharmony_ci    getOsAccountConstraintSourceTypes(
203361847f8eSopenharmony_ci      localId: number,
203461847f8eSopenharmony_ci      constraint: string,
203561847f8eSopenharmony_ci      callback: AsyncCallback<Array<ConstraintSourceTypeInfo>>
203661847f8eSopenharmony_ci    ): void;
203761847f8eSopenharmony_ci
203861847f8eSopenharmony_ci    /**
203961847f8eSopenharmony_ci     * Gets a list of constraint source types for the specified os account.
204061847f8eSopenharmony_ci     *
204161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
204261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
204361847f8eSopenharmony_ci     * @param { string } constraint - Indicates the constraint to query the source type.
204461847f8eSopenharmony_ci     * @returns { Promise<Array<ConstraintSourceTypeInfo>> } Returns a list of constraint source types for the specified os account.
204561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
204661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
204761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
204861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
204961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
205061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or constraint.
205161847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
205261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
205361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
205461847f8eSopenharmony_ci     * @since 9
205561847f8eSopenharmony_ci     */
205661847f8eSopenharmony_ci    getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise<Array<ConstraintSourceTypeInfo>>;
205761847f8eSopenharmony_ci  }
205861847f8eSopenharmony_ci
205961847f8eSopenharmony_ci  /**
206061847f8eSopenharmony_ci   * Provides information about OS accounts, including the local ID, local name, and type of an OS account.
206161847f8eSopenharmony_ci   *
206261847f8eSopenharmony_ci   * @interface OsAccountInfo
206361847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
206461847f8eSopenharmony_ci   * @since 7
206561847f8eSopenharmony_ci   */
206661847f8eSopenharmony_ci  interface OsAccountInfo {
206761847f8eSopenharmony_ci    /**
206861847f8eSopenharmony_ci     * The local ID of an OS account.
206961847f8eSopenharmony_ci     *
207061847f8eSopenharmony_ci     * @type { number }
207161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
207261847f8eSopenharmony_ci     * @since 7
207361847f8eSopenharmony_ci     */
207461847f8eSopenharmony_ci    localId: number;
207561847f8eSopenharmony_ci
207661847f8eSopenharmony_ci    /**
207761847f8eSopenharmony_ci     * The local name of an OS account.
207861847f8eSopenharmony_ci     *
207961847f8eSopenharmony_ci     * @type { string }
208061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
208161847f8eSopenharmony_ci     * @since 7
208261847f8eSopenharmony_ci     */
208361847f8eSopenharmony_ci    localName: string;
208461847f8eSopenharmony_ci
208561847f8eSopenharmony_ci    /**
208661847f8eSopenharmony_ci     * The short name of an OS account.
208761847f8eSopenharmony_ci     *
208861847f8eSopenharmony_ci     * @type { ?string }
208961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
209061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
209161847f8eSopenharmony_ci     * @since 12
209261847f8eSopenharmony_ci     */
209361847f8eSopenharmony_ci    shortName?: string;
209461847f8eSopenharmony_ci
209561847f8eSopenharmony_ci    /**
209661847f8eSopenharmony_ci     * Include: ADMIN, Normal, GUEST.
209761847f8eSopenharmony_ci     *
209861847f8eSopenharmony_ci     * @type { OsAccountType }
209961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
210061847f8eSopenharmony_ci     * @since 7
210161847f8eSopenharmony_ci     */
210261847f8eSopenharmony_ci    type: OsAccountType;
210361847f8eSopenharmony_ci
210461847f8eSopenharmony_ci    /**
210561847f8eSopenharmony_ci     * Account constraints information.
210661847f8eSopenharmony_ci     *
210761847f8eSopenharmony_ci     * @type { Array<string> }
210861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
210961847f8eSopenharmony_ci     * @since 7
211061847f8eSopenharmony_ci     */
211161847f8eSopenharmony_ci    constraints: Array<string>;
211261847f8eSopenharmony_ci
211361847f8eSopenharmony_ci    /**
211461847f8eSopenharmony_ci     * The account is verified or not.
211561847f8eSopenharmony_ci     *
211661847f8eSopenharmony_ci     * @type { boolean }
211761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
211861847f8eSopenharmony_ci     * @since 8
211961847f8eSopenharmony_ci     * @deprecated since 11
212061847f8eSopenharmony_ci     * @useinstead osAccount.OsAccountInfo#isUnlocked
212161847f8eSopenharmony_ci     */
212261847f8eSopenharmony_ci    isVerified: boolean;
212361847f8eSopenharmony_ci
212461847f8eSopenharmony_ci    /**
212561847f8eSopenharmony_ci     * The OS account is unlocked or not.
212661847f8eSopenharmony_ci     *
212761847f8eSopenharmony_ci     * @type { boolean }
212861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
212961847f8eSopenharmony_ci     * @since 11
213061847f8eSopenharmony_ci     */
213161847f8eSopenharmony_ci    isUnlocked: boolean;
213261847f8eSopenharmony_ci
213361847f8eSopenharmony_ci    /**
213461847f8eSopenharmony_ci     * OS account photo.
213561847f8eSopenharmony_ci     *
213661847f8eSopenharmony_ci     * @type { string }
213761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
213861847f8eSopenharmony_ci     * @since 8
213961847f8eSopenharmony_ci     */
214061847f8eSopenharmony_ci    photo: string;
214161847f8eSopenharmony_ci
214261847f8eSopenharmony_ci    /**
214361847f8eSopenharmony_ci     * Os account create time.
214461847f8eSopenharmony_ci     *
214561847f8eSopenharmony_ci     * @type { number }
214661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
214761847f8eSopenharmony_ci     * @since 8
214861847f8eSopenharmony_ci     */
214961847f8eSopenharmony_ci    createTime: number;
215061847f8eSopenharmony_ci
215161847f8eSopenharmony_ci    /**
215261847f8eSopenharmony_ci     * The last time to log in.
215361847f8eSopenharmony_ci     *
215461847f8eSopenharmony_ci     * @type { number }
215561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
215661847f8eSopenharmony_ci     * @since 8
215761847f8eSopenharmony_ci     */
215861847f8eSopenharmony_ci    lastLoginTime: number;
215961847f8eSopenharmony_ci
216061847f8eSopenharmony_ci    /**
216161847f8eSopenharmony_ci     * Os account serial number.
216261847f8eSopenharmony_ci     *
216361847f8eSopenharmony_ci     * @type { number }
216461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
216561847f8eSopenharmony_ci     * @since 8
216661847f8eSopenharmony_ci     */
216761847f8eSopenharmony_ci    serialNumber: number;
216861847f8eSopenharmony_ci
216961847f8eSopenharmony_ci    /**
217061847f8eSopenharmony_ci     * Os account is activated or not.
217161847f8eSopenharmony_ci     *
217261847f8eSopenharmony_ci     * @type { boolean }
217361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
217461847f8eSopenharmony_ci     * @since 8
217561847f8eSopenharmony_ci     * @deprecated since 11
217661847f8eSopenharmony_ci     * @useinstead osAccount.OsAccountInfo#isActivated
217761847f8eSopenharmony_ci     */
217861847f8eSopenharmony_ci    isActived: boolean;
217961847f8eSopenharmony_ci
218061847f8eSopenharmony_ci    /**
218161847f8eSopenharmony_ci     * The OS account is activated or not.
218261847f8eSopenharmony_ci     *
218361847f8eSopenharmony_ci     * @type { boolean }
218461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
218561847f8eSopenharmony_ci     * @since 11
218661847f8eSopenharmony_ci     */
218761847f8eSopenharmony_ci    isActivated: boolean;
218861847f8eSopenharmony_ci
218961847f8eSopenharmony_ci    /**
219061847f8eSopenharmony_ci     * Indicates whether the OS account is logged in.
219161847f8eSopenharmony_ci     *
219261847f8eSopenharmony_ci     * @type { ?boolean }
219361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
219461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
219561847f8eSopenharmony_ci     * @since 12
219661847f8eSopenharmony_ci     */
219761847f8eSopenharmony_ci    isLoggedIn?: boolean;
219861847f8eSopenharmony_ci
219961847f8eSopenharmony_ci    /**
220061847f8eSopenharmony_ci     * Os account create completed or not.
220161847f8eSopenharmony_ci     *
220261847f8eSopenharmony_ci     * @type { boolean }
220361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
220461847f8eSopenharmony_ci     * @since 8
220561847f8eSopenharmony_ci     */
220661847f8eSopenharmony_ci    isCreateCompleted: boolean;
220761847f8eSopenharmony_ci
220861847f8eSopenharmony_ci    /**
220961847f8eSopenharmony_ci     * Distributed account info.
221061847f8eSopenharmony_ci     *
221161847f8eSopenharmony_ci     * @type { distributedAccount.DistributedInfo }
221261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
221361847f8eSopenharmony_ci     * @since 7
221461847f8eSopenharmony_ci     */
221561847f8eSopenharmony_ci    distributedInfo: distributedAccount.DistributedInfo;
221661847f8eSopenharmony_ci
221761847f8eSopenharmony_ci    /**
221861847f8eSopenharmony_ci     * Domain account info.
221961847f8eSopenharmony_ci     *
222061847f8eSopenharmony_ci     * @type { DomainAccountInfo }
222161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
222261847f8eSopenharmony_ci     * @since 8
222361847f8eSopenharmony_ci     */
222461847f8eSopenharmony_ci    domainInfo: DomainAccountInfo;
222561847f8eSopenharmony_ci  }
222661847f8eSopenharmony_ci
222761847f8eSopenharmony_ci  /**
222861847f8eSopenharmony_ci   * Defines the switching/switched event data structure for the OS account.
222961847f8eSopenharmony_ci   *
223061847f8eSopenharmony_ci   * @typedef OsAccountSwitchEventData
223161847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
223261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
223361847f8eSopenharmony_ci   * @since 12
223461847f8eSopenharmony_ci   */
223561847f8eSopenharmony_ci  interface OsAccountSwitchEventData {
223661847f8eSopenharmony_ci    /**
223761847f8eSopenharmony_ci     * Indicates which OS account to switch from.
223861847f8eSopenharmony_ci     *
223961847f8eSopenharmony_ci     * @type { number }
224061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
224161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
224261847f8eSopenharmony_ci     * @since 12
224361847f8eSopenharmony_ci     */
224461847f8eSopenharmony_ci    fromAccountId: number;
224561847f8eSopenharmony_ci
224661847f8eSopenharmony_ci    /**
224761847f8eSopenharmony_ci     * Indicates which OS account to switch to.
224861847f8eSopenharmony_ci     *
224961847f8eSopenharmony_ci     * @type { number }
225061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
225161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
225261847f8eSopenharmony_ci     * @since 12
225361847f8eSopenharmony_ci     */
225461847f8eSopenharmony_ci    toAccountId: number;
225561847f8eSopenharmony_ci  }
225661847f8eSopenharmony_ci
225761847f8eSopenharmony_ci  /**
225861847f8eSopenharmony_ci   * Options for creating an OS account.
225961847f8eSopenharmony_ci   *
226061847f8eSopenharmony_ci   * @interface CreateOsAccountOptions
226161847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
226261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
226361847f8eSopenharmony_ci   * @since 12
226461847f8eSopenharmony_ci   */
226561847f8eSopenharmony_ci  interface CreateOsAccountOptions {
226661847f8eSopenharmony_ci    /**
226761847f8eSopenharmony_ci     * Indicates the short name of the OS account.
226861847f8eSopenharmony_ci     *
226961847f8eSopenharmony_ci     * @type { string }
227061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
227161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
227261847f8eSopenharmony_ci     * @since 12
227361847f8eSopenharmony_ci     */
227461847f8eSopenharmony_ci    shortName: string;
227561847f8eSopenharmony_ci  }
227661847f8eSopenharmony_ci
227761847f8eSopenharmony_ci  /**
227861847f8eSopenharmony_ci   * Options to create an OS account for domain.
227961847f8eSopenharmony_ci   *
228061847f8eSopenharmony_ci   * @interface CreateOsAccountForDomainOptions
228161847f8eSopenharmony_ci   * @extends CreateOsAccountOptions
228261847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
228361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
228461847f8eSopenharmony_ci   * @since 12
228561847f8eSopenharmony_ci   */
228661847f8eSopenharmony_ci  interface CreateOsAccountForDomainOptions extends CreateOsAccountOptions {}
228761847f8eSopenharmony_ci
228861847f8eSopenharmony_ci  /**
228961847f8eSopenharmony_ci   * Provides information about domain accounts.
229061847f8eSopenharmony_ci   *
229161847f8eSopenharmony_ci   * @interface DomainAccountInfo
229261847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
229361847f8eSopenharmony_ci   * @since 8
229461847f8eSopenharmony_ci   */
229561847f8eSopenharmony_ci  interface DomainAccountInfo {
229661847f8eSopenharmony_ci    /**
229761847f8eSopenharmony_ci     * The domain name
229861847f8eSopenharmony_ci     *
229961847f8eSopenharmony_ci     * @type { string }
230061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
230161847f8eSopenharmony_ci     * @since 8
230261847f8eSopenharmony_ci     */
230361847f8eSopenharmony_ci    domain: string;
230461847f8eSopenharmony_ci
230561847f8eSopenharmony_ci    /**
230661847f8eSopenharmony_ci     * The account name in the domain
230761847f8eSopenharmony_ci     *
230861847f8eSopenharmony_ci     * @type { string }
230961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
231061847f8eSopenharmony_ci     * @since 8
231161847f8eSopenharmony_ci     */
231261847f8eSopenharmony_ci    accountName: string;
231361847f8eSopenharmony_ci
231461847f8eSopenharmony_ci    /**
231561847f8eSopenharmony_ci     * The account identifier in the domain.
231661847f8eSopenharmony_ci     *
231761847f8eSopenharmony_ci     * @type { ?string }
231861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
231961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
232061847f8eSopenharmony_ci     * @since 10
232161847f8eSopenharmony_ci     */
232261847f8eSopenharmony_ci    accountId?: string;
232361847f8eSopenharmony_ci
232461847f8eSopenharmony_ci    /**
232561847f8eSopenharmony_ci     * Indicates whether the account is authenticated.
232661847f8eSopenharmony_ci     *
232761847f8eSopenharmony_ci     * @type { ?boolean }
232861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
232961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
233061847f8eSopenharmony_ci     * @since 11
233161847f8eSopenharmony_ci     */
233261847f8eSopenharmony_ci    isAuthenticated?: boolean;
233361847f8eSopenharmony_ci
233461847f8eSopenharmony_ci    /**
233561847f8eSopenharmony_ci     * Indicates the server config identifier for the domain to which the account belongs.
233661847f8eSopenharmony_ci     *
233761847f8eSopenharmony_ci     * @type { ?string }
233861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
233961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
234061847f8eSopenharmony_ci     * @since 12
234161847f8eSopenharmony_ci     */
234261847f8eSopenharmony_ci    serverConfigId?: string;
234361847f8eSopenharmony_ci  }
234461847f8eSopenharmony_ci
234561847f8eSopenharmony_ci  /**
234661847f8eSopenharmony_ci   * Enumerates OS account types.
234761847f8eSopenharmony_ci   *
234861847f8eSopenharmony_ci   * @enum { number } OsAccountType
234961847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
235061847f8eSopenharmony_ci   * @since 7
235161847f8eSopenharmony_ci   */
235261847f8eSopenharmony_ci  enum OsAccountType {
235361847f8eSopenharmony_ci    /**
235461847f8eSopenharmony_ci     * Indicates the administrator account, which has the permission to manage other OS accounts.
235561847f8eSopenharmony_ci     *
235661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
235761847f8eSopenharmony_ci     * @since 7
235861847f8eSopenharmony_ci     */
235961847f8eSopenharmony_ci    ADMIN = 0,
236061847f8eSopenharmony_ci
236161847f8eSopenharmony_ci    /**
236261847f8eSopenharmony_ci     * Indicates a normal account, which has access to common functions of OS accounts.
236361847f8eSopenharmony_ci     *
236461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
236561847f8eSopenharmony_ci     * @since 7
236661847f8eSopenharmony_ci     */
236761847f8eSopenharmony_ci    NORMAL,
236861847f8eSopenharmony_ci
236961847f8eSopenharmony_ci    /**
237061847f8eSopenharmony_ci     * Indicates a guest account, which is used to temporarily access the device and may be deleted at any time.
237161847f8eSopenharmony_ci     *
237261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
237361847f8eSopenharmony_ci     * @since 7
237461847f8eSopenharmony_ci     */
237561847f8eSopenharmony_ci    GUEST,
237661847f8eSopenharmony_ci
237761847f8eSopenharmony_ci    /**
237861847f8eSopenharmony_ci     * Indicates a private account.
237961847f8eSopenharmony_ci     *
238061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
238161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
238261847f8eSopenharmony_ci     * @since 12
238361847f8eSopenharmony_ci     */
238461847f8eSopenharmony_ci    PRIVATE = 1024
238561847f8eSopenharmony_ci  }
238661847f8eSopenharmony_ci
238761847f8eSopenharmony_ci  /**
238861847f8eSopenharmony_ci   * Provides the abilities for user authentication.
238961847f8eSopenharmony_ci   *
239061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
239161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
239261847f8eSopenharmony_ci   * @since 8
239361847f8eSopenharmony_ci   * @name UserAuth
239461847f8eSopenharmony_ci   */
239561847f8eSopenharmony_ci  class UserAuth {
239661847f8eSopenharmony_ci    /**
239761847f8eSopenharmony_ci     * Constructor to get the UserAuth class instance.
239861847f8eSopenharmony_ci     *
239961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
240061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
240161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
240261847f8eSopenharmony_ci     * @since 8
240361847f8eSopenharmony_ci     */
240461847f8eSopenharmony_ci    constructor();
240561847f8eSopenharmony_ci
240661847f8eSopenharmony_ci    /**
240761847f8eSopenharmony_ci     * Gets version information.
240861847f8eSopenharmony_ci     *
240961847f8eSopenharmony_ci     * @returns { number } Returns the version information.
241061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
241161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
241261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
241361847f8eSopenharmony_ci     * @since 8
241461847f8eSopenharmony_ci     */
241561847f8eSopenharmony_ci    getVersion(): number;
241661847f8eSopenharmony_ci
241761847f8eSopenharmony_ci    /**
241861847f8eSopenharmony_ci     * Checks whether the authentication capability is available.
241961847f8eSopenharmony_ci     *
242061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
242161847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the credential type for authentication.
242261847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
242361847f8eSopenharmony_ci     * @returns { number } Returns a status result.
242461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
242561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
242661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
242761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
242861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
242961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType or authTrustLevel.
243061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
243161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
243261847f8eSopenharmony_ci     * @since 8
243361847f8eSopenharmony_ci     */
243461847f8eSopenharmony_ci    getAvailableStatus(authType: AuthType, authTrustLevel: AuthTrustLevel): number;
243561847f8eSopenharmony_ci
243661847f8eSopenharmony_ci    /**
243761847f8eSopenharmony_ci     * Gets the property based on the specified request information.
243861847f8eSopenharmony_ci     *
243961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
244061847f8eSopenharmony_ci     * @param { GetPropertyRequest } request - Indicates the request information, including authentication type, and property type list.
244161847f8eSopenharmony_ci     * @param { AsyncCallback<ExecutorProperty> } callback - Returns an executor property.
244261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
244361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
244461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
244561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
244661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
244761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
244861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
244961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
245061847f8eSopenharmony_ci     * @since 8
245161847f8eSopenharmony_ci     */
245261847f8eSopenharmony_ci    /**
245361847f8eSopenharmony_ci     * Gets the property based on the specified request information.
245461847f8eSopenharmony_ci     *
245561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
245661847f8eSopenharmony_ci     * @param { GetPropertyRequest } request - Indicates the request information, including authentication type, and property type list.
245761847f8eSopenharmony_ci     * @param { AsyncCallback<ExecutorProperty> } callback - Returns an executor property.
245861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
245961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
246061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
246161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
246261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
246361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
246461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
246561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
246661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
246761847f8eSopenharmony_ci     * @since 12
246861847f8eSopenharmony_ci     */
246961847f8eSopenharmony_ci    getProperty(request: GetPropertyRequest, callback: AsyncCallback<ExecutorProperty>): void;
247061847f8eSopenharmony_ci
247161847f8eSopenharmony_ci    /**
247261847f8eSopenharmony_ci     * Gets the property based on the specified request information.
247361847f8eSopenharmony_ci     *
247461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
247561847f8eSopenharmony_ci     * @param { GetPropertyRequest } request - Indicates the request information, including authentication type, and property type list.
247661847f8eSopenharmony_ci     * @returns { Promise<ExecutorProperty> } Returns an executor property.
247761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
247861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
247961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
248061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
248161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
248261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
248361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
248461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
248561847f8eSopenharmony_ci     * @since 8
248661847f8eSopenharmony_ci     */
248761847f8eSopenharmony_ci    /**
248861847f8eSopenharmony_ci     * Gets the property based on the specified request information.
248961847f8eSopenharmony_ci     *
249061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
249161847f8eSopenharmony_ci     * @param { GetPropertyRequest } request - Indicates the request information, including authentication type, and property type list.
249261847f8eSopenharmony_ci     * @returns { Promise<ExecutorProperty> } Returns an executor property.
249361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
249461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
249561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
249661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
249761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
249861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
249961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
250061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
250161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
250261847f8eSopenharmony_ci     * @since 12
250361847f8eSopenharmony_ci     */
250461847f8eSopenharmony_ci    getProperty(request: GetPropertyRequest): Promise<ExecutorProperty>;
250561847f8eSopenharmony_ci
250661847f8eSopenharmony_ci    /**
250761847f8eSopenharmony_ci     * Sets property that can be used to initialize algorithms.
250861847f8eSopenharmony_ci     *
250961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
251061847f8eSopenharmony_ci     * @param { SetPropertyRequest } request - Indicates the request information, including authentication type and the key-value to be set.
251161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
251261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
251361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
251461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
251561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
251661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
251761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
251861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
251961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
252061847f8eSopenharmony_ci     * @since 8
252161847f8eSopenharmony_ci     */
252261847f8eSopenharmony_ci    setProperty(request: SetPropertyRequest, callback: AsyncCallback<void>): void;
252361847f8eSopenharmony_ci
252461847f8eSopenharmony_ci    /**
252561847f8eSopenharmony_ci     * Sets property that can be used to initialize algorithms.
252661847f8eSopenharmony_ci     *
252761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
252861847f8eSopenharmony_ci     * @param { SetPropertyRequest } request - Indicates the request information, including authentication type and the key-value to be set.
252961847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
253061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
253161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
253261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
253361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
253461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
253561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid request.
253661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
253761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
253861847f8eSopenharmony_ci     * @since 8
253961847f8eSopenharmony_ci     */
254061847f8eSopenharmony_ci    setProperty(request: SetPropertyRequest): Promise<void>;
254161847f8eSopenharmony_ci
254261847f8eSopenharmony_ci    /**
254361847f8eSopenharmony_ci     * Prepares remote authentication.
254461847f8eSopenharmony_ci     *
254561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
254661847f8eSopenharmony_ci     * @param { string } remoteNetworkId - Indicates the remote network identifier.
254761847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
254861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
254961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
255061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types.
255161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
255261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid remoteNetworkId.
255361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
255461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
255561847f8eSopenharmony_ci     * @since 12
255661847f8eSopenharmony_ci     */
255761847f8eSopenharmony_ci    prepareRemoteAuth(remoteNetworkId: string): Promise<void>;
255861847f8eSopenharmony_ci
255961847f8eSopenharmony_ci    /**
256061847f8eSopenharmony_ci     * Executes authentication.
256161847f8eSopenharmony_ci     *
256261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
256361847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
256461847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
256561847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
256661847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback to get result and acquireInfo.
256761847f8eSopenharmony_ci     * @returns { Uint8Array } Returns a context ID for cancellation.
256861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
256961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
257061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
257161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
257261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
257361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid challenge, authType or authTrustLevel.
257461847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The credential is incorrect.
257561847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
257661847f8eSopenharmony_ci     * @throws { BusinessError } 12300105 - The trust level is not supported.
257761847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
257861847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
257961847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
258061847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
258161847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
258261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
258361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
258461847f8eSopenharmony_ci     * @since 8
258561847f8eSopenharmony_ci     */
258661847f8eSopenharmony_ci    /**
258761847f8eSopenharmony_ci     * Executes authentication.
258861847f8eSopenharmony_ci     *
258961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
259061847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
259161847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
259261847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
259361847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback to get result and acquireInfo.
259461847f8eSopenharmony_ci     * @returns { Uint8Array } Returns a context ID for cancellation.
259561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
259661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
259761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
259861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
259961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
260061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid challenge, authType or authTrustLevel.
260161847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The credential is incorrect.
260261847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
260361847f8eSopenharmony_ci     * @throws { BusinessError } 12300105 - The trust level is not supported.
260461847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
260561847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
260661847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
260761847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
260861847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
260961847f8eSopenharmony_ci     * @throws { BusinessError } 12300117 - PIN is expired.
261061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
261161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
261261847f8eSopenharmony_ci     * @since 12
261361847f8eSopenharmony_ci     */
261461847f8eSopenharmony_ci    auth(
261561847f8eSopenharmony_ci      challenge: Uint8Array,
261661847f8eSopenharmony_ci      authType: AuthType,
261761847f8eSopenharmony_ci      authTrustLevel: AuthTrustLevel,
261861847f8eSopenharmony_ci      callback: IUserAuthCallback
261961847f8eSopenharmony_ci    ): Uint8Array;
262061847f8eSopenharmony_ci
262161847f8eSopenharmony_ci    /**
262261847f8eSopenharmony_ci     * Executes authentication.
262361847f8eSopenharmony_ci     *
262461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
262561847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
262661847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
262761847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
262861847f8eSopenharmony_ci     * @param { AuthOptions } options - Indicates authentication options.
262961847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback to get result and acquireInfo.
263061847f8eSopenharmony_ci     * @returns { Uint8Array } Returns a context ID for cancellation.
263161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
263261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
263361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
263461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
263561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
263661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid challenge, authType, authTrustLevel or options.
263761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
263861847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The credential is incorrect.
263961847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
264061847f8eSopenharmony_ci     * @throws { BusinessError } 12300105 - The trust level is not supported.
264161847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
264261847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
264361847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
264461847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
264561847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
264661847f8eSopenharmony_ci     * @throws { BusinessError } 12300117 - PIN is expired.
264761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
264861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
264961847f8eSopenharmony_ci     * @since 12
265061847f8eSopenharmony_ci     */
265161847f8eSopenharmony_ci    auth(
265261847f8eSopenharmony_ci      challenge: Uint8Array,
265361847f8eSopenharmony_ci      authType: AuthType,
265461847f8eSopenharmony_ci      authTrustLevel: AuthTrustLevel,
265561847f8eSopenharmony_ci      options: AuthOptions,
265661847f8eSopenharmony_ci      callback: IUserAuthCallback
265761847f8eSopenharmony_ci    ): Uint8Array;
265861847f8eSopenharmony_ci
265961847f8eSopenharmony_ci    /**
266061847f8eSopenharmony_ci     * Executes user authentication.
266161847f8eSopenharmony_ci     *
266261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
266361847f8eSopenharmony_ci     * @param { number } userId - Indicates the user identification.
266461847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
266561847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
266661847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
266761847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback to get result and acquireInfo.
266861847f8eSopenharmony_ci     * @returns { Uint8Array } Returns a context ID for cancellation.
266961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
267061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
267161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
267261847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
267361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
267461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid userId, challenge, authType or authTrustLevel.
267561847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The credential is incorrect.
267661847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
267761847f8eSopenharmony_ci     * @throws { BusinessError } 12300105 - The trust level is not supported.
267861847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
267961847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
268061847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
268161847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
268261847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
268361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
268461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
268561847f8eSopenharmony_ci     * @since 8
268661847f8eSopenharmony_ci     */
268761847f8eSopenharmony_ci    /**
268861847f8eSopenharmony_ci     * Executes user authentication.
268961847f8eSopenharmony_ci     *
269061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
269161847f8eSopenharmony_ci     * @param { number } userId - Indicates the user identification.
269261847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
269361847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
269461847f8eSopenharmony_ci     * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result.
269561847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback to get result and acquireInfo.
269661847f8eSopenharmony_ci     * @returns { Uint8Array } Returns a context ID for cancellation.
269761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
269861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
269961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
270061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
270161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
270261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid challenge, authType or authTrustLevel.
270361847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
270461847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The credential is incorrect.
270561847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
270661847f8eSopenharmony_ci     * @throws { BusinessError } 12300105 - The trust level is not supported.
270761847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
270861847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
270961847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
271061847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
271161847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
271261847f8eSopenharmony_ci     * @throws { BusinessError } 12300117 - PIN is expired.
271361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
271461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
271561847f8eSopenharmony_ci     * @since 12
271661847f8eSopenharmony_ci     */
271761847f8eSopenharmony_ci    authUser(
271861847f8eSopenharmony_ci      userId: number,
271961847f8eSopenharmony_ci      challenge: Uint8Array,
272061847f8eSopenharmony_ci      authType: AuthType,
272161847f8eSopenharmony_ci      authTrustLevel: AuthTrustLevel,
272261847f8eSopenharmony_ci      callback: IUserAuthCallback
272361847f8eSopenharmony_ci    ): Uint8Array;
272461847f8eSopenharmony_ci
272561847f8eSopenharmony_ci    /**
272661847f8eSopenharmony_ci     * Cancels authentication with context ID.
272761847f8eSopenharmony_ci     *
272861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
272961847f8eSopenharmony_ci     * @param { Uint8Array } contextID - Indicates the authentication context ID.
273061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
273161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
273261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
273361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
273461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
273561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid contextId.
273661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
273761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
273861847f8eSopenharmony_ci     * @since 8
273961847f8eSopenharmony_ci     */
274061847f8eSopenharmony_ci    cancelAuth(contextID: Uint8Array): void;
274161847f8eSopenharmony_ci  }
274261847f8eSopenharmony_ci
274361847f8eSopenharmony_ci  /**
274461847f8eSopenharmony_ci   * Provides the abilities for Pin code authentication.
274561847f8eSopenharmony_ci   *
274661847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
274761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
274861847f8eSopenharmony_ci   * @since 8
274961847f8eSopenharmony_ci   * @name PINAuth
275061847f8eSopenharmony_ci   */
275161847f8eSopenharmony_ci  class PINAuth {
275261847f8eSopenharmony_ci    /**
275361847f8eSopenharmony_ci     * Constructor to get the PINAuth class instance.
275461847f8eSopenharmony_ci     *
275561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
275661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
275761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
275861847f8eSopenharmony_ci     * @since 8
275961847f8eSopenharmony_ci     */
276061847f8eSopenharmony_ci    constructor();
276161847f8eSopenharmony_ci
276261847f8eSopenharmony_ci    /**
276361847f8eSopenharmony_ci     * Register inputer.
276461847f8eSopenharmony_ci     *
276561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_PIN_AUTH
276661847f8eSopenharmony_ci     * @param { IInputer } inputer - Indicates the password input box callback
276761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
276861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
276961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
277061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
277161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
277261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid inputer.
277361847f8eSopenharmony_ci     * @throws { BusinessError } 12300103 - The credential inputer already exists.
277461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
277561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
277661847f8eSopenharmony_ci     * @since 8
277761847f8eSopenharmony_ci     */
277861847f8eSopenharmony_ci    registerInputer(inputer: IInputer): void;
277961847f8eSopenharmony_ci
278061847f8eSopenharmony_ci    /**
278161847f8eSopenharmony_ci     * Unregister inputer.
278261847f8eSopenharmony_ci     *
278361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_PIN_AUTH
278461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
278561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
278661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
278761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
278861847f8eSopenharmony_ci     * @since 8
278961847f8eSopenharmony_ci     */
279061847f8eSopenharmony_ci    unregisterInputer(): void;
279161847f8eSopenharmony_ci  }
279261847f8eSopenharmony_ci
279361847f8eSopenharmony_ci  /**
279461847f8eSopenharmony_ci   * Provides the management of credential inputers.
279561847f8eSopenharmony_ci   *
279661847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
279761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
279861847f8eSopenharmony_ci   * @since 9
279961847f8eSopenharmony_ci   * @name InputerManager
280061847f8eSopenharmony_ci   */
280161847f8eSopenharmony_ci  class InputerManager {
280261847f8eSopenharmony_ci    /**
280361847f8eSopenharmony_ci     * Register credential inputer by authentication type.
280461847f8eSopenharmony_ci     *
280561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL or ohos.permission.MANAGE_USER_IDM
280661847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
280761847f8eSopenharmony_ci     * @param { IInputer } inputer - Indicates the credential input box callback.
280861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
280961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
281061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
281161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
281261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
281361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType or inputer.
281461847f8eSopenharmony_ci     * @throws { BusinessError } 12300103 - The credential inputer already exists.
281561847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
281661847f8eSopenharmony_ci     * @static
281761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
281861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
281961847f8eSopenharmony_ci     * @since 9
282061847f8eSopenharmony_ci     */
282161847f8eSopenharmony_ci    static registerInputer(authType: AuthType, inputer: IInputer): void;
282261847f8eSopenharmony_ci
282361847f8eSopenharmony_ci    /**
282461847f8eSopenharmony_ci     * Unregister credential inputer by authentication type.
282561847f8eSopenharmony_ci     *
282661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL or ohos.permission.MANAGE_USER_IDM
282761847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
282861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
282961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
283061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
283161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
283261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType.
283361847f8eSopenharmony_ci     * @static
283461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
283561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
283661847f8eSopenharmony_ci     * @since 9
283761847f8eSopenharmony_ci     */
283861847f8eSopenharmony_ci    static unregisterInputer(authType: AuthType): void;
283961847f8eSopenharmony_ci  }
284061847f8eSopenharmony_ci
284161847f8eSopenharmony_ci  /**
284261847f8eSopenharmony_ci   * Provides the AuthStatusInfo type.
284361847f8eSopenharmony_ci   *
284461847f8eSopenharmony_ci   * @interface AuthStatusInfo
284561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
284661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
284761847f8eSopenharmony_ci   * @since 10
284861847f8eSopenharmony_ci   */
284961847f8eSopenharmony_ci  interface AuthStatusInfo {
285061847f8eSopenharmony_ci    /**
285161847f8eSopenharmony_ci     * Indicates the remaining times that authentication can be performed.
285261847f8eSopenharmony_ci     *
285361847f8eSopenharmony_ci     * @type { number }
285461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
285561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
285661847f8eSopenharmony_ci     * @since 10
285761847f8eSopenharmony_ci     */
285861847f8eSopenharmony_ci    remainTimes: number;
285961847f8eSopenharmony_ci
286061847f8eSopenharmony_ci    /**
286161847f8eSopenharmony_ci     * Indicates the freezing time before performing the next authentication.
286261847f8eSopenharmony_ci     *
286361847f8eSopenharmony_ci     * @type { number }
286461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
286561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
286661847f8eSopenharmony_ci     * @since 10
286761847f8eSopenharmony_ci     */
286861847f8eSopenharmony_ci    freezingTime: number;
286961847f8eSopenharmony_ci  }
287061847f8eSopenharmony_ci
287161847f8eSopenharmony_ci  /**
287261847f8eSopenharmony_ci   * Provides the GetDomainAccessTokenOptions type.
287361847f8eSopenharmony_ci   *
287461847f8eSopenharmony_ci   * @typedef GetDomainAccessTokenOptions
287561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
287661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
287761847f8eSopenharmony_ci   * @since 10
287861847f8eSopenharmony_ci   */
287961847f8eSopenharmony_ci  interface GetDomainAccessTokenOptions {
288061847f8eSopenharmony_ci    /**
288161847f8eSopenharmony_ci     * Indicates the domain account information.
288261847f8eSopenharmony_ci     *
288361847f8eSopenharmony_ci     * @type { DomainAccountInfo }
288461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
288561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
288661847f8eSopenharmony_ci     * @since 10
288761847f8eSopenharmony_ci     */
288861847f8eSopenharmony_ci    domainAccountInfo: DomainAccountInfo;
288961847f8eSopenharmony_ci
289061847f8eSopenharmony_ci    /**
289161847f8eSopenharmony_ci     * Indicates the domain account token.
289261847f8eSopenharmony_ci     *
289361847f8eSopenharmony_ci     * @type { Uint8Array }
289461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
289561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
289661847f8eSopenharmony_ci     * @since 10
289761847f8eSopenharmony_ci     */
289861847f8eSopenharmony_ci    domainAccountToken: Uint8Array;
289961847f8eSopenharmony_ci
290061847f8eSopenharmony_ci    /**
290161847f8eSopenharmony_ci     * Indicates the business parameters.
290261847f8eSopenharmony_ci     *
290361847f8eSopenharmony_ci     * @type { Record<string, Object> }
290461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
290561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
290661847f8eSopenharmony_ci     * @since 10
290761847f8eSopenharmony_ci     */
290861847f8eSopenharmony_ci    businessParams: Record<string, Object>;
290961847f8eSopenharmony_ci
291061847f8eSopenharmony_ci    /**
291161847f8eSopenharmony_ci     * Indicates caller UID.
291261847f8eSopenharmony_ci     *
291361847f8eSopenharmony_ci     * @type { number }
291461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
291561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
291661847f8eSopenharmony_ci     * @since 10
291761847f8eSopenharmony_ci     */
291861847f8eSopenharmony_ci    callerUid: number;
291961847f8eSopenharmony_ci  }
292061847f8eSopenharmony_ci
292161847f8eSopenharmony_ci  /**
292261847f8eSopenharmony_ci   * Options for getting domain account information.
292361847f8eSopenharmony_ci   *
292461847f8eSopenharmony_ci   * @typedef GetDomainAccountInfoOptions
292561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
292661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
292761847f8eSopenharmony_ci   * @since 10
292861847f8eSopenharmony_ci   */
292961847f8eSopenharmony_ci  interface GetDomainAccountInfoOptions {
293061847f8eSopenharmony_ci    /**
293161847f8eSopenharmony_ci     * Indicates the account name.
293261847f8eSopenharmony_ci     *
293361847f8eSopenharmony_ci     * @type { string }
293461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
293561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
293661847f8eSopenharmony_ci     * @since 10
293761847f8eSopenharmony_ci     */
293861847f8eSopenharmony_ci    accountName: string;
293961847f8eSopenharmony_ci
294061847f8eSopenharmony_ci    /**
294161847f8eSopenharmony_ci     * Indicates the domain to which the account belongs.
294261847f8eSopenharmony_ci     *
294361847f8eSopenharmony_ci     * @type { ?string }
294461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
294561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
294661847f8eSopenharmony_ci     * @since 10
294761847f8eSopenharmony_ci     */
294861847f8eSopenharmony_ci    domain?: string;
294961847f8eSopenharmony_ci
295061847f8eSopenharmony_ci    /**
295161847f8eSopenharmony_ci     * Indicates the server config identifier for the domain to which the account belongs.
295261847f8eSopenharmony_ci     *
295361847f8eSopenharmony_ci     * @type { ?string }
295461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
295561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
295661847f8eSopenharmony_ci     * @since 12
295761847f8eSopenharmony_ci     */
295861847f8eSopenharmony_ci    serverConfigId?: string;
295961847f8eSopenharmony_ci  }
296061847f8eSopenharmony_ci
296161847f8eSopenharmony_ci  /**
296261847f8eSopenharmony_ci   * Options for getting domain account information in the domain plugin.
296361847f8eSopenharmony_ci   *
296461847f8eSopenharmony_ci   * @typedef GetDomainAccountInfoPluginOptions
296561847f8eSopenharmony_ci   * @extends GetDomainAccountInfoOptions
296661847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
296761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
296861847f8eSopenharmony_ci   * @since 10
296961847f8eSopenharmony_ci   */
297061847f8eSopenharmony_ci  interface GetDomainAccountInfoPluginOptions extends GetDomainAccountInfoOptions {
297161847f8eSopenharmony_ci    /**
297261847f8eSopenharmony_ci     * Indicates the caller UID.
297361847f8eSopenharmony_ci     *
297461847f8eSopenharmony_ci     * @type { number }
297561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
297661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
297761847f8eSopenharmony_ci     * @since 10
297861847f8eSopenharmony_ci     */
297961847f8eSopenharmony_ci    callerUid: number;
298061847f8eSopenharmony_ci  }
298161847f8eSopenharmony_ci
298261847f8eSopenharmony_ci  /**
298361847f8eSopenharmony_ci   * Provides the definition of domain plugin.
298461847f8eSopenharmony_ci   *
298561847f8eSopenharmony_ci   * @interface DomainPlugin
298661847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
298761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
298861847f8eSopenharmony_ci   * @since 9
298961847f8eSopenharmony_ci   */
299061847f8eSopenharmony_ci  interface DomainPlugin {
299161847f8eSopenharmony_ci    /**
299261847f8eSopenharmony_ci     * Authenticates the specified domain account.
299361847f8eSopenharmony_ci     *
299461847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information for authentication.
299561847f8eSopenharmony_ci     * @param { Uint8Array } credential - Indicates the credential for authentication.
299661847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the authentication callback.
299761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
299861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
299961847f8eSopenharmony_ci     * @since 9
300061847f8eSopenharmony_ci     */
300161847f8eSopenharmony_ci    auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void;
300261847f8eSopenharmony_ci
300361847f8eSopenharmony_ci    /**
300461847f8eSopenharmony_ci     * Authenticates the specified domain account with a popup.
300561847f8eSopenharmony_ci     *
300661847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information for authentication.
300761847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for notifying the authentication result.
300861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
300961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
301061847f8eSopenharmony_ci     * @since 10
301161847f8eSopenharmony_ci     */
301261847f8eSopenharmony_ci    authWithPopup(domainAccountInfo: DomainAccountInfo, callback: IUserAuthCallback): void;
301361847f8eSopenharmony_ci
301461847f8eSopenharmony_ci    /**
301561847f8eSopenharmony_ci     * Authenticates the specified domain account with an authorization token.
301661847f8eSopenharmony_ci     *
301761847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information for authentication.
301861847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the authorization token generated when PIN or biometric authentication is successful.
301961847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for notifying the authentication result.
302061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
302161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
302261847f8eSopenharmony_ci     * @since 10
302361847f8eSopenharmony_ci     */
302461847f8eSopenharmony_ci    authWithToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array, callback: IUserAuthCallback): void;
302561847f8eSopenharmony_ci
302661847f8eSopenharmony_ci    /**
302761847f8eSopenharmony_ci     * Gets the domain account information with the specified options.
302861847f8eSopenharmony_ci     *
302961847f8eSopenharmony_ci     * @param { GetDomainAccountInfoPluginOptions } options - Indicates the options for getting domain account information.
303061847f8eSopenharmony_ci     * @param { AsyncCallback<DomainAccountInfo> } callback - Indicates the callback for notifying the domain account information.
303161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
303261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
303361847f8eSopenharmony_ci     * @since 10
303461847f8eSopenharmony_ci     */
303561847f8eSopenharmony_ci    getAccountInfo(options: GetDomainAccountInfoPluginOptions, callback: AsyncCallback<DomainAccountInfo>): void;
303661847f8eSopenharmony_ci
303761847f8eSopenharmony_ci    /**
303861847f8eSopenharmony_ci     * Gets the domain authentication property for the specified domain account.
303961847f8eSopenharmony_ci     *
304061847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information for authentication.
304161847f8eSopenharmony_ci     * @param { AsyncCallback<AuthStatusInfo> } callback - Indicates the callback for notifying the domain authentication status information.
304261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
304361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
304461847f8eSopenharmony_ci     * @since 10
304561847f8eSopenharmony_ci     */
304661847f8eSopenharmony_ci    getAuthStatusInfo(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<AuthStatusInfo>): void;
304761847f8eSopenharmony_ci
304861847f8eSopenharmony_ci    /**
304961847f8eSopenharmony_ci     * Binds the specified domain account with an OS account.
305061847f8eSopenharmony_ci     *
305161847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
305261847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the OS account.
305361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the callback for notifying the binding result.
305461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
305561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
305661847f8eSopenharmony_ci     * @since 10
305761847f8eSopenharmony_ci     */
305861847f8eSopenharmony_ci    bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: AsyncCallback<void>): void;
305961847f8eSopenharmony_ci
306061847f8eSopenharmony_ci    /**
306161847f8eSopenharmony_ci     * Unbind the specified domain account.
306261847f8eSopenharmony_ci     *
306361847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
306461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the callback for notifying the unbinding result.
306561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
306661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
306761847f8eSopenharmony_ci     * @since 10
306861847f8eSopenharmony_ci     */
306961847f8eSopenharmony_ci    unbindAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<void>): void;
307061847f8eSopenharmony_ci
307161847f8eSopenharmony_ci    /**
307261847f8eSopenharmony_ci     * Checks whether the token of specified domain account is valid.
307361847f8eSopenharmony_ci     *
307461847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
307561847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the account token.
307661847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Indicates the callback for notifying the checking result.
307761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
307861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
307961847f8eSopenharmony_ci     * @since 10
308061847f8eSopenharmony_ci     */
308161847f8eSopenharmony_ci    isAccountTokenValid(
308261847f8eSopenharmony_ci      domainAccountInfo: DomainAccountInfo,
308361847f8eSopenharmony_ci      token: Uint8Array,
308461847f8eSopenharmony_ci      callback: AsyncCallback<boolean>
308561847f8eSopenharmony_ci    ): void;
308661847f8eSopenharmony_ci
308761847f8eSopenharmony_ci    /**
308861847f8eSopenharmony_ci     * Gets the access token based on the specified options.
308961847f8eSopenharmony_ci     *
309061847f8eSopenharmony_ci     * @param { GetDomainAccessTokenOptions } options - Indicates the options for getting th access token.
309161847f8eSopenharmony_ci     * @param { AsyncCallback<Uint8Array> } callback - Indicates the callback for returning the access token.
309261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
309361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
309461847f8eSopenharmony_ci     * @since 10
309561847f8eSopenharmony_ci     */
309661847f8eSopenharmony_ci    getAccessToken(options: GetDomainAccessTokenOptions, callback: AsyncCallback<Uint8Array>): void;
309761847f8eSopenharmony_ci  }
309861847f8eSopenharmony_ci
309961847f8eSopenharmony_ci  /**
310061847f8eSopenharmony_ci   * Provides abilities for the management of domain account.
310161847f8eSopenharmony_ci   *
310261847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
310361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
310461847f8eSopenharmony_ci   * @since 9
310561847f8eSopenharmony_ci   */
310661847f8eSopenharmony_ci  class DomainAccountManager {
310761847f8eSopenharmony_ci    /**
310861847f8eSopenharmony_ci     * Registers the domain plugin, which provides the capabilities for domain authentication.
310961847f8eSopenharmony_ci     *
311061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
311161847f8eSopenharmony_ci     * @param { DomainPlugin } plugin - Indicates the domain plugin.
311261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
311361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
311461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
311561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
311661847f8eSopenharmony_ci     * @throws { BusinessError } 12300201 - The domain plugin has been registered.
311761847f8eSopenharmony_ci     * @static
311861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
311961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
312061847f8eSopenharmony_ci     * @since 9
312161847f8eSopenharmony_ci     */
312261847f8eSopenharmony_ci    static registerPlugin(plugin: DomainPlugin): void;
312361847f8eSopenharmony_ci
312461847f8eSopenharmony_ci    /**
312561847f8eSopenharmony_ci     * Unregisters domain plugin.
312661847f8eSopenharmony_ci     *
312761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
312861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
312961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
313061847f8eSopenharmony_ci     * @static
313161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
313261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
313361847f8eSopenharmony_ci     * @since 9
313461847f8eSopenharmony_ci     */
313561847f8eSopenharmony_ci    static unregisterPlugin(): void;
313661847f8eSopenharmony_ci
313761847f8eSopenharmony_ci    /**
313861847f8eSopenharmony_ci     * Authenticates the specified domain account with a credential.
313961847f8eSopenharmony_ci     *
314061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
314161847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
314261847f8eSopenharmony_ci     * @param { Uint8Array } credential - Indicates the credential for authentication.
314361847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result.
314461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
314561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
314661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
314761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
314861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
314961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
315061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid domainAccountInfo or credential.
315161847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Domain account does not exist.
315261847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
315361847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - Authentication failed.
315461847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
315561847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
315661847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
315761847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
315861847f8eSopenharmony_ci     * @throws { BusinessError } 12300113 - The account authentication service does not exist.
315961847f8eSopenharmony_ci     * @throws { BusinessError } 12300114 - The account authentication service works abnormally.
316061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
316161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
316261847f8eSopenharmony_ci     * @since 10
316361847f8eSopenharmony_ci     */
316461847f8eSopenharmony_ci    static auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void;
316561847f8eSopenharmony_ci
316661847f8eSopenharmony_ci    /**
316761847f8eSopenharmony_ci     * Authenticates the domain account bound to the current OS account with a popup.
316861847f8eSopenharmony_ci     *
316961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
317061847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result.
317161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
317261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
317361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
317461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
317561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
317661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
317761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - No domain account is bound.
317861847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
317961847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - Authentication failed.
318061847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
318161847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
318261847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
318361847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
318461847f8eSopenharmony_ci     * @throws { BusinessError } 12300113 - The account authentication service does not exist.
318561847f8eSopenharmony_ci     * @throws { BusinessError } 12300114 - The account authentication service works abnormally.
318661847f8eSopenharmony_ci     * @static
318761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
318861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
318961847f8eSopenharmony_ci     * @since 10
319061847f8eSopenharmony_ci     */
319161847f8eSopenharmony_ci    /**
319261847f8eSopenharmony_ci     * Authenticates the domain account bound to the current OS account with a popup.
319361847f8eSopenharmony_ci     *
319461847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result.
319561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
319661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
319761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
319861847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
319961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
320061847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - No domain account is bound.
320161847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
320261847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - Authentication failed.
320361847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
320461847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
320561847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
320661847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
320761847f8eSopenharmony_ci     * @throws { BusinessError } 12300113 - The account authentication service does not exist.
320861847f8eSopenharmony_ci     * @throws { BusinessError } 12300114 - The account authentication service works abnormally.
320961847f8eSopenharmony_ci     * @static
321061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
321161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
321261847f8eSopenharmony_ci     * @since 11
321361847f8eSopenharmony_ci     */
321461847f8eSopenharmony_ci    static authWithPopup(callback: IUserAuthCallback): void;
321561847f8eSopenharmony_ci
321661847f8eSopenharmony_ci    /**
321761847f8eSopenharmony_ci     * Authenticates the domain account bound to the specified OS account with a popup.
321861847f8eSopenharmony_ci     *
321961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL
322061847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the specified OS account.
322161847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result.
322261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
322361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
322461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
322561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
322661847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
322761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
322861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
322961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - No domain account is bound.
323061847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
323161847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - Authentication failed.
323261847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
323361847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
323461847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
323561847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
323661847f8eSopenharmony_ci     * @throws { BusinessError } 12300113 - The account authentication service does not exist.
323761847f8eSopenharmony_ci     * @throws { BusinessError } 12300114 - The account authentication service works abnormally.
323861847f8eSopenharmony_ci     * @static
323961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
324061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
324161847f8eSopenharmony_ci     * @since 10
324261847f8eSopenharmony_ci     */
324361847f8eSopenharmony_ci    /**
324461847f8eSopenharmony_ci     * Authenticates the domain account bound to the specified OS account with a popup.
324561847f8eSopenharmony_ci     *
324661847f8eSopenharmony_ci     * @param { number } localId - Indicates the local ID of the specified OS account.
324761847f8eSopenharmony_ci     * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result.
324861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
324961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
325061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
325161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
325261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
325361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid localId.
325461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - No domain account is bound.
325561847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
325661847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - Authentication failed.
325761847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
325861847f8eSopenharmony_ci     * @throws { BusinessError } 12300110 - The authentication is locked.
325961847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The authentication time out.
326061847f8eSopenharmony_ci     * @throws { BusinessError } 12300112 - The authentication service is busy.
326161847f8eSopenharmony_ci     * @throws { BusinessError } 12300113 - The account authentication service does not exist.
326261847f8eSopenharmony_ci     * @throws { BusinessError } 12300114 - The account authentication service works abnormally.
326361847f8eSopenharmony_ci     * @static
326461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
326561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
326661847f8eSopenharmony_ci     * @since 11
326761847f8eSopenharmony_ci     */
326861847f8eSopenharmony_ci    static authWithPopup(localId: number, callback: IUserAuthCallback): void;
326961847f8eSopenharmony_ci
327061847f8eSopenharmony_ci    /**
327161847f8eSopenharmony_ci     * Checks whether the specified domain account exists.
327261847f8eSopenharmony_ci     *
327361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
327461847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
327561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback Indicates - The callback for checking whether the specified domain account exists.
327661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
327761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
327861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
327961847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
328061847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
328161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
328261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid domainAccountInfo.
328361847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
328461847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
328561847f8eSopenharmony_ci     * @static
328661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
328761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
328861847f8eSopenharmony_ci     * @since 10
328961847f8eSopenharmony_ci     */
329061847f8eSopenharmony_ci    static hasAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback<boolean>): void;
329161847f8eSopenharmony_ci
329261847f8eSopenharmony_ci    /**
329361847f8eSopenharmony_ci     * Checks whether the specified domain account exists.
329461847f8eSopenharmony_ci     *
329561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
329661847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
329761847f8eSopenharmony_ci     * @returns { Promise<boolean> } Returns whether the specified domain account exists.
329861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
329961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
330061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
330161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
330261847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
330361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
330461847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid domainAccountInfo.
330561847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
330661847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
330761847f8eSopenharmony_ci     * @static
330861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
330961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
331061847f8eSopenharmony_ci     * @since 10
331161847f8eSopenharmony_ci     */
331261847f8eSopenharmony_ci    static hasAccount(domainAccountInfo: DomainAccountInfo): Promise<boolean>;
331361847f8eSopenharmony_ci
331461847f8eSopenharmony_ci    /**
331561847f8eSopenharmony_ci     * Updates the token for the specified domain account.
331661847f8eSopenharmony_ci     * <p>Only the registered domain plugin has the permission to call this function.<br/>
331761847f8eSopenharmony_ci     * An empty token indicates the token of the target domain account is invalid.</p>
331861847f8eSopenharmony_ci     *
331961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
332061847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
332161847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the domain account token.
332261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Indicates the result callback.
332361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
332461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
332561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
332661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
332761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
332861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid token.
332961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
333061847f8eSopenharmony_ci     * @static
333161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
333261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
333361847f8eSopenharmony_ci     * @since 10
333461847f8eSopenharmony_ci     */
333561847f8eSopenharmony_ci    static updateAccountToken(
333661847f8eSopenharmony_ci      domainAccountInfo: DomainAccountInfo,
333761847f8eSopenharmony_ci      token: Uint8Array,
333861847f8eSopenharmony_ci      callback: AsyncCallback<void>
333961847f8eSopenharmony_ci    ): void;
334061847f8eSopenharmony_ci
334161847f8eSopenharmony_ci    /**
334261847f8eSopenharmony_ci     * Updates the token for the specified domain account.
334361847f8eSopenharmony_ci     * <p>Only the registered domain plugin has the permission to call this function.<br/>
334461847f8eSopenharmony_ci     * An empty token indicates the token of the target domain account is invalid.</p>
334561847f8eSopenharmony_ci     *
334661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
334761847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
334861847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the domain account token.
334961847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
335061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
335161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
335261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
335361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
335461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
335561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid token.
335661847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
335761847f8eSopenharmony_ci     * @static
335861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
335961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
336061847f8eSopenharmony_ci     * @since 10
336161847f8eSopenharmony_ci     */
336261847f8eSopenharmony_ci    static updateAccountToken(domainAccountInfo: DomainAccountInfo, token: Uint8Array): Promise<void>;
336361847f8eSopenharmony_ci
336461847f8eSopenharmony_ci    /**
336561847f8eSopenharmony_ci     * Updates the information of the specified domain account.
336661847f8eSopenharmony_ci     *
336761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
336861847f8eSopenharmony_ci     * @param { DomainAccountInfo } oldAccountInfo - Indicates the old domain account information.
336961847f8eSopenharmony_ci     * @param { DomainAccountInfo } newAccountInfo - Indicates the new domain account information.
337061847f8eSopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
337161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
337261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
337361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
337461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
337561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
337661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
337761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - The new account info is invalid.
337861847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - The old account not found.
337961847f8eSopenharmony_ci     * @throws { BusinessError } 12300004 - The new account already exists.
338061847f8eSopenharmony_ci     * @static
338161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
338261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
338361847f8eSopenharmony_ci     * @since 12
338461847f8eSopenharmony_ci     */
338561847f8eSopenharmony_ci    static updateAccountInfo(oldAccountInfo: DomainAccountInfo, newAccountInfo: DomainAccountInfo): Promise<void>;
338661847f8eSopenharmony_ci
338761847f8eSopenharmony_ci    /**
338861847f8eSopenharmony_ci     * Gets the specified domain account information.
338961847f8eSopenharmony_ci     *
339061847f8eSopenharmony_ci     * @permission ohos.permission.GET_DOMAIN_ACCOUNTS
339161847f8eSopenharmony_ci     * @param { GetDomainAccountInfoOptions } options - Indicates the options for getting domain account information.
339261847f8eSopenharmony_ci     * @param { AsyncCallback<DomainAccountInfo> } callback - Indicates the result callback.
339361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
339461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
339561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
339661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
339761847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
339861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
339961847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
340061847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
340161847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
340261847f8eSopenharmony_ci     * @static
340361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
340461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
340561847f8eSopenharmony_ci     * @since 10
340661847f8eSopenharmony_ci     */
340761847f8eSopenharmony_ci    static getAccountInfo(options: GetDomainAccountInfoOptions, callback: AsyncCallback<DomainAccountInfo>): void;
340861847f8eSopenharmony_ci
340961847f8eSopenharmony_ci    /**
341061847f8eSopenharmony_ci     * Gets the specified domain account information.
341161847f8eSopenharmony_ci     *
341261847f8eSopenharmony_ci     * @permission ohos.permission.GET_DOMAIN_ACCOUNTS
341361847f8eSopenharmony_ci     * @param { GetDomainAccountInfoOptions } options - Indicates the options for getting domain account information.
341461847f8eSopenharmony_ci     * @returns { Promise<DomainAccountInfo> } The promise returned by the function.
341561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
341661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
341761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
341861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
341961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
342061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
342161847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
342261847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
342361847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
342461847f8eSopenharmony_ci     * @static
342561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
342661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
342761847f8eSopenharmony_ci     * @since 10
342861847f8eSopenharmony_ci     */
342961847f8eSopenharmony_ci    static getAccountInfo(options: GetDomainAccountInfoOptions): Promise<DomainAccountInfo>;
343061847f8eSopenharmony_ci
343161847f8eSopenharmony_ci    /**
343261847f8eSopenharmony_ci     * Gets the business access token of the current domain account.
343361847f8eSopenharmony_ci     *
343461847f8eSopenharmony_ci     * @param { Record<string, Object> } businessParams - Indicates the business parameters.
343561847f8eSopenharmony_ci     * @param { AsyncCallback<Uint8Array> } callback - Indicates the result callback.
343661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
343761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
343861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
343961847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
344061847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
344161847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid business parameters.
344261847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Domain account not found.
344361847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
344461847f8eSopenharmony_ci     * @throws { BusinessError } 12300014 - The domain account is not authenticated.
344561847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
344661847f8eSopenharmony_ci     * @static
344761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
344861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
344961847f8eSopenharmony_ci     * @since 11
345061847f8eSopenharmony_ci     */
345161847f8eSopenharmony_ci    static getAccessToken(businessParams: Record<string, Object>, callback: AsyncCallback<Uint8Array>): void;
345261847f8eSopenharmony_ci
345361847f8eSopenharmony_ci    /**
345461847f8eSopenharmony_ci     * Gets the business access token for the current domain account.
345561847f8eSopenharmony_ci     *
345661847f8eSopenharmony_ci     * @param { Record<string, Object> } businessParams - Indicates the business parameters.
345761847f8eSopenharmony_ci     * @returns { Promise<Uint8Array> } The promise returned by the function.
345861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
345961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
346061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
346161847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
346261847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
346361847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid business parameters.
346461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Domain account not found.
346561847f8eSopenharmony_ci     * @throws { BusinessError } 12300013 - Network exception.
346661847f8eSopenharmony_ci     * @throws { BusinessError } 12300014 - The domain account is not authenticated.
346761847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
346861847f8eSopenharmony_ci     * @static
346961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
347061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
347161847f8eSopenharmony_ci     * @since 11
347261847f8eSopenharmony_ci     */
347361847f8eSopenharmony_ci    static getAccessToken(businessParams: Record<string, Object>): Promise<Uint8Array>;
347461847f8eSopenharmony_ci
347561847f8eSopenharmony_ci    /**
347661847f8eSopenharmony_ci     * Checks whether the authentication of the target domain account is expired.
347761847f8eSopenharmony_ci     *
347861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
347961847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
348061847f8eSopenharmony_ci     * @returns { Promise<boolean> } The promise returned by the function.
348161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
348261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
348361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
348461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
348561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
348661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
348761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Domain account not found.
348861847f8eSopenharmony_ci     * @static
348961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
349061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
349161847f8eSopenharmony_ci     * @since 12
349261847f8eSopenharmony_ci     */
349361847f8eSopenharmony_ci    static isAuthenticationExpired(domainAccountInfo: DomainAccountInfo): Promise<boolean>;
349461847f8eSopenharmony_ci  }
349561847f8eSopenharmony_ci
349661847f8eSopenharmony_ci  /**
349761847f8eSopenharmony_ci   * Defines the domain server config.
349861847f8eSopenharmony_ci   *
349961847f8eSopenharmony_ci   * @typedef DomainServerConfig
350061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
350161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
350261847f8eSopenharmony_ci   * @since 12
350361847f8eSopenharmony_ci   */
350461847f8eSopenharmony_ci  interface DomainServerConfig {
350561847f8eSopenharmony_ci    /**
350661847f8eSopenharmony_ci     * Indicates the detail config parameters.
350761847f8eSopenharmony_ci     *
350861847f8eSopenharmony_ci     * @type { Record<string, Object> }
350961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
351061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
351161847f8eSopenharmony_ci     * @since 12
351261847f8eSopenharmony_ci     */
351361847f8eSopenharmony_ci    parameters: Record<string, Object>;
351461847f8eSopenharmony_ci
351561847f8eSopenharmony_ci    /**
351661847f8eSopenharmony_ci     * Indicates the config identifier.
351761847f8eSopenharmony_ci     *
351861847f8eSopenharmony_ci     * @type { string }
351961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
352061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
352161847f8eSopenharmony_ci     * @since 12
352261847f8eSopenharmony_ci     */
352361847f8eSopenharmony_ci    id: string;
352461847f8eSopenharmony_ci
352561847f8eSopenharmony_ci    /**
352661847f8eSopenharmony_ci     * Indicates the domain to which the server config belongs.
352761847f8eSopenharmony_ci     *
352861847f8eSopenharmony_ci     * @type { string }
352961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
353061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
353161847f8eSopenharmony_ci     * @since 12
353261847f8eSopenharmony_ci     */
353361847f8eSopenharmony_ci    domain: string;
353461847f8eSopenharmony_ci  }
353561847f8eSopenharmony_ci
353661847f8eSopenharmony_ci  /**
353761847f8eSopenharmony_ci   * Provides abilities for managing domain server config.
353861847f8eSopenharmony_ci   *
353961847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
354061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
354161847f8eSopenharmony_ci   * @since 12
354261847f8eSopenharmony_ci   */
354361847f8eSopenharmony_ci  class DomainServerConfigManager {
354461847f8eSopenharmony_ci    /**
354561847f8eSopenharmony_ci     * Adds a domain server config.
354661847f8eSopenharmony_ci     *
354761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
354861847f8eSopenharmony_ci     * @param { Record<string, Object> } parameters - Indicates the server config parameters.
354961847f8eSopenharmony_ci     * @returns { Promise<DomainServerConfig> } Returns the added domain server config.
355061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
355161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
355261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
355361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
355461847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
355561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
355661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid server config parameters.
355761847f8eSopenharmony_ci     * @throws { BusinessError } 12300211 - Server unreachable.
355861847f8eSopenharmony_ci     * @static
355961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
356061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
356161847f8eSopenharmony_ci     * @since 12
356261847f8eSopenharmony_ci     */
356361847f8eSopenharmony_ci    static addServerConfig(parameters: Record<string, Object>): Promise<DomainServerConfig>;
356461847f8eSopenharmony_ci
356561847f8eSopenharmony_ci    /**
356661847f8eSopenharmony_ci     * Removes a domain server config.
356761847f8eSopenharmony_ci     *
356861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
356961847f8eSopenharmony_ci     * @param { string } configId - Indicates the server config identifier.
357061847f8eSopenharmony_ci     * @returns { Promise<void> } Returns void.
357161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
357261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
357361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
357461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
357561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
357661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
357761847f8eSopenharmony_ci     * @throws { BusinessError } 12300212 - Server config not found.
357861847f8eSopenharmony_ci     * @static
357961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
358061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
358161847f8eSopenharmony_ci     * @since 12
358261847f8eSopenharmony_ci     */
358361847f8eSopenharmony_ci    static removeServerConfig(configId: string): Promise<void>;
358461847f8eSopenharmony_ci
358561847f8eSopenharmony_ci    /**
358661847f8eSopenharmony_ci     * Gets the server config of the specified domain account.
358761847f8eSopenharmony_ci     *
358861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
358961847f8eSopenharmony_ci     * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information.
359061847f8eSopenharmony_ci     * @returns { Promise<DomainServerConfig> } Returns the domain server config.
359161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
359261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
359361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
359461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
359561847f8eSopenharmony_ci     * @throws { BusinessError } 801 - Capability not supported.
359661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
359761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Domain account not found.
359861847f8eSopenharmony_ci     * @static
359961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
360061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
360161847f8eSopenharmony_ci     * @since 12
360261847f8eSopenharmony_ci     */
360361847f8eSopenharmony_ci    static getAccountServerConfig(domainAccountInfo: DomainAccountInfo): Promise<DomainServerConfig>;
360461847f8eSopenharmony_ci  }
360561847f8eSopenharmony_ci
360661847f8eSopenharmony_ci  /**
360761847f8eSopenharmony_ci   * Provides the abilities for managing user identity.
360861847f8eSopenharmony_ci   *
360961847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
361061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
361161847f8eSopenharmony_ci   * @since 8
361261847f8eSopenharmony_ci   * @name UserIdentityManager
361361847f8eSopenharmony_ci   */
361461847f8eSopenharmony_ci  class UserIdentityManager {
361561847f8eSopenharmony_ci    /**
361661847f8eSopenharmony_ci     * Constructor to get the UserIdentityManager class instance.
361761847f8eSopenharmony_ci     *
361861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
361961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
362061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
362161847f8eSopenharmony_ci     * @since 8
362261847f8eSopenharmony_ci     */
362361847f8eSopenharmony_ci    constructor();
362461847f8eSopenharmony_ci
362561847f8eSopenharmony_ci    /**
362661847f8eSopenharmony_ci     * Opens session.
362761847f8eSopenharmony_ci     * <p>
362861847f8eSopenharmony_ci     * Start an IDM operation to obtain challenge value.
362961847f8eSopenharmony_ci     * A challenge value of 0 indicates that opensession failed.
363061847f8eSopenharmony_ci     *
363161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
363261847f8eSopenharmony_ci     * @param { AsyncCallback<Uint8Array> } callback - Returns a challenge value.
363361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
363461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
363561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
363661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
363761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
363861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
363961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
364061847f8eSopenharmony_ci     * @since 8
364161847f8eSopenharmony_ci     */
364261847f8eSopenharmony_ci    openSession(callback: AsyncCallback<Uint8Array>): void;
364361847f8eSopenharmony_ci
364461847f8eSopenharmony_ci    /**
364561847f8eSopenharmony_ci     * Opens session.
364661847f8eSopenharmony_ci     * <p>
364761847f8eSopenharmony_ci     * Start an IDM operation to obtain challenge value.
364861847f8eSopenharmony_ci     * A challenge value of 0 indicates that opensession failed.
364961847f8eSopenharmony_ci     *
365061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
365161847f8eSopenharmony_ci     * @returns { Promise<Uint8Array> } Returns a challenge value.
365261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
365361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
365461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types.
365561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
365661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
365761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
365861847f8eSopenharmony_ci     * @since 8
365961847f8eSopenharmony_ci     */
366061847f8eSopenharmony_ci    /**
366161847f8eSopenharmony_ci     * Opens a session.
366261847f8eSopenharmony_ci     * <p>
366361847f8eSopenharmony_ci     * Start an IDM operation to obtain challenge value.
366461847f8eSopenharmony_ci     *
366561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
366661847f8eSopenharmony_ci     * @param { number } [accountId] - Indicates the local ID of the OS account.
366761847f8eSopenharmony_ci     * @returns { Promise<Uint8Array> } Returns a challenge value.
366861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
366961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
367061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types.
367161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
367261847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
367361847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted account.
367461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
367561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
367661847f8eSopenharmony_ci     * @since 12
367761847f8eSopenharmony_ci     */
367861847f8eSopenharmony_ci    openSession(accountId?: number): Promise<Uint8Array>;
367961847f8eSopenharmony_ci
368061847f8eSopenharmony_ci    /**
368161847f8eSopenharmony_ci     * Adds credential.
368261847f8eSopenharmony_ci     * <p>
368361847f8eSopenharmony_ci     * Add user credential information, pass in credential addition method and credential information
368461847f8eSopenharmony_ci     * (credential type, subclass, if adding user's non password credentials, pass in password authentication token),
368561847f8eSopenharmony_ci     * and get the result / acquireInfo callback.
368661847f8eSopenharmony_ci     *
368761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
368861847f8eSopenharmony_ci     * @param { CredentialInfo } credentialInfo - Indicates the credential information.
368961847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get results and acquireInfo.
369061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
369161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
369261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
369361847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
369461847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
369561847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid credentialInfo, i.e. authType or authSubType.
369661847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
369761847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
369861847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
369961847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
370061847f8eSopenharmony_ci     * @throws { BusinessError } 12300115 - The number of credentials reaches the upper limit.
370161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
370261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
370361847f8eSopenharmony_ci     * @since 8
370461847f8eSopenharmony_ci     */
370561847f8eSopenharmony_ci    /**
370661847f8eSopenharmony_ci     * Adds a credential.
370761847f8eSopenharmony_ci     * <p>
370861847f8eSopenharmony_ci     * Add user credential information, pass in credential addition method and credential information
370961847f8eSopenharmony_ci     * (credential type, subclass, if adding user's non password credentials, pass in password authentication token),
371061847f8eSopenharmony_ci     * and get the result / acquireInfo callback.
371161847f8eSopenharmony_ci     *
371261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
371361847f8eSopenharmony_ci     * @param { CredentialInfo } credentialInfo - Indicates the credential information.
371461847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get results and acquireInfo.
371561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
371661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
371761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
371861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
371961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
372061847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid credentialInfo, i.e. authType or authSubType.
372161847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
372261847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
372361847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
372461847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted account.
372561847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
372661847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
372761847f8eSopenharmony_ci     * @throws { BusinessError } 12300115 - The number of credentials reaches the upper limit.
372861847f8eSopenharmony_ci     * @throws { BusinessError } 12300116 - Credential complexity verification failed.
372961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
373061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
373161847f8eSopenharmony_ci     * @since 12
373261847f8eSopenharmony_ci     */
373361847f8eSopenharmony_ci    addCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void;
373461847f8eSopenharmony_ci
373561847f8eSopenharmony_ci    /**
373661847f8eSopenharmony_ci     * Updates credential.
373761847f8eSopenharmony_ci     *
373861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
373961847f8eSopenharmony_ci     * @param { CredentialInfo } credentialInfo - Indicates the credential information.
374061847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get results and acquireInfo.
374161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
374261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
374361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
374461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
374561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
374661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid credentialInfo, i.e. authType or authSubType.
374761847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
374861847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
374961847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
375061847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
375161847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
375261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
375361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
375461847f8eSopenharmony_ci     * @since 8
375561847f8eSopenharmony_ci     */
375661847f8eSopenharmony_ci    /**
375761847f8eSopenharmony_ci     * Updates a credential.
375861847f8eSopenharmony_ci     *
375961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
376061847f8eSopenharmony_ci     * @param { CredentialInfo } credentialInfo - Indicates the credential information.
376161847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get results and acquireInfo.
376261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
376361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
376461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
376561847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
376661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
376761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid credentialInfo, i.e. authType or authSubType.
376861847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
376961847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
377061847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
377161847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
377261847f8eSopenharmony_ci     * @throws { BusinessError } 12300109 - The authentication, enrollment, or update operation is canceled.
377361847f8eSopenharmony_ci     * @throws { BusinessError } 12300111 - The operation time out.
377461847f8eSopenharmony_ci     * @throws { BusinessError } 12300116 - Credential complexity verification failed.
377561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
377661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
377761847f8eSopenharmony_ci     * @since 12
377861847f8eSopenharmony_ci     */
377961847f8eSopenharmony_ci    updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void;
378061847f8eSopenharmony_ci
378161847f8eSopenharmony_ci    /**
378261847f8eSopenharmony_ci     * Closes session.
378361847f8eSopenharmony_ci     * <p>
378461847f8eSopenharmony_ci     * End an IDM operation.
378561847f8eSopenharmony_ci     *
378661847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
378761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
378861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
378961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
379061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
379161847f8eSopenharmony_ci     * @since 8
379261847f8eSopenharmony_ci     */
379361847f8eSopenharmony_ci    /**
379461847f8eSopenharmony_ci     * Closes a session.
379561847f8eSopenharmony_ci     * <p>
379661847f8eSopenharmony_ci     * End an IDM operation.
379761847f8eSopenharmony_ci     *
379861847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
379961847f8eSopenharmony_ci     * @param { number } [accountId] - Indicates the local ID of the OS account.
380061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
380161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
380261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types.
380361847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
380461847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
380561847f8eSopenharmony_ci     * @throws { BusinessError } 12300008 - Restricted account.
380661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
380761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
380861847f8eSopenharmony_ci     * @since 12
380961847f8eSopenharmony_ci     */
381061847f8eSopenharmony_ci    closeSession(accountId?: number): void;
381161847f8eSopenharmony_ci
381261847f8eSopenharmony_ci    /**
381361847f8eSopenharmony_ci     * Cancels entry with a challenge value.
381461847f8eSopenharmony_ci     *
381561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
381661847f8eSopenharmony_ci     * @param { Uint8Array } challenge - Indicates the challenge value.
381761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
381861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
381961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
382061847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
382161847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
382261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid challenge.
382361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
382461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
382561847f8eSopenharmony_ci     * @since 8
382661847f8eSopenharmony_ci     */
382761847f8eSopenharmony_ci    cancel(challenge: Uint8Array): void;
382861847f8eSopenharmony_ci
382961847f8eSopenharmony_ci    /**
383061847f8eSopenharmony_ci     * Deletes the user with the authentication token.
383161847f8eSopenharmony_ci     *
383261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
383361847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the authentication token.
383461847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get the deletion result.
383561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
383661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
383761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
383861847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
383961847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
384061847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
384161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
384261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
384361847f8eSopenharmony_ci     * @since 8
384461847f8eSopenharmony_ci     */
384561847f8eSopenharmony_ci    delUser(token: Uint8Array, callback: IIdmCallback): void;
384661847f8eSopenharmony_ci
384761847f8eSopenharmony_ci    /**
384861847f8eSopenharmony_ci     * Deletes the user credential information.
384961847f8eSopenharmony_ci     *
385061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_USER_IDM
385161847f8eSopenharmony_ci     * @param { Uint8Array } credentialId - Indicates the credential index.
385261847f8eSopenharmony_ci     * @param { Uint8Array } token - Indicates the authentication token.
385361847f8eSopenharmony_ci     * @param { IIdmCallback } callback - Indicates the callback to get the deletion result.
385461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
385561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
385661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
385761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
385861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
385961847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid credentialId.
386061847f8eSopenharmony_ci     * @throws { BusinessError } 12300101 - The token is invalid.
386161847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
386261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
386361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
386461847f8eSopenharmony_ci     * @since 8
386561847f8eSopenharmony_ci     */
386661847f8eSopenharmony_ci    delCred(credentialId: Uint8Array, token: Uint8Array, callback: IIdmCallback): void;
386761847f8eSopenharmony_ci
386861847f8eSopenharmony_ci    /**
386961847f8eSopenharmony_ci     * Gets authentication information.
387061847f8eSopenharmony_ci     *
387161847f8eSopenharmony_ci     * @permission ohos.permission.USE_USER_IDM
387261847f8eSopenharmony_ci     * @param { AsyncCallback<Array<EnrolledCredInfo>> } callback - Indicates the callback to get all registered credential information of
387361847f8eSopenharmony_ci     * the specified type for the current user.
387461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
387561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
387661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
387761847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
387861847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
387961847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
388061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
388161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
388261847f8eSopenharmony_ci     * @since 8
388361847f8eSopenharmony_ci     */
388461847f8eSopenharmony_ci    getAuthInfo(callback: AsyncCallback<Array<EnrolledCredInfo>>): void;
388561847f8eSopenharmony_ci
388661847f8eSopenharmony_ci    /**
388761847f8eSopenharmony_ci     * Gets authentication information.
388861847f8eSopenharmony_ci     *
388961847f8eSopenharmony_ci     * @permission ohos.permission.USE_USER_IDM
389061847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
389161847f8eSopenharmony_ci     * @param { AsyncCallback<Array<EnrolledCredInfo>> } callback - Indicates the callback to get all registered credential information of
389261847f8eSopenharmony_ci     * the specified type for the current user.
389361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
389461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
389561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
389661847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
389761847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
389861847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType.
389961847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
390061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
390161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
390261847f8eSopenharmony_ci     * @since 8
390361847f8eSopenharmony_ci     */
390461847f8eSopenharmony_ci    getAuthInfo(authType: AuthType, callback: AsyncCallback<Array<EnrolledCredInfo>>): void;
390561847f8eSopenharmony_ci
390661847f8eSopenharmony_ci    /**
390761847f8eSopenharmony_ci     * Gets authentication information.
390861847f8eSopenharmony_ci     *
390961847f8eSopenharmony_ci     * @permission ohos.permission.USE_USER_IDM
391061847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
391161847f8eSopenharmony_ci     * @returns { Promise<Array<EnrolledCredInfo>> } Returns all registered credential information of
391261847f8eSopenharmony_ci     * the specified type for the current user.
391361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
391461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
391561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types.
391661847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
391761847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType.
391861847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
391961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
392061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
392161847f8eSopenharmony_ci     * @since 8
392261847f8eSopenharmony_ci     */
392361847f8eSopenharmony_ci    getAuthInfo(authType?: AuthType): Promise<Array<EnrolledCredInfo>>;
392461847f8eSopenharmony_ci
392561847f8eSopenharmony_ci    /**
392661847f8eSopenharmony_ci     * Gets authentication information.
392761847f8eSopenharmony_ci     *
392861847f8eSopenharmony_ci     * @permission ohos.permission.USE_USER_IDM
392961847f8eSopenharmony_ci     * @param { GetAuthInfoOptions } [options] - Indicates the options for getting the authentication information.
393061847f8eSopenharmony_ci     * @returns { Promise<Array<EnrolledCredInfo>> } Returns all enrolled credential information
393161847f8eSopenharmony_ci     * according to the options.
393261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
393361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
393461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types.
393561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
393661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid options.
393761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
393861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
393961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
394061847f8eSopenharmony_ci     * @since 12
394161847f8eSopenharmony_ci     */
394261847f8eSopenharmony_ci    getAuthInfo(options?: GetAuthInfoOptions): Promise<Array<EnrolledCredInfo>>;
394361847f8eSopenharmony_ci
394461847f8eSopenharmony_ci    /**
394561847f8eSopenharmony_ci     * Gets the credential enrolled identifier of the specified authentication type.
394661847f8eSopenharmony_ci     *
394761847f8eSopenharmony_ci     * @permission ohos.permission.USE_USER_IDM
394861847f8eSopenharmony_ci     * @param { AuthType } authType - Indicates the authentication type.
394961847f8eSopenharmony_ci     * @param { number } [accountId] - Indicates the OS account identifier.
395061847f8eSopenharmony_ci     * @returns { Promise<Uint8Array> } Returns the enrolled identifier.
395161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
395261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
395361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
395461847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
395561847f8eSopenharmony_ci     * @throws { BusinessError } 12300001 - The system service works abnormally.
395661847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid authType.
395761847f8eSopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
395861847f8eSopenharmony_ci     * @throws { BusinessError } 12300102 - The credential does not exist.
395961847f8eSopenharmony_ci     * @throws { BusinessError } 12300106 - The authentication type is not supported.
396061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
396161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
396261847f8eSopenharmony_ci     * @since 12
396361847f8eSopenharmony_ci     */
396461847f8eSopenharmony_ci    getEnrolledId(authType: AuthType, accountId?: number): Promise<Uint8Array>;
396561847f8eSopenharmony_ci  }
396661847f8eSopenharmony_ci
396761847f8eSopenharmony_ci  /**
396861847f8eSopenharmony_ci   * Options for getting authentication information.
396961847f8eSopenharmony_ci   *
397061847f8eSopenharmony_ci   * @typedef GetAuthInfoOptions
397161847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
397261847f8eSopenharmony_ci   * @systemapi
397361847f8eSopenharmony_ci   * @since 12
397461847f8eSopenharmony_ci   */
397561847f8eSopenharmony_ci  interface GetAuthInfoOptions {
397661847f8eSopenharmony_ci    /**
397761847f8eSopenharmony_ci     * Indicates the authentication credential type.
397861847f8eSopenharmony_ci     *
397961847f8eSopenharmony_ci     * @type { ?AuthType }
398061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
398161847f8eSopenharmony_ci     * @systemapi
398261847f8eSopenharmony_ci     * @since 12
398361847f8eSopenharmony_ci     */
398461847f8eSopenharmony_ci    authType?: AuthType;
398561847f8eSopenharmony_ci
398661847f8eSopenharmony_ci    /**
398761847f8eSopenharmony_ci     * Indicates the OS account identifier.
398861847f8eSopenharmony_ci     *
398961847f8eSopenharmony_ci     * @type { ?number }
399061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
399161847f8eSopenharmony_ci     * @systemapi
399261847f8eSopenharmony_ci     * @since 12
399361847f8eSopenharmony_ci     */
399461847f8eSopenharmony_ci    accountId?: number;
399561847f8eSopenharmony_ci  }
399661847f8eSopenharmony_ci
399761847f8eSopenharmony_ci  /**
399861847f8eSopenharmony_ci   * Indicates the enumeration of the authentication intent.
399961847f8eSopenharmony_ci   *
400061847f8eSopenharmony_ci   * @enum { number } AuthIntent
400161847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
400261847f8eSopenharmony_ci   * @systemapi
400361847f8eSopenharmony_ci   * @since 12
400461847f8eSopenharmony_ci   */
400561847f8eSopenharmony_ci  enum AuthIntent {
400661847f8eSopenharmony_ci    /**
400761847f8eSopenharmony_ci     * Indicates the intent to unlock screen.
400861847f8eSopenharmony_ci     *
400961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
401061847f8eSopenharmony_ci     * @systemapi
401161847f8eSopenharmony_ci     * @since 12
401261847f8eSopenharmony_ci     */
401361847f8eSopenharmony_ci    UNLOCK = 1
401461847f8eSopenharmony_ci  }
401561847f8eSopenharmony_ci
401661847f8eSopenharmony_ci  /**
401761847f8eSopenharmony_ci   * Options for remote authentication.
401861847f8eSopenharmony_ci   *
401961847f8eSopenharmony_ci   * @interface RemoteAuthOptions
402061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
402161847f8eSopenharmony_ci   * @systemapi
402261847f8eSopenharmony_ci   * @since 12
402361847f8eSopenharmony_ci   */
402461847f8eSopenharmony_ci  interface RemoteAuthOptions {
402561847f8eSopenharmony_ci    /**
402661847f8eSopenharmony_ci     * Indicates the verifier network identifier.
402761847f8eSopenharmony_ci     *
402861847f8eSopenharmony_ci     * @type { ?string }
402961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
403061847f8eSopenharmony_ci     * @systemapi
403161847f8eSopenharmony_ci     * @since 12
403261847f8eSopenharmony_ci     */
403361847f8eSopenharmony_ci    verifierNetworkId?: string;
403461847f8eSopenharmony_ci
403561847f8eSopenharmony_ci    /**
403661847f8eSopenharmony_ci     * Indicates the collector network identifier.
403761847f8eSopenharmony_ci     *
403861847f8eSopenharmony_ci     * @type { ?string }
403961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
404061847f8eSopenharmony_ci     * @systemapi
404161847f8eSopenharmony_ci     * @since 12
404261847f8eSopenharmony_ci     */
404361847f8eSopenharmony_ci    collectorNetworkId?: string;
404461847f8eSopenharmony_ci
404561847f8eSopenharmony_ci    /**
404661847f8eSopenharmony_ci     * Indicates the collector token identifier.
404761847f8eSopenharmony_ci     *
404861847f8eSopenharmony_ci     * @type { ?number }
404961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
405061847f8eSopenharmony_ci     * @systemapi
405161847f8eSopenharmony_ci     * @since 12
405261847f8eSopenharmony_ci     */
405361847f8eSopenharmony_ci    collectorTokenId?: number;
405461847f8eSopenharmony_ci  }
405561847f8eSopenharmony_ci
405661847f8eSopenharmony_ci  /**
405761847f8eSopenharmony_ci   * Options for authentication.
405861847f8eSopenharmony_ci   *
405961847f8eSopenharmony_ci   * @interface AuthOptions
406061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
406161847f8eSopenharmony_ci   * @systemapi
406261847f8eSopenharmony_ci   * @since 12
406361847f8eSopenharmony_ci   */
406461847f8eSopenharmony_ci  interface AuthOptions {
406561847f8eSopenharmony_ci    /**
406661847f8eSopenharmony_ci     * Indicates the local ID of the OS account to be authenticated.
406761847f8eSopenharmony_ci     *
406861847f8eSopenharmony_ci     * @type { ?number }
406961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
407061847f8eSopenharmony_ci     * @systemapi
407161847f8eSopenharmony_ci     * @since 12
407261847f8eSopenharmony_ci     */
407361847f8eSopenharmony_ci    accountId?: number;
407461847f8eSopenharmony_ci
407561847f8eSopenharmony_ci    /**
407661847f8eSopenharmony_ci     * Indicates the authentication intent.
407761847f8eSopenharmony_ci     *
407861847f8eSopenharmony_ci     * @type { ?AuthIntent }
407961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
408061847f8eSopenharmony_ci     * @systemapi
408161847f8eSopenharmony_ci     * @since 12
408261847f8eSopenharmony_ci     */
408361847f8eSopenharmony_ci    authIntent?: AuthIntent;
408461847f8eSopenharmony_ci
408561847f8eSopenharmony_ci    /**
408661847f8eSopenharmony_ci     * Indicates the remote authentication options.
408761847f8eSopenharmony_ci     *
408861847f8eSopenharmony_ci     * @type { ?RemoteAuthOptions }
408961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
409061847f8eSopenharmony_ci     * @systemapi
409161847f8eSopenharmony_ci     * @since 12
409261847f8eSopenharmony_ci     */
409361847f8eSopenharmony_ci    remoteAuthOptions?: RemoteAuthOptions;
409461847f8eSopenharmony_ci  }
409561847f8eSopenharmony_ci
409661847f8eSopenharmony_ci  /**
409761847f8eSopenharmony_ci   * Password data callback.
409861847f8eSopenharmony_ci   *
409961847f8eSopenharmony_ci   * @interface IInputData
410061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
410161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
410261847f8eSopenharmony_ci   * @since 8
410361847f8eSopenharmony_ci   */
410461847f8eSopenharmony_ci  interface IInputData {
410561847f8eSopenharmony_ci    /**
410661847f8eSopenharmony_ci     * Notifies to set data.
410761847f8eSopenharmony_ci     *
410861847f8eSopenharmony_ci     * @type { function }
410961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system application.
411061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
411161847f8eSopenharmony_ci     * <br> 2. Incorrect parameter types.
411261847f8eSopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid pinSubType.
411361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
411461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
411561847f8eSopenharmony_ci     * @since 8
411661847f8eSopenharmony_ci     */
411761847f8eSopenharmony_ci    onSetData: (authSubType: AuthSubType, data: Uint8Array) => void;
411861847f8eSopenharmony_ci  }
411961847f8eSopenharmony_ci
412061847f8eSopenharmony_ci  /**
412161847f8eSopenharmony_ci   * Options for getting input data.
412261847f8eSopenharmony_ci   *
412361847f8eSopenharmony_ci   * @interface GetInputDataOptions
412461847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
412561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
412661847f8eSopenharmony_ci   * @since 12
412761847f8eSopenharmony_ci   */
412861847f8eSopenharmony_ci  interface GetInputDataOptions {
412961847f8eSopenharmony_ci    /**
413061847f8eSopenharmony_ci     * Indicates the challenge.
413161847f8eSopenharmony_ci     *
413261847f8eSopenharmony_ci     * @type { ?Uint8Array }
413361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
413461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
413561847f8eSopenharmony_ci     * @since 12
413661847f8eSopenharmony_ci     */
413761847f8eSopenharmony_ci    challenge?: Uint8Array;
413861847f8eSopenharmony_ci  }
413961847f8eSopenharmony_ci
414061847f8eSopenharmony_ci  /**
414161847f8eSopenharmony_ci   * Password input box callback.
414261847f8eSopenharmony_ci   *
414361847f8eSopenharmony_ci   * @interface IInputer
414461847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
414561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
414661847f8eSopenharmony_ci   * @since 8
414761847f8eSopenharmony_ci   */
414861847f8eSopenharmony_ci  interface IInputer {
414961847f8eSopenharmony_ci    /**
415061847f8eSopenharmony_ci     * Notifies to get data.
415161847f8eSopenharmony_ci     *
415261847f8eSopenharmony_ci     * @type { function }
415361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
415461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
415561847f8eSopenharmony_ci     * @since 8
415661847f8eSopenharmony_ci     */
415761847f8eSopenharmony_ci    onGetData: (authSubType: AuthSubType, callback: IInputData, options: GetInputDataOptions) => void;
415861847f8eSopenharmony_ci  }
415961847f8eSopenharmony_ci
416061847f8eSopenharmony_ci  /**
416161847f8eSopenharmony_ci   * User authentication callback.
416261847f8eSopenharmony_ci   *
416361847f8eSopenharmony_ci   * @interface IUserAuthCallback
416461847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
416561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
416661847f8eSopenharmony_ci   * @since 8
416761847f8eSopenharmony_ci   */
416861847f8eSopenharmony_ci  interface IUserAuthCallback {
416961847f8eSopenharmony_ci    /**
417061847f8eSopenharmony_ci     * The authentication result code is returned through the callback.
417161847f8eSopenharmony_ci     * If the authentication is passed, the authentication token is returned in extraInfo,
417261847f8eSopenharmony_ci     * If the authentication fails, the remaining authentication times are returned in extraInfo,
417361847f8eSopenharmony_ci     * If the authentication executor is locked, the freezing time is returned in extraInfo.
417461847f8eSopenharmony_ci     *
417561847f8eSopenharmony_ci     * @type { function }
417661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
417761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
417861847f8eSopenharmony_ci     * @since 8
417961847f8eSopenharmony_ci     */
418061847f8eSopenharmony_ci    onResult: (result: number, extraInfo: AuthResult) => void;
418161847f8eSopenharmony_ci
418261847f8eSopenharmony_ci    /**
418361847f8eSopenharmony_ci     * During an authentication, the TipsCode is returned through the callback.
418461847f8eSopenharmony_ci     *
418561847f8eSopenharmony_ci     * @type { ?function }
418661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
418761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
418861847f8eSopenharmony_ci     * @since 8
418961847f8eSopenharmony_ci     */
419061847f8eSopenharmony_ci    onAcquireInfo?: (module: number, acquire: number, extraInfo: Uint8Array) => void;
419161847f8eSopenharmony_ci  }
419261847f8eSopenharmony_ci
419361847f8eSopenharmony_ci  /**
419461847f8eSopenharmony_ci   * Identity manager callback.
419561847f8eSopenharmony_ci   *
419661847f8eSopenharmony_ci   * @interface IIdmCallback
419761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
419861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
419961847f8eSopenharmony_ci   * @since 8
420061847f8eSopenharmony_ci   */
420161847f8eSopenharmony_ci  interface IIdmCallback {
420261847f8eSopenharmony_ci    /**
420361847f8eSopenharmony_ci     * The authentication result code is returned through the callback.
420461847f8eSopenharmony_ci     *
420561847f8eSopenharmony_ci     * @type { function }
420661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
420761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
420861847f8eSopenharmony_ci     * @since 8
420961847f8eSopenharmony_ci     */
421061847f8eSopenharmony_ci    onResult: (result: number, extraInfo: RequestResult) => void;
421161847f8eSopenharmony_ci
421261847f8eSopenharmony_ci    /**
421361847f8eSopenharmony_ci     * During an authentication, the TipsCode is returned through the callback.
421461847f8eSopenharmony_ci     *
421561847f8eSopenharmony_ci     * @type { ?function }
421661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
421761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
421861847f8eSopenharmony_ci     * @since 8
421961847f8eSopenharmony_ci     */
422061847f8eSopenharmony_ci    onAcquireInfo?: (module: number, acquire: number, extraInfo: Uint8Array) => void;
422161847f8eSopenharmony_ci  }
422261847f8eSopenharmony_ci
422361847f8eSopenharmony_ci  /**
422461847f8eSopenharmony_ci   * Provides the information of the get property request.
422561847f8eSopenharmony_ci   *
422661847f8eSopenharmony_ci   * @interface GetPropertyRequest
422761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
422861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
422961847f8eSopenharmony_ci   * @since 8
423061847f8eSopenharmony_ci   */
423161847f8eSopenharmony_ci  interface GetPropertyRequest {
423261847f8eSopenharmony_ci    /**
423361847f8eSopenharmony_ci     * Indicates the authentication credential type.
423461847f8eSopenharmony_ci     *
423561847f8eSopenharmony_ci     * @type { AuthType }
423661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
423761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
423861847f8eSopenharmony_ci     * @since 8
423961847f8eSopenharmony_ci     */
424061847f8eSopenharmony_ci    authType: AuthType;
424161847f8eSopenharmony_ci
424261847f8eSopenharmony_ci    /**
424361847f8eSopenharmony_ci     * Indicates the array of property types to get.
424461847f8eSopenharmony_ci     *
424561847f8eSopenharmony_ci     * @type { Array<GetPropertyType> }
424661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
424761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
424861847f8eSopenharmony_ci     * @since 8
424961847f8eSopenharmony_ci     */
425061847f8eSopenharmony_ci    keys: Array<GetPropertyType>;
425161847f8eSopenharmony_ci
425261847f8eSopenharmony_ci    /**
425361847f8eSopenharmony_ci     * Indicates the OS account identifier.
425461847f8eSopenharmony_ci     *
425561847f8eSopenharmony_ci     * @type { ?number }
425661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
425761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
425861847f8eSopenharmony_ci     * @since 12
425961847f8eSopenharmony_ci     */
426061847f8eSopenharmony_ci    accountId?: number;
426161847f8eSopenharmony_ci  }
426261847f8eSopenharmony_ci
426361847f8eSopenharmony_ci  /**
426461847f8eSopenharmony_ci   * Provides the information of the set property request.
426561847f8eSopenharmony_ci   *
426661847f8eSopenharmony_ci   * @interface SetPropertyRequest
426761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
426861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
426961847f8eSopenharmony_ci   * @since 8
427061847f8eSopenharmony_ci   */
427161847f8eSopenharmony_ci  interface SetPropertyRequest {
427261847f8eSopenharmony_ci    /**
427361847f8eSopenharmony_ci     * Indicates the authentication credential type.
427461847f8eSopenharmony_ci     *
427561847f8eSopenharmony_ci     * @type { AuthType }
427661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
427761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
427861847f8eSopenharmony_ci     * @since 8
427961847f8eSopenharmony_ci     */
428061847f8eSopenharmony_ci    authType: AuthType;
428161847f8eSopenharmony_ci
428261847f8eSopenharmony_ci    /**
428361847f8eSopenharmony_ci     * Indicates the property type to set.
428461847f8eSopenharmony_ci     *
428561847f8eSopenharmony_ci     * @type { SetPropertyType }
428661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
428761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
428861847f8eSopenharmony_ci     * @since 8
428961847f8eSopenharmony_ci     */
429061847f8eSopenharmony_ci    key: SetPropertyType;
429161847f8eSopenharmony_ci
429261847f8eSopenharmony_ci    /**
429361847f8eSopenharmony_ci     * Indicates the information to set.
429461847f8eSopenharmony_ci     *
429561847f8eSopenharmony_ci     * @type { Uint8Array }
429661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
429761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
429861847f8eSopenharmony_ci     * @since 8
429961847f8eSopenharmony_ci     */
430061847f8eSopenharmony_ci    setInfo: Uint8Array;
430161847f8eSopenharmony_ci  }
430261847f8eSopenharmony_ci
430361847f8eSopenharmony_ci  /**
430461847f8eSopenharmony_ci   * Provides the property of executor.
430561847f8eSopenharmony_ci   *
430661847f8eSopenharmony_ci   * @interface ExecutorProperty
430761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
430861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
430961847f8eSopenharmony_ci   * @since 8
431061847f8eSopenharmony_ci   */
431161847f8eSopenharmony_ci  interface ExecutorProperty {
431261847f8eSopenharmony_ci    /**
431361847f8eSopenharmony_ci     * Indicates the result.
431461847f8eSopenharmony_ci     *
431561847f8eSopenharmony_ci     * @type { number }
431661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
431761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
431861847f8eSopenharmony_ci     * @since 8
431961847f8eSopenharmony_ci     */
432061847f8eSopenharmony_ci    result: number;
432161847f8eSopenharmony_ci
432261847f8eSopenharmony_ci    /**
432361847f8eSopenharmony_ci     * Indicates the authentication credential subtype.
432461847f8eSopenharmony_ci     *
432561847f8eSopenharmony_ci     * @type { AuthSubType }
432661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
432761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
432861847f8eSopenharmony_ci     * @since 8
432961847f8eSopenharmony_ci     */
433061847f8eSopenharmony_ci    authSubType: AuthSubType;
433161847f8eSopenharmony_ci
433261847f8eSopenharmony_ci    /**
433361847f8eSopenharmony_ci     * Indicates the remaining times.
433461847f8eSopenharmony_ci     *
433561847f8eSopenharmony_ci     * @type { ?number }
433661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
433761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
433861847f8eSopenharmony_ci     * @since 8
433961847f8eSopenharmony_ci     */
434061847f8eSopenharmony_ci    remainTimes?: number;
434161847f8eSopenharmony_ci
434261847f8eSopenharmony_ci    /**
434361847f8eSopenharmony_ci     * Indicates the freezing times.
434461847f8eSopenharmony_ci     *
434561847f8eSopenharmony_ci     * @type { ?number }
434661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
434761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
434861847f8eSopenharmony_ci     * @since 8
434961847f8eSopenharmony_ci     */
435061847f8eSopenharmony_ci    freezingTime?: number;
435161847f8eSopenharmony_ci
435261847f8eSopenharmony_ci    /**
435361847f8eSopenharmony_ci     * Indicates next phase freezing time.
435461847f8eSopenharmony_ci     *
435561847f8eSopenharmony_ci     * @type { ?number }
435661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
435761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
435861847f8eSopenharmony_ci     * @since 12
435961847f8eSopenharmony_ci     */
436061847f8eSopenharmony_ci    nextPhaseFreezingTime?: number;
436161847f8eSopenharmony_ci
436261847f8eSopenharmony_ci    /**
436361847f8eSopenharmony_ci     * Indicates the enrollment progress.
436461847f8eSopenharmony_ci     *
436561847f8eSopenharmony_ci     * @type { ?string }
436661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
436761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
436861847f8eSopenharmony_ci     * @since 10
436961847f8eSopenharmony_ci     */
437061847f8eSopenharmony_ci    enrollmentProgress?: string;
437161847f8eSopenharmony_ci
437261847f8eSopenharmony_ci    /**
437361847f8eSopenharmony_ci     * Indicates the sensor information.
437461847f8eSopenharmony_ci     *
437561847f8eSopenharmony_ci     * @type { ?string }
437661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
437761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
437861847f8eSopenharmony_ci     * @since 10
437961847f8eSopenharmony_ci     */
438061847f8eSopenharmony_ci    sensorInfo?: string;
438161847f8eSopenharmony_ci  }
438261847f8eSopenharmony_ci
438361847f8eSopenharmony_ci  /**
438461847f8eSopenharmony_ci   * Indicates the information of authentication result.
438561847f8eSopenharmony_ci   *
438661847f8eSopenharmony_ci   * @interface AuthResult
438761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
438861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
438961847f8eSopenharmony_ci   * @since 8
439061847f8eSopenharmony_ci   */
439161847f8eSopenharmony_ci  interface AuthResult {
439261847f8eSopenharmony_ci    /**
439361847f8eSopenharmony_ci     * Indicates the authentication token.
439461847f8eSopenharmony_ci     *
439561847f8eSopenharmony_ci     * @type { ?Uint8Array }
439661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
439761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
439861847f8eSopenharmony_ci     * @since 8
439961847f8eSopenharmony_ci     */
440061847f8eSopenharmony_ci    token?: Uint8Array;
440161847f8eSopenharmony_ci
440261847f8eSopenharmony_ci    /**
440361847f8eSopenharmony_ci     * Indicates the remaining times.
440461847f8eSopenharmony_ci     *
440561847f8eSopenharmony_ci     * @type { ?number }
440661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
440761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
440861847f8eSopenharmony_ci     * @since 8
440961847f8eSopenharmony_ci     */
441061847f8eSopenharmony_ci    remainTimes?: number;
441161847f8eSopenharmony_ci
441261847f8eSopenharmony_ci    /**
441361847f8eSopenharmony_ci     * Indicates the freezing times.
441461847f8eSopenharmony_ci     *
441561847f8eSopenharmony_ci     * @type { ?number }
441661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
441761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
441861847f8eSopenharmony_ci     * @since 8
441961847f8eSopenharmony_ci     */
442061847f8eSopenharmony_ci    freezingTime?: number;
442161847f8eSopenharmony_ci
442261847f8eSopenharmony_ci    /**
442361847f8eSopenharmony_ci     * Indicates next phase freezing time.
442461847f8eSopenharmony_ci     *
442561847f8eSopenharmony_ci     * @type { ?number }
442661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
442761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
442861847f8eSopenharmony_ci     * @since 12
442961847f8eSopenharmony_ci     */
443061847f8eSopenharmony_ci    nextPhaseFreezingTime?: number;
443161847f8eSopenharmony_ci
443261847f8eSopenharmony_ci    /**
443361847f8eSopenharmony_ci     * Indicates the credential ID.
443461847f8eSopenharmony_ci     *
443561847f8eSopenharmony_ci     * @type { ?Uint8Array }
443661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
443761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
443861847f8eSopenharmony_ci     * @since 12
443961847f8eSopenharmony_ci     */
444061847f8eSopenharmony_ci    credentialId?: Uint8Array;
444161847f8eSopenharmony_ci
444261847f8eSopenharmony_ci    /**
444361847f8eSopenharmony_ci     * Indicates the local ID of the authenticated OS account.
444461847f8eSopenharmony_ci     *
444561847f8eSopenharmony_ci     * @type { ?number }
444661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
444761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
444861847f8eSopenharmony_ci     * @since 12
444961847f8eSopenharmony_ci     */
445061847f8eSopenharmony_ci    accountId?: number;
445161847f8eSopenharmony_ci
445261847f8eSopenharmony_ci    /**
445361847f8eSopenharmony_ci     * Indicates the validity period after which the PIN will expire.
445461847f8eSopenharmony_ci     *
445561847f8eSopenharmony_ci     * @type { ?number }
445661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
445761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
445861847f8eSopenharmony_ci     * @since 12
445961847f8eSopenharmony_ci     */
446061847f8eSopenharmony_ci    pinValidityPeriod?: number;
446161847f8eSopenharmony_ci  }
446261847f8eSopenharmony_ci
446361847f8eSopenharmony_ci  /**
446461847f8eSopenharmony_ci   * Indicates the information of credential.
446561847f8eSopenharmony_ci   *
446661847f8eSopenharmony_ci   * @interface CredentialInfo
446761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
446861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
446961847f8eSopenharmony_ci   * @since 8
447061847f8eSopenharmony_ci   */
447161847f8eSopenharmony_ci  interface CredentialInfo {
447261847f8eSopenharmony_ci    /**
447361847f8eSopenharmony_ci     * Indicates the credential type.
447461847f8eSopenharmony_ci     *
447561847f8eSopenharmony_ci     * @type { AuthType }
447661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
447761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
447861847f8eSopenharmony_ci     * @since 8
447961847f8eSopenharmony_ci     */
448061847f8eSopenharmony_ci    credType: AuthType;
448161847f8eSopenharmony_ci
448261847f8eSopenharmony_ci    /**
448361847f8eSopenharmony_ci     * Indicates the credential subtype.
448461847f8eSopenharmony_ci     *
448561847f8eSopenharmony_ci     * @type { AuthSubType }
448661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
448761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
448861847f8eSopenharmony_ci     * @since 8
448961847f8eSopenharmony_ci     */
449061847f8eSopenharmony_ci    credSubType: AuthSubType;
449161847f8eSopenharmony_ci
449261847f8eSopenharmony_ci    /**
449361847f8eSopenharmony_ci     * Indicates the authentication token.
449461847f8eSopenharmony_ci     *
449561847f8eSopenharmony_ci     * @type { Uint8Array }
449661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
449761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
449861847f8eSopenharmony_ci     * @since 8
449961847f8eSopenharmony_ci     */
450061847f8eSopenharmony_ci    token: Uint8Array;
450161847f8eSopenharmony_ci
450261847f8eSopenharmony_ci    /**
450361847f8eSopenharmony_ci     * Indicates the local ID of the OS account to which the credential belongs.
450461847f8eSopenharmony_ci     *
450561847f8eSopenharmony_ci     * @type { ?number }
450661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
450761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
450861847f8eSopenharmony_ci     * @since 12
450961847f8eSopenharmony_ci     */
451061847f8eSopenharmony_ci    accountId?: number;
451161847f8eSopenharmony_ci  }
451261847f8eSopenharmony_ci
451361847f8eSopenharmony_ci  /**
451461847f8eSopenharmony_ci   * Indicates the information of request result.
451561847f8eSopenharmony_ci   *
451661847f8eSopenharmony_ci   * @interface RequestResult
451761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
451861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
451961847f8eSopenharmony_ci   * @since 8
452061847f8eSopenharmony_ci   */
452161847f8eSopenharmony_ci  interface RequestResult {
452261847f8eSopenharmony_ci    /**
452361847f8eSopenharmony_ci     * Indicates the credential index.
452461847f8eSopenharmony_ci     *
452561847f8eSopenharmony_ci     * @type { ?Uint8Array }
452661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
452761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
452861847f8eSopenharmony_ci     * @since 8
452961847f8eSopenharmony_ci     */
453061847f8eSopenharmony_ci    credentialId?: Uint8Array;
453161847f8eSopenharmony_ci  }
453261847f8eSopenharmony_ci
453361847f8eSopenharmony_ci  /**
453461847f8eSopenharmony_ci   * Indicates the information of enrolled credential.
453561847f8eSopenharmony_ci   *
453661847f8eSopenharmony_ci   * @interface EnrolledCredInfo
453761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
453861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
453961847f8eSopenharmony_ci   * @since 8
454061847f8eSopenharmony_ci   */
454161847f8eSopenharmony_ci  interface EnrolledCredInfo {
454261847f8eSopenharmony_ci    /**
454361847f8eSopenharmony_ci     * Indicates the credential index.
454461847f8eSopenharmony_ci     *
454561847f8eSopenharmony_ci     * @type { Uint8Array }
454661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
454761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
454861847f8eSopenharmony_ci     * @since 8
454961847f8eSopenharmony_ci     */
455061847f8eSopenharmony_ci    credentialId: Uint8Array;
455161847f8eSopenharmony_ci
455261847f8eSopenharmony_ci    /**
455361847f8eSopenharmony_ci     * Indicates the authentication credential type.
455461847f8eSopenharmony_ci     *
455561847f8eSopenharmony_ci     * @type { AuthType }
455661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
455761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
455861847f8eSopenharmony_ci     * @since 8
455961847f8eSopenharmony_ci     */
456061847f8eSopenharmony_ci    authType: AuthType;
456161847f8eSopenharmony_ci
456261847f8eSopenharmony_ci    /**
456361847f8eSopenharmony_ci     * Indicates the authentication credential subtype.
456461847f8eSopenharmony_ci     *
456561847f8eSopenharmony_ci     * @type { AuthSubType }
456661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
456761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
456861847f8eSopenharmony_ci     * @since 8
456961847f8eSopenharmony_ci     */
457061847f8eSopenharmony_ci    authSubType: AuthSubType;
457161847f8eSopenharmony_ci
457261847f8eSopenharmony_ci    /**
457361847f8eSopenharmony_ci     * Indicates the credential template ID.
457461847f8eSopenharmony_ci     *
457561847f8eSopenharmony_ci     * @type { Uint8Array }
457661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
457761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
457861847f8eSopenharmony_ci     * @since 8
457961847f8eSopenharmony_ci     */
458061847f8eSopenharmony_ci    templateId: Uint8Array;
458161847f8eSopenharmony_ci  }
458261847f8eSopenharmony_ci
458361847f8eSopenharmony_ci  /**
458461847f8eSopenharmony_ci   * Indicates the property type to get.
458561847f8eSopenharmony_ci   *
458661847f8eSopenharmony_ci   * @enum { number } GetPropertyType
458761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
458861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
458961847f8eSopenharmony_ci   * @since 8
459061847f8eSopenharmony_ci   */
459161847f8eSopenharmony_ci  enum GetPropertyType {
459261847f8eSopenharmony_ci    /**
459361847f8eSopenharmony_ci     * Indicates the authentication subtype.
459461847f8eSopenharmony_ci     *
459561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
459661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
459761847f8eSopenharmony_ci     * @since 8
459861847f8eSopenharmony_ci     */
459961847f8eSopenharmony_ci    AUTH_SUB_TYPE = 1,
460061847f8eSopenharmony_ci
460161847f8eSopenharmony_ci    /**
460261847f8eSopenharmony_ci     * Indicates the remain times.
460361847f8eSopenharmony_ci     *
460461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
460561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
460661847f8eSopenharmony_ci     * @since 8
460761847f8eSopenharmony_ci     */
460861847f8eSopenharmony_ci    REMAIN_TIMES = 2,
460961847f8eSopenharmony_ci
461061847f8eSopenharmony_ci    /**
461161847f8eSopenharmony_ci     * Indicates the freezing time.
461261847f8eSopenharmony_ci     *
461361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
461461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
461561847f8eSopenharmony_ci     * @since 8
461661847f8eSopenharmony_ci     */
461761847f8eSopenharmony_ci    FREEZING_TIME = 3,
461861847f8eSopenharmony_ci
461961847f8eSopenharmony_ci    /**
462061847f8eSopenharmony_ci     * Indicates the enrollment progress.
462161847f8eSopenharmony_ci     *
462261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
462361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
462461847f8eSopenharmony_ci     * @since 10
462561847f8eSopenharmony_ci     */
462661847f8eSopenharmony_ci    ENROLLMENT_PROGRESS = 4,
462761847f8eSopenharmony_ci
462861847f8eSopenharmony_ci    /**
462961847f8eSopenharmony_ci     * Indicates the sensor information.
463061847f8eSopenharmony_ci     *
463161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
463261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
463361847f8eSopenharmony_ci     * @since 10
463461847f8eSopenharmony_ci     */
463561847f8eSopenharmony_ci    SENSOR_INFO = 5,
463661847f8eSopenharmony_ci
463761847f8eSopenharmony_ci    /**
463861847f8eSopenharmony_ci     * Indicates the next phase freezing time.
463961847f8eSopenharmony_ci     *
464061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
464161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
464261847f8eSopenharmony_ci     * @since 12
464361847f8eSopenharmony_ci     */
464461847f8eSopenharmony_ci    NEXT_PHASE_FREEZING_TIME = 6
464561847f8eSopenharmony_ci  }
464661847f8eSopenharmony_ci
464761847f8eSopenharmony_ci  /**
464861847f8eSopenharmony_ci   * Indicates the property type to set.
464961847f8eSopenharmony_ci   *
465061847f8eSopenharmony_ci   * @enum { number } SetPropertyType
465161847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
465261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
465361847f8eSopenharmony_ci   * @since 8
465461847f8eSopenharmony_ci   */
465561847f8eSopenharmony_ci  enum SetPropertyType {
465661847f8eSopenharmony_ci    /**
465761847f8eSopenharmony_ci     * Indicates the init algorithm.
465861847f8eSopenharmony_ci     *
465961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
466061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
466161847f8eSopenharmony_ci     * @since 8
466261847f8eSopenharmony_ci     */
466361847f8eSopenharmony_ci    INIT_ALGORITHM = 1
466461847f8eSopenharmony_ci  }
466561847f8eSopenharmony_ci
466661847f8eSopenharmony_ci  /**
466761847f8eSopenharmony_ci   * Indicates the credential type for authentication.
466861847f8eSopenharmony_ci   *
466961847f8eSopenharmony_ci   * @enum { number } AuthType
467061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
467161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
467261847f8eSopenharmony_ci   * @since 8
467361847f8eSopenharmony_ci   */
467461847f8eSopenharmony_ci  enum AuthType {
467561847f8eSopenharmony_ci    /**
467661847f8eSopenharmony_ci     * Indicates the PIN authentication type.
467761847f8eSopenharmony_ci     *
467861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
467961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
468061847f8eSopenharmony_ci     * @since 8
468161847f8eSopenharmony_ci     */
468261847f8eSopenharmony_ci    PIN = 1,
468361847f8eSopenharmony_ci
468461847f8eSopenharmony_ci    /**
468561847f8eSopenharmony_ci     * Indicates the FACE authentication type.
468661847f8eSopenharmony_ci     *
468761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
468861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
468961847f8eSopenharmony_ci     * @since 8
469061847f8eSopenharmony_ci     */
469161847f8eSopenharmony_ci    FACE = 2,
469261847f8eSopenharmony_ci
469361847f8eSopenharmony_ci    /**
469461847f8eSopenharmony_ci     * Indicates the FINGERPRINT authentication type.
469561847f8eSopenharmony_ci     *
469661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
469761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
469861847f8eSopenharmony_ci     * @since 10
469961847f8eSopenharmony_ci     */
470061847f8eSopenharmony_ci    FINGERPRINT = 4,
470161847f8eSopenharmony_ci
470261847f8eSopenharmony_ci    /**
470361847f8eSopenharmony_ci     * Indicates the RECOVERY_KEY authentication type.
470461847f8eSopenharmony_ci     *
470561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
470661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
470761847f8eSopenharmony_ci     * @since 12
470861847f8eSopenharmony_ci     */
470961847f8eSopenharmony_ci    RECOVERY_KEY = 8,
471061847f8eSopenharmony_ci
471161847f8eSopenharmony_ci    /**
471261847f8eSopenharmony_ci     * Indicates the DOMAIN authentication type.
471361847f8eSopenharmony_ci     *
471461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
471561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
471661847f8eSopenharmony_ci     * @since 9
471761847f8eSopenharmony_ci     */
471861847f8eSopenharmony_ci    DOMAIN = 1024
471961847f8eSopenharmony_ci  }
472061847f8eSopenharmony_ci
472161847f8eSopenharmony_ci  /**
472261847f8eSopenharmony_ci   * Indicates the credential subtype for authentication.
472361847f8eSopenharmony_ci   *
472461847f8eSopenharmony_ci   * @enum { number } AuthSubType
472561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
472661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
472761847f8eSopenharmony_ci   * @since 8
472861847f8eSopenharmony_ci   */
472961847f8eSopenharmony_ci  enum AuthSubType {
473061847f8eSopenharmony_ci    /**
473161847f8eSopenharmony_ci     * Indicates the 6-digit credential.
473261847f8eSopenharmony_ci     *
473361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
473461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
473561847f8eSopenharmony_ci     * @since 8
473661847f8eSopenharmony_ci     */
473761847f8eSopenharmony_ci    PIN_SIX = 10000,
473861847f8eSopenharmony_ci
473961847f8eSopenharmony_ci    /**
474061847f8eSopenharmony_ci     * Indicates the self-defined digital credential.
474161847f8eSopenharmony_ci     *
474261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
474361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
474461847f8eSopenharmony_ci     * @since 8
474561847f8eSopenharmony_ci     */
474661847f8eSopenharmony_ci    PIN_NUMBER = 10001,
474761847f8eSopenharmony_ci
474861847f8eSopenharmony_ci    /**
474961847f8eSopenharmony_ci     * Indicates the self-defined mixed credential.
475061847f8eSopenharmony_ci     *
475161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
475261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
475361847f8eSopenharmony_ci     * @since 8
475461847f8eSopenharmony_ci     */
475561847f8eSopenharmony_ci    PIN_MIXED = 10002,
475661847f8eSopenharmony_ci
475761847f8eSopenharmony_ci    /**
475861847f8eSopenharmony_ci     * Indicates the 4-digit credential.
475961847f8eSopenharmony_ci     *
476061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
476161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
476261847f8eSopenharmony_ci     * @since 12
476361847f8eSopenharmony_ci     */
476461847f8eSopenharmony_ci    PIN_FOUR = 10003,
476561847f8eSopenharmony_ci
476661847f8eSopenharmony_ci    /**
476761847f8eSopenharmony_ci     * Indicates the pattern credential.
476861847f8eSopenharmony_ci     *
476961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
477061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
477161847f8eSopenharmony_ci     * @since 12
477261847f8eSopenharmony_ci     */
477361847f8eSopenharmony_ci    PIN_PATTERN = 10004,
477461847f8eSopenharmony_ci
477561847f8eSopenharmony_ci    /**
477661847f8eSopenharmony_ci     * Indicates the 2D face credential.
477761847f8eSopenharmony_ci     *
477861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
477961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
478061847f8eSopenharmony_ci     * @since 8
478161847f8eSopenharmony_ci     */
478261847f8eSopenharmony_ci    FACE_2D = 20000,
478361847f8eSopenharmony_ci
478461847f8eSopenharmony_ci    /**
478561847f8eSopenharmony_ci     * Indicates the 3D face credential.
478661847f8eSopenharmony_ci     *
478761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
478861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
478961847f8eSopenharmony_ci     * @since 8
479061847f8eSopenharmony_ci     */
479161847f8eSopenharmony_ci    FACE_3D = 20001,
479261847f8eSopenharmony_ci
479361847f8eSopenharmony_ci    /**
479461847f8eSopenharmony_ci     * Indicates the capacitive fingerprint credential.
479561847f8eSopenharmony_ci     *
479661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
479761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
479861847f8eSopenharmony_ci     * @since 10
479961847f8eSopenharmony_ci     */
480061847f8eSopenharmony_ci    FINGERPRINT_CAPACITIVE = 30000,
480161847f8eSopenharmony_ci
480261847f8eSopenharmony_ci    /**
480361847f8eSopenharmony_ci     * Indicates the optical fingerprint credential.
480461847f8eSopenharmony_ci     *
480561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
480661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
480761847f8eSopenharmony_ci     * @since 10
480861847f8eSopenharmony_ci     */
480961847f8eSopenharmony_ci    FINGERPRINT_OPTICAL = 30001,
481061847f8eSopenharmony_ci
481161847f8eSopenharmony_ci    /**
481261847f8eSopenharmony_ci     * Indicates the ultrasonic fingerprint credential.
481361847f8eSopenharmony_ci     *
481461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
481561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
481661847f8eSopenharmony_ci     * @since 10
481761847f8eSopenharmony_ci     */
481861847f8eSopenharmony_ci    FINGERPRINT_ULTRASONIC = 30002,
481961847f8eSopenharmony_ci
482061847f8eSopenharmony_ci    /**
482161847f8eSopenharmony_ci     * Indicates the mixed domain credential.
482261847f8eSopenharmony_ci     *
482361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
482461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
482561847f8eSopenharmony_ci     * @since 9
482661847f8eSopenharmony_ci     */
482761847f8eSopenharmony_ci    DOMAIN_MIXED = 10240001
482861847f8eSopenharmony_ci  }
482961847f8eSopenharmony_ci
483061847f8eSopenharmony_ci  /**
483161847f8eSopenharmony_ci   * Indicates the trusted level of authentication results.
483261847f8eSopenharmony_ci   *
483361847f8eSopenharmony_ci   * @enum { number } AuthTrustLevel
483461847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
483561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
483661847f8eSopenharmony_ci   * @since 8
483761847f8eSopenharmony_ci   */
483861847f8eSopenharmony_ci  enum AuthTrustLevel {
483961847f8eSopenharmony_ci    /**
484061847f8eSopenharmony_ci     * Indicates the trusted level 1.
484161847f8eSopenharmony_ci     *
484261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
484361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
484461847f8eSopenharmony_ci     * @since 8
484561847f8eSopenharmony_ci     */
484661847f8eSopenharmony_ci    ATL1 = 10000,
484761847f8eSopenharmony_ci
484861847f8eSopenharmony_ci    /**
484961847f8eSopenharmony_ci     * Indicates the trusted level 2.
485061847f8eSopenharmony_ci     *
485161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
485261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
485361847f8eSopenharmony_ci     * @since 8
485461847f8eSopenharmony_ci     */
485561847f8eSopenharmony_ci    ATL2 = 20000,
485661847f8eSopenharmony_ci
485761847f8eSopenharmony_ci    /**
485861847f8eSopenharmony_ci     * Indicates the trusted level 3.
485961847f8eSopenharmony_ci     *
486061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
486161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
486261847f8eSopenharmony_ci     * @since 8
486361847f8eSopenharmony_ci     */
486461847f8eSopenharmony_ci    ATL3 = 30000,
486561847f8eSopenharmony_ci
486661847f8eSopenharmony_ci    /**
486761847f8eSopenharmony_ci     * Indicates the trusted level 4.
486861847f8eSopenharmony_ci     *
486961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
487061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
487161847f8eSopenharmony_ci     * @since 8
487261847f8eSopenharmony_ci     */
487361847f8eSopenharmony_ci    ATL4 = 40000
487461847f8eSopenharmony_ci  }
487561847f8eSopenharmony_ci
487661847f8eSopenharmony_ci  /**
487761847f8eSopenharmony_ci   * Indicates the module of acquired information.
487861847f8eSopenharmony_ci   *
487961847f8eSopenharmony_ci   * @enum { number } Module
488061847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
488161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
488261847f8eSopenharmony_ci   * @since 8
488361847f8eSopenharmony_ci   */
488461847f8eSopenharmony_ci  enum Module {
488561847f8eSopenharmony_ci    /**
488661847f8eSopenharmony_ci     * Indicates the information acquired from FaceAuth.
488761847f8eSopenharmony_ci     *
488861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
488961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
489061847f8eSopenharmony_ci     * @since 8
489161847f8eSopenharmony_ci     */
489261847f8eSopenharmony_ci    FACE_AUTH = 1
489361847f8eSopenharmony_ci  }
489461847f8eSopenharmony_ci
489561847f8eSopenharmony_ci  /**
489661847f8eSopenharmony_ci   * Indicates the enumeration of authentication result code.
489761847f8eSopenharmony_ci   *
489861847f8eSopenharmony_ci   * @enum { number } ResultCode
489961847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
490061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
490161847f8eSopenharmony_ci   * @since 8
490261847f8eSopenharmony_ci   */
490361847f8eSopenharmony_ci  enum ResultCode {
490461847f8eSopenharmony_ci    /**
490561847f8eSopenharmony_ci     * Indicates that authentication is success or ability is supported.
490661847f8eSopenharmony_ci     *
490761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
490861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
490961847f8eSopenharmony_ci     * @since 8
491061847f8eSopenharmony_ci     */
491161847f8eSopenharmony_ci    SUCCESS = 0,
491261847f8eSopenharmony_ci
491361847f8eSopenharmony_ci    /**
491461847f8eSopenharmony_ci     * Indicates the authenticator fails to identify user.
491561847f8eSopenharmony_ci     *
491661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
491761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
491861847f8eSopenharmony_ci     * @since 8
491961847f8eSopenharmony_ci     */
492061847f8eSopenharmony_ci    FAIL = 1,
492161847f8eSopenharmony_ci
492261847f8eSopenharmony_ci    /**
492361847f8eSopenharmony_ci     * Indicates other errors.
492461847f8eSopenharmony_ci     *
492561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
492661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
492761847f8eSopenharmony_ci     * @since 8
492861847f8eSopenharmony_ci     */
492961847f8eSopenharmony_ci    GENERAL_ERROR = 2,
493061847f8eSopenharmony_ci
493161847f8eSopenharmony_ci    /**
493261847f8eSopenharmony_ci     * Indicates that authentication has been canceled.
493361847f8eSopenharmony_ci     *
493461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
493561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
493661847f8eSopenharmony_ci     * @since 8
493761847f8eSopenharmony_ci     */
493861847f8eSopenharmony_ci    CANCELED = 3,
493961847f8eSopenharmony_ci
494061847f8eSopenharmony_ci    /**
494161847f8eSopenharmony_ci     * Indicates that authentication has timed out.
494261847f8eSopenharmony_ci     *
494361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
494461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
494561847f8eSopenharmony_ci     * @since 8
494661847f8eSopenharmony_ci     */
494761847f8eSopenharmony_ci    TIMEOUT = 4,
494861847f8eSopenharmony_ci
494961847f8eSopenharmony_ci    /**
495061847f8eSopenharmony_ci     * Indicates that this authentication type is not supported.
495161847f8eSopenharmony_ci     *
495261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
495361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
495461847f8eSopenharmony_ci     * @since 8
495561847f8eSopenharmony_ci     */
495661847f8eSopenharmony_ci    TYPE_NOT_SUPPORT = 5,
495761847f8eSopenharmony_ci
495861847f8eSopenharmony_ci    /**
495961847f8eSopenharmony_ci     * Indicates that the authentication trust level is not supported.
496061847f8eSopenharmony_ci     *
496161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
496261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
496361847f8eSopenharmony_ci     * @since 8
496461847f8eSopenharmony_ci     */
496561847f8eSopenharmony_ci    TRUST_LEVEL_NOT_SUPPORT = 6,
496661847f8eSopenharmony_ci
496761847f8eSopenharmony_ci    /**
496861847f8eSopenharmony_ci     * Indicates that the authentication task is busy. Wait for a few seconds and try again.
496961847f8eSopenharmony_ci     *
497061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
497161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
497261847f8eSopenharmony_ci     * @since 8
497361847f8eSopenharmony_ci     */
497461847f8eSopenharmony_ci    BUSY = 7,
497561847f8eSopenharmony_ci
497661847f8eSopenharmony_ci    /**
497761847f8eSopenharmony_ci     * Indicates incorrect parameters.
497861847f8eSopenharmony_ci     *
497961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
498061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
498161847f8eSopenharmony_ci     * @since 8
498261847f8eSopenharmony_ci     */
498361847f8eSopenharmony_ci    INVALID_PARAMETERS = 8,
498461847f8eSopenharmony_ci
498561847f8eSopenharmony_ci    /**
498661847f8eSopenharmony_ci     * Indicates that the authenticator is locked.
498761847f8eSopenharmony_ci     *
498861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
498961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
499061847f8eSopenharmony_ci     * @since 8
499161847f8eSopenharmony_ci     */
499261847f8eSopenharmony_ci    LOCKED = 9,
499361847f8eSopenharmony_ci
499461847f8eSopenharmony_ci    /**
499561847f8eSopenharmony_ci     * Indicates that the user has not enrolled the authenticator.
499661847f8eSopenharmony_ci     *
499761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
499861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
499961847f8eSopenharmony_ci     * @since 8
500061847f8eSopenharmony_ci     */
500161847f8eSopenharmony_ci    NOT_ENROLLED = 10
500261847f8eSopenharmony_ci  }
500361847f8eSopenharmony_ci
500461847f8eSopenharmony_ci  /**
500561847f8eSopenharmony_ci   * Indicates the enumeration of prompt codes in the process of face authentication.
500661847f8eSopenharmony_ci   *
500761847f8eSopenharmony_ci   * @enum { number } FaceTipsCode
500861847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
500961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
501061847f8eSopenharmony_ci   * @since 8
501161847f8eSopenharmony_ci   */
501261847f8eSopenharmony_ci  enum FaceTipsCode {
501361847f8eSopenharmony_ci    /**
501461847f8eSopenharmony_ci     * Indicates that the obtained facial image is too bright due to high illumination.
501561847f8eSopenharmony_ci     *
501661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
501761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
501861847f8eSopenharmony_ci     * @since 8
501961847f8eSopenharmony_ci     */
502061847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_BRIGHT = 1,
502161847f8eSopenharmony_ci
502261847f8eSopenharmony_ci    /**
502361847f8eSopenharmony_ci     * Indicates that the obtained facial image is too dark due to low illumination.
502461847f8eSopenharmony_ci     *
502561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
502661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
502761847f8eSopenharmony_ci     * @since 8
502861847f8eSopenharmony_ci     */
502961847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_DARK = 2,
503061847f8eSopenharmony_ci
503161847f8eSopenharmony_ci    /**
503261847f8eSopenharmony_ci     * Indicates that the face is too close to the device.
503361847f8eSopenharmony_ci     *
503461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
503561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
503661847f8eSopenharmony_ci     * @since 8
503761847f8eSopenharmony_ci     */
503861847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_CLOSE = 3,
503961847f8eSopenharmony_ci
504061847f8eSopenharmony_ci    /**
504161847f8eSopenharmony_ci     * Indicates that the face is too far away from the device.
504261847f8eSopenharmony_ci     *
504361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
504461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
504561847f8eSopenharmony_ci     * @since 8
504661847f8eSopenharmony_ci     */
504761847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_FAR = 4,
504861847f8eSopenharmony_ci
504961847f8eSopenharmony_ci    /**
505061847f8eSopenharmony_ci     * Indicates that the device is too high, and that only the upper part of the face is captured.
505161847f8eSopenharmony_ci     *
505261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
505361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
505461847f8eSopenharmony_ci     * @since 8
505561847f8eSopenharmony_ci     */
505661847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_HIGH = 5,
505761847f8eSopenharmony_ci
505861847f8eSopenharmony_ci    /**
505961847f8eSopenharmony_ci     * Indicates that the device is too low, and that only the lower part of the face is captured.
506061847f8eSopenharmony_ci     *
506161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
506261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
506361847f8eSopenharmony_ci     * @since 8
506461847f8eSopenharmony_ci     */
506561847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_LOW = 6,
506661847f8eSopenharmony_ci
506761847f8eSopenharmony_ci    /**
506861847f8eSopenharmony_ci     * Indicates that the device is deviated to the right, and that only the right part of the face is captured.
506961847f8eSopenharmony_ci     *
507061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
507161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
507261847f8eSopenharmony_ci     * @since 8
507361847f8eSopenharmony_ci     */
507461847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_RIGHT = 7,
507561847f8eSopenharmony_ci
507661847f8eSopenharmony_ci    /**
507761847f8eSopenharmony_ci     * Indicates that the device is deviated to the left, and that only the left part of the face is captured.
507861847f8eSopenharmony_ci     *
507961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
508061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
508161847f8eSopenharmony_ci     * @since 8
508261847f8eSopenharmony_ci     */
508361847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_LEFT = 8,
508461847f8eSopenharmony_ci
508561847f8eSopenharmony_ci    /**
508661847f8eSopenharmony_ci     * Indicates that the face moves too fast during facial information collection.
508761847f8eSopenharmony_ci     *
508861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
508961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
509061847f8eSopenharmony_ci     * @since 8
509161847f8eSopenharmony_ci     */
509261847f8eSopenharmony_ci    FACE_AUTH_TIP_TOO_MUCH_MOTION = 9,
509361847f8eSopenharmony_ci
509461847f8eSopenharmony_ci    /**
509561847f8eSopenharmony_ci     * Indicates that the face is not facing the device.
509661847f8eSopenharmony_ci     *
509761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
509861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
509961847f8eSopenharmony_ci     * @since 8
510061847f8eSopenharmony_ci     */
510161847f8eSopenharmony_ci    FACE_AUTH_TIP_POOR_GAZE = 10,
510261847f8eSopenharmony_ci
510361847f8eSopenharmony_ci    /**
510461847f8eSopenharmony_ci     * Indicates that no face is detected.
510561847f8eSopenharmony_ci     *
510661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
510761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
510861847f8eSopenharmony_ci     * @since 8
510961847f8eSopenharmony_ci     */
511061847f8eSopenharmony_ci    FACE_AUTH_TIP_NOT_DETECTED = 11
511161847f8eSopenharmony_ci  }
511261847f8eSopenharmony_ci
511361847f8eSopenharmony_ci  /**
511461847f8eSopenharmony_ci   * Indicates the enumeration of prompt codes in the process of fingerprint authentication.
511561847f8eSopenharmony_ci   *
511661847f8eSopenharmony_ci   * @enum { number } FingerprintTips
511761847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
511861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
511961847f8eSopenharmony_ci   * @since 8
512061847f8eSopenharmony_ci   */
512161847f8eSopenharmony_ci  enum FingerprintTips {
512261847f8eSopenharmony_ci    /**
512361847f8eSopenharmony_ci     * Indicates that the image acquired is good.
512461847f8eSopenharmony_ci     *
512561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
512661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
512761847f8eSopenharmony_ci     * @since 8
512861847f8eSopenharmony_ci     */
512961847f8eSopenharmony_ci    FINGERPRINT_TIP_GOOD = 0,
513061847f8eSopenharmony_ci
513161847f8eSopenharmony_ci    /**
513261847f8eSopenharmony_ci     * Indicates that the fingerprint image is too noisy due to suspected or detected dirt on the sensor.
513361847f8eSopenharmony_ci     *
513461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
513561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
513661847f8eSopenharmony_ci     * @since 8
513761847f8eSopenharmony_ci     */
513861847f8eSopenharmony_ci    FINGERPRINT_TIP_IMAGER_DIRTY = 1,
513961847f8eSopenharmony_ci
514061847f8eSopenharmony_ci    /**
514161847f8eSopenharmony_ci     * Indicates that the fingerprint image is too noisy to process due to a detected condition.
514261847f8eSopenharmony_ci     *
514361847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
514461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
514561847f8eSopenharmony_ci     * @since 8
514661847f8eSopenharmony_ci     */
514761847f8eSopenharmony_ci    FINGERPRINT_TIP_INSUFFICIENT = 2,
514861847f8eSopenharmony_ci
514961847f8eSopenharmony_ci    /**
515061847f8eSopenharmony_ci     * Indicates that only a partial fingerprint image is detected.
515161847f8eSopenharmony_ci     *
515261847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
515361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
515461847f8eSopenharmony_ci     * @since 8
515561847f8eSopenharmony_ci     */
515661847f8eSopenharmony_ci    FINGERPRINT_TIP_PARTIAL = 3,
515761847f8eSopenharmony_ci
515861847f8eSopenharmony_ci    /**
515961847f8eSopenharmony_ci     * Indicates that the fingerprint image is incomplete due to quick motion.
516061847f8eSopenharmony_ci     *
516161847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
516261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
516361847f8eSopenharmony_ci     * @since 8
516461847f8eSopenharmony_ci     */
516561847f8eSopenharmony_ci    FINGERPRINT_TIP_TOO_FAST = 4,
516661847f8eSopenharmony_ci
516761847f8eSopenharmony_ci    /**
516861847f8eSopenharmony_ci     * Indicates that the fingerprint image is unreadable due to lack of motion.
516961847f8eSopenharmony_ci     *
517061847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
517161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
517261847f8eSopenharmony_ci     * @since 8
517361847f8eSopenharmony_ci     */
517461847f8eSopenharmony_ci    FINGERPRINT_TIP_TOO_SLOW = 5,
517561847f8eSopenharmony_ci
517661847f8eSopenharmony_ci    /**
517761847f8eSopenharmony_ci     * Indicates that the finger is down.
517861847f8eSopenharmony_ci     *
517961847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
518061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
518161847f8eSopenharmony_ci     * @since 10
518261847f8eSopenharmony_ci     */
518361847f8eSopenharmony_ci    FINGERPRINT_TIP_FINGER_DOWN = 6,
518461847f8eSopenharmony_ci
518561847f8eSopenharmony_ci    /**
518661847f8eSopenharmony_ci     * Indicates that the finger is up.
518761847f8eSopenharmony_ci     *
518861847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
518961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
519061847f8eSopenharmony_ci     * @since 10
519161847f8eSopenharmony_ci     */
519261847f8eSopenharmony_ci    FINGERPRINT_TIP_FINGER_UP = 7
519361847f8eSopenharmony_ci  }
519461847f8eSopenharmony_ci
519561847f8eSopenharmony_ci  /**
519661847f8eSopenharmony_ci   * Enumerates for constraint source types.
519761847f8eSopenharmony_ci   *
519861847f8eSopenharmony_ci   * @enum { number } ConstraintSourceType
519961847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
520061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
520161847f8eSopenharmony_ci   * @since 9
520261847f8eSopenharmony_ci   */
520361847f8eSopenharmony_ci  enum ConstraintSourceType {
520461847f8eSopenharmony_ci    /**
520561847f8eSopenharmony_ci     * No constraints are set
520661847f8eSopenharmony_ci     *
520761847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
520861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
520961847f8eSopenharmony_ci     * @since 9
521061847f8eSopenharmony_ci     */
521161847f8eSopenharmony_ci    CONSTRAINT_NOT_EXIST = 0,
521261847f8eSopenharmony_ci
521361847f8eSopenharmony_ci    /**
521461847f8eSopenharmony_ci     * Constraint is set by setOsAccountConstraints
521561847f8eSopenharmony_ci     *
521661847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
521761847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
521861847f8eSopenharmony_ci     * @since 9
521961847f8eSopenharmony_ci     */
522061847f8eSopenharmony_ci    CONSTRAINT_TYPE_BASE = 1,
522161847f8eSopenharmony_ci
522261847f8eSopenharmony_ci    /**
522361847f8eSopenharmony_ci     * Constraint is set by device owner
522461847f8eSopenharmony_ci     *
522561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
522661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
522761847f8eSopenharmony_ci     * @since 9
522861847f8eSopenharmony_ci     */
522961847f8eSopenharmony_ci    CONSTRAINT_TYPE_DEVICE_OWNER = 2,
523061847f8eSopenharmony_ci
523161847f8eSopenharmony_ci    /**
523261847f8eSopenharmony_ci     * Constraint is set by profile owner
523361847f8eSopenharmony_ci     *
523461847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
523561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
523661847f8eSopenharmony_ci     * @since 9
523761847f8eSopenharmony_ci     */
523861847f8eSopenharmony_ci    CONSTRAINT_TYPE_PROFILE_OWNER = 3
523961847f8eSopenharmony_ci  }
524061847f8eSopenharmony_ci
524161847f8eSopenharmony_ci  /**
524261847f8eSopenharmony_ci   * Provides information about the constraint source type info of an os account.
524361847f8eSopenharmony_ci   *
524461847f8eSopenharmony_ci   * @interface ConstraintSourceTypeInfo
524561847f8eSopenharmony_ci   * @syscap SystemCapability.Account.OsAccount
524661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
524761847f8eSopenharmony_ci   * @since 9
524861847f8eSopenharmony_ci   */
524961847f8eSopenharmony_ci  interface ConstraintSourceTypeInfo {
525061847f8eSopenharmony_ci    /**
525161847f8eSopenharmony_ci     * Indicates the id of an os account who set the constraint.
525261847f8eSopenharmony_ci     * When type is CONSTRAINT_NOT_EXIST or CONSTRAINT_TYPE_BASE, localId will be -1.
525361847f8eSopenharmony_ci     *
525461847f8eSopenharmony_ci     * @type { number }
525561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
525661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
525761847f8eSopenharmony_ci     * @since 9
525861847f8eSopenharmony_ci     */
525961847f8eSopenharmony_ci    localId: number;
526061847f8eSopenharmony_ci
526161847f8eSopenharmony_ci    /**
526261847f8eSopenharmony_ci     * Indicates the source type of the constraint.
526361847f8eSopenharmony_ci     *
526461847f8eSopenharmony_ci     * @type { ConstraintSourceType }
526561847f8eSopenharmony_ci     * @syscap SystemCapability.Account.OsAccount
526661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
526761847f8eSopenharmony_ci     * @since 9
526861847f8eSopenharmony_ci     */
526961847f8eSopenharmony_ci    type: ConstraintSourceType;
527061847f8eSopenharmony_ci  }
527161847f8eSopenharmony_ci}
527261847f8eSopenharmony_ci
527361847f8eSopenharmony_ciexport default osAccount;