17c804472Sopenharmony_ci/*
27c804472Sopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
37c804472Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47c804472Sopenharmony_ci * you may not use this file except in compliance with the License.
57c804472Sopenharmony_ci * You may obtain a copy of the License at
67c804472Sopenharmony_ci *
77c804472Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87c804472Sopenharmony_ci *
97c804472Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107c804472Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117c804472Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127c804472Sopenharmony_ci * See the License for the specific language governing permissions and
137c804472Sopenharmony_ci * limitations under the License.
147c804472Sopenharmony_ci */
157c804472Sopenharmony_ci
167c804472Sopenharmony_ci/**
177c804472Sopenharmony_ci * @file
187c804472Sopenharmony_ci * @kit BasicServicesKit
197c804472Sopenharmony_ci */
207c804472Sopenharmony_ci
217c804472Sopenharmony_ciimport type { AsyncCallback, Callback } from './@ohos.base';
227c804472Sopenharmony_ciimport type Want from './@ohos.app.ability.Want';
237c804472Sopenharmony_ciimport type rpc from './@ohos.rpc';
247c804472Sopenharmony_ci
257c804472Sopenharmony_ci/**
267c804472Sopenharmony_ci * This module provides the capability to manage application accounts.
277c804472Sopenharmony_ci *
287c804472Sopenharmony_ci * @namespace appAccount
297c804472Sopenharmony_ci * @syscap SystemCapability.Account.AppAccount
307c804472Sopenharmony_ci * @since 7
317c804472Sopenharmony_ci */
327c804472Sopenharmony_cideclare namespace appAccount {
337c804472Sopenharmony_ci  /**
347c804472Sopenharmony_ci   * Obtains the AppAccountManager instance.
357c804472Sopenharmony_ci   *
367c804472Sopenharmony_ci   * @returns { AppAccountManager } Returns the instance of the AppAccountManager.
377c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
387c804472Sopenharmony_ci   * @since 7
397c804472Sopenharmony_ci   */
407c804472Sopenharmony_ci  function createAppAccountManager(): AppAccountManager;
417c804472Sopenharmony_ci
427c804472Sopenharmony_ci  /**
437c804472Sopenharmony_ci   * Provides methods for managing application accounts.
447c804472Sopenharmony_ci   *
457c804472Sopenharmony_ci   * @interface AppAccountManager
467c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
477c804472Sopenharmony_ci   * @since 7
487c804472Sopenharmony_ci   */
497c804472Sopenharmony_ci  interface AppAccountManager {
507c804472Sopenharmony_ci    /**
517c804472Sopenharmony_ci     * Adds the account name and extra information of this application to the account management service.
527c804472Sopenharmony_ci     * <p>
537c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
547c804472Sopenharmony_ci     *
557c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
567c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
577c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
587c804472Sopenharmony_ci     * @since 7
597c804472Sopenharmony_ci     * @deprecated since 9
607c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#createAccount
617c804472Sopenharmony_ci     */
627c804472Sopenharmony_ci    addAccount(name: string, callback: AsyncCallback<void>): void;
637c804472Sopenharmony_ci
647c804472Sopenharmony_ci    /**
657c804472Sopenharmony_ci     * Adds the account name and extra information of this application to the account management service.
667c804472Sopenharmony_ci     * <p>
677c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
687c804472Sopenharmony_ci     *
697c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
707c804472Sopenharmony_ci     * @param { string } extraInfo - Indicates the extra information of the application account to add.
717c804472Sopenharmony_ci     *        The extra information cannot be sensitive information of the application account.
727c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
737c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
747c804472Sopenharmony_ci     * @since 7
757c804472Sopenharmony_ci     * @deprecated since 9
767c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#createAccount
777c804472Sopenharmony_ci     */
787c804472Sopenharmony_ci    addAccount(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
797c804472Sopenharmony_ci
807c804472Sopenharmony_ci    /**
817c804472Sopenharmony_ci     * Adds the account name and extra information of this application to the account management service.
827c804472Sopenharmony_ci     * <p>
837c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
847c804472Sopenharmony_ci     *
857c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
867c804472Sopenharmony_ci     * @param { string } [extraInfo] - Indicates the extra information of the application account to add.
877c804472Sopenharmony_ci     *        The extra information cannot be sensitive information of the application account.
887c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
897c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
907c804472Sopenharmony_ci     * @since 7
917c804472Sopenharmony_ci     * @deprecated since 9
927c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#createAccount
937c804472Sopenharmony_ci     */
947c804472Sopenharmony_ci    addAccount(name: string, extraInfo?: string): Promise<void>;
957c804472Sopenharmony_ci
967c804472Sopenharmony_ci    /**
977c804472Sopenharmony_ci     * Creates the account name and extra information of this application to the account management service.
987c804472Sopenharmony_ci     * <p>
997c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
1007c804472Sopenharmony_ci     *
1017c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
1027c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
1037c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
1047c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
1057c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
1067c804472Sopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
1077c804472Sopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
1087c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
1097c804472Sopenharmony_ci     * @since 9
1107c804472Sopenharmony_ci     */
1117c804472Sopenharmony_ci    createAccount(name: string, callback: AsyncCallback<void>): void;
1127c804472Sopenharmony_ci
1137c804472Sopenharmony_ci    /**
1147c804472Sopenharmony_ci     * Creates the account name and extra information of this application to the account management service.
1157c804472Sopenharmony_ci     * <p>
1167c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
1177c804472Sopenharmony_ci     *
1187c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
1197c804472Sopenharmony_ci     * @param { CreateAccountOptions } options - Indicates the extra information of the application account to add.
1207c804472Sopenharmony_ci     *        The extra information cannot be sensitive information of the application account.
1217c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
1227c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
1237c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
1247c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or options.
1257c804472Sopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
1267c804472Sopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
1277c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
1287c804472Sopenharmony_ci     * @since 9
1297c804472Sopenharmony_ci     */
1307c804472Sopenharmony_ci    createAccount(name: string, options: CreateAccountOptions, callback: AsyncCallback<void>): void;
1317c804472Sopenharmony_ci
1327c804472Sopenharmony_ci    /**
1337c804472Sopenharmony_ci     * Creates the account name and extra information of this application to the account management service.
1347c804472Sopenharmony_ci     * <p>
1357c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
1367c804472Sopenharmony_ci     *
1377c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to add.
1387c804472Sopenharmony_ci     * @param { CreateAccountOptions } [options] - Indicates the extra information of the application account to add.
1397c804472Sopenharmony_ci     *        The extra information cannot be sensitive information of the application account.
1407c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
1417c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
1427c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
1437c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or options.
1447c804472Sopenharmony_ci     * @throws { BusinessError } 12300004 - Account already exists.
1457c804472Sopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
1467c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
1477c804472Sopenharmony_ci     * @since 9
1487c804472Sopenharmony_ci     */
1497c804472Sopenharmony_ci    createAccount(name: string, options?: CreateAccountOptions): Promise<void>;
1507c804472Sopenharmony_ci
1517c804472Sopenharmony_ci    /**
1527c804472Sopenharmony_ci     * Adds an application account of a specified owner implicitly.
1537c804472Sopenharmony_ci     *
1547c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
1557c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
1567c804472Sopenharmony_ci     * @param { object } options - Indicates the authenticator-specific options for the request.
1577c804472Sopenharmony_ci     * @param { AuthenticatorCallback } callback - Indicates the authenticator callback.
1587c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
1597c804472Sopenharmony_ci     * @since 8
1607c804472Sopenharmony_ci     * @deprecated since 9
1617c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#createAccountImplicitly
1627c804472Sopenharmony_ci     */
1637c804472Sopenharmony_ci    addAccountImplicitly(
1647c804472Sopenharmony_ci      owner: string,
1657c804472Sopenharmony_ci      authType: string,
1667c804472Sopenharmony_ci      options: { [key: string]: any },
1677c804472Sopenharmony_ci      callback: AuthenticatorCallback
1687c804472Sopenharmony_ci    ): void;
1697c804472Sopenharmony_ci
1707c804472Sopenharmony_ci    /**
1717c804472Sopenharmony_ci     * Creates an application account of a specified owner implicitly.
1727c804472Sopenharmony_ci     *
1737c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
1747c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
1757c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
1767c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
1777c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
1787c804472Sopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
1797c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
1807c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
1817c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
1827c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
1837c804472Sopenharmony_ci     * @since 9
1847c804472Sopenharmony_ci     */
1857c804472Sopenharmony_ci    createAccountImplicitly(owner: string, callback: AuthCallback): void;
1867c804472Sopenharmony_ci
1877c804472Sopenharmony_ci    /**
1887c804472Sopenharmony_ci     * Creates an application account of a specified owner implicitly.
1897c804472Sopenharmony_ci     *
1907c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
1917c804472Sopenharmony_ci     * @param { CreateAccountImplicitlyOptions } options - Indicates the authenticator-specific options for the request.
1927c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
1937c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
1947c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
1957c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner or options.
1967c804472Sopenharmony_ci     * @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
1977c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
1987c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
1997c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
2007c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2017c804472Sopenharmony_ci     * @since 9
2027c804472Sopenharmony_ci     */
2037c804472Sopenharmony_ci    createAccountImplicitly(owner: string, options: CreateAccountImplicitlyOptions, callback: AuthCallback): void;
2047c804472Sopenharmony_ci
2057c804472Sopenharmony_ci    /**
2067c804472Sopenharmony_ci     * Deletes an application account from the account management service.
2077c804472Sopenharmony_ci     * <p>
2087c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
2097c804472Sopenharmony_ci     *
2107c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to delete.
2117c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
2127c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2137c804472Sopenharmony_ci     * @since 7
2147c804472Sopenharmony_ci     * @deprecated since 9
2157c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#removeAccount
2167c804472Sopenharmony_ci     */
2177c804472Sopenharmony_ci    deleteAccount(name: string, callback: AsyncCallback<void>): void;
2187c804472Sopenharmony_ci
2197c804472Sopenharmony_ci    /**
2207c804472Sopenharmony_ci     * Deletes an application account from the account management service.
2217c804472Sopenharmony_ci     * <p>
2227c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
2237c804472Sopenharmony_ci     *
2247c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to delete.
2257c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
2267c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2277c804472Sopenharmony_ci     * @since 7
2287c804472Sopenharmony_ci     * @deprecated since 9
2297c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#removeAccount
2307c804472Sopenharmony_ci     */
2317c804472Sopenharmony_ci    deleteAccount(name: string): Promise<void>;
2327c804472Sopenharmony_ci
2337c804472Sopenharmony_ci    /**
2347c804472Sopenharmony_ci     * Removes an application account from the account management service.
2357c804472Sopenharmony_ci     * <p>
2367c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
2377c804472Sopenharmony_ci     *
2387c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to delete.
2397c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
2407c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
2417c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
2427c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
2437c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
2447c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2457c804472Sopenharmony_ci     * @since 9
2467c804472Sopenharmony_ci     */
2477c804472Sopenharmony_ci    removeAccount(name: string, callback: AsyncCallback<void>): void;
2487c804472Sopenharmony_ci
2497c804472Sopenharmony_ci    /**
2507c804472Sopenharmony_ci     * Removes an application account from the account management service.
2517c804472Sopenharmony_ci     * <p>
2527c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
2537c804472Sopenharmony_ci     *
2547c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to delete.
2557c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
2567c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
2577c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
2587c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
2597c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
2607c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2617c804472Sopenharmony_ci     * @since 9
2627c804472Sopenharmony_ci     */
2637c804472Sopenharmony_ci    removeAccount(name: string): Promise<void>;
2647c804472Sopenharmony_ci
2657c804472Sopenharmony_ci    /**
2667c804472Sopenharmony_ci     * Disables a third-party application with the specified bundle name from
2677c804472Sopenharmony_ci     * accessing the given application account.
2687c804472Sopenharmony_ci     *
2697c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to disable access from
2707c804472Sopenharmony_ci     *        the third-party application.
2717c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
2727c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
2737c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2747c804472Sopenharmony_ci     * @since 7
2757c804472Sopenharmony_ci     * @deprecated since 9
2767c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAppAccess
2777c804472Sopenharmony_ci     */
2787c804472Sopenharmony_ci    disableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
2797c804472Sopenharmony_ci
2807c804472Sopenharmony_ci    /**
2817c804472Sopenharmony_ci     * Disables a third-party application with the specified bundle name from
2827c804472Sopenharmony_ci     * accessing the given application account.
2837c804472Sopenharmony_ci     *
2847c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account to disable access from
2857c804472Sopenharmony_ci     *        the third-party application.
2867c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
2877c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
2887c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
2897c804472Sopenharmony_ci     * @since 7
2907c804472Sopenharmony_ci     * @deprecated since 9
2917c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAppAccess
2927c804472Sopenharmony_ci     */
2937c804472Sopenharmony_ci    disableAppAccess(name: string, bundleName: string): Promise<void>;
2947c804472Sopenharmony_ci
2957c804472Sopenharmony_ci    /**
2967c804472Sopenharmony_ci     * Enables a third-party application with the specified bundle name to access the given application
2977c804472Sopenharmony_ci     * account for data query and listening.
2987c804472Sopenharmony_ci     *
2997c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3007c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3017c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
3027c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3037c804472Sopenharmony_ci     * @since 7
3047c804472Sopenharmony_ci     * @deprecated since 9
3057c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAppAccess
3067c804472Sopenharmony_ci     */
3077c804472Sopenharmony_ci    enableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
3087c804472Sopenharmony_ci
3097c804472Sopenharmony_ci    /**
3107c804472Sopenharmony_ci     * Enables a third-party application with the specified bundle name to access the given application
3117c804472Sopenharmony_ci     * account for data query and listening.
3127c804472Sopenharmony_ci     *
3137c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3147c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3157c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
3167c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3177c804472Sopenharmony_ci     * @since 7
3187c804472Sopenharmony_ci     * @deprecated since 9
3197c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAppAccess
3207c804472Sopenharmony_ci     */
3217c804472Sopenharmony_ci    enableAppAccess(name: string, bundleName: string): Promise<void>;
3227c804472Sopenharmony_ci
3237c804472Sopenharmony_ci    /**
3247c804472Sopenharmony_ci     * Sets a third-party application with the specified bundle name to access the given application
3257c804472Sopenharmony_ci     * account for data query and listening.
3267c804472Sopenharmony_ci     *
3277c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3287c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3297c804472Sopenharmony_ci     * @param { boolean } isAccessible - Indicates the accessibility flag, true for accessible, false for inaccessible.
3307c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
3317c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
3327c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
3337c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or bundleName.
3347c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
3357c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
3367c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3377c804472Sopenharmony_ci     * @since 9
3387c804472Sopenharmony_ci     */
3397c804472Sopenharmony_ci    setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>): void;
3407c804472Sopenharmony_ci
3417c804472Sopenharmony_ci    /**
3427c804472Sopenharmony_ci     * Sets a third-party application with the specified bundle name to access the given application
3437c804472Sopenharmony_ci     * account for data query and listening.
3447c804472Sopenharmony_ci     *
3457c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3467c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3477c804472Sopenharmony_ci     * @param { boolean } isAccessible - Indicates the accessibility flag, true for accessible, false for inaccessible.
3487c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
3497c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
3507c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
3517c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or bundleName.
3527c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
3537c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
3547c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3557c804472Sopenharmony_ci     * @since 9
3567c804472Sopenharmony_ci     */
3577c804472Sopenharmony_ci    setAppAccess(name: string, bundleName: string, isAccessible: boolean): Promise<void>;
3587c804472Sopenharmony_ci
3597c804472Sopenharmony_ci    /**
3607c804472Sopenharmony_ci     * Checks whether a third-party application with the specified bundle name is allowed to access
3617c804472Sopenharmony_ci     * the given application account for data query and listening.
3627c804472Sopenharmony_ci     *
3637c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3647c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3657c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface.
3667c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
3677c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
3687c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or bundleName.
3697c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
3707c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3717c804472Sopenharmony_ci     * @since 9
3727c804472Sopenharmony_ci     */
3737c804472Sopenharmony_ci    checkAppAccess(name: string, bundleName: string, callback: AsyncCallback<boolean>): void;
3747c804472Sopenharmony_ci
3757c804472Sopenharmony_ci    /**
3767c804472Sopenharmony_ci     * Checks whether a third-party application with the specified bundle name is allowed to access
3777c804472Sopenharmony_ci     * the given application account for data query and listening.
3787c804472Sopenharmony_ci     *
3797c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
3807c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
3817c804472Sopenharmony_ci     * @returns { Promise<boolean> } The promise returned by the function.
3827c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
3837c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
3847c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or bundleName.
3857c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
3867c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
3877c804472Sopenharmony_ci     * @since 9
3887c804472Sopenharmony_ci     */
3897c804472Sopenharmony_ci    checkAppAccess(name: string, bundleName: string): Promise<boolean>;
3907c804472Sopenharmony_ci
3917c804472Sopenharmony_ci    /**
3927c804472Sopenharmony_ci     * Checks whether a specified application account allows application data synchronization.
3937c804472Sopenharmony_ci     * <p>
3947c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
3957c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to check
3967c804472Sopenharmony_ci     * whether application data can be synchronized.
3977c804472Sopenharmony_ci     * <p>
3987c804472Sopenharmony_ci     *
3997c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
4007c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4017c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface.
4027c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4037c804472Sopenharmony_ci     * @since 7
4047c804472Sopenharmony_ci     * @deprecated since 9
4057c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#checkDataSyncEnabled
4067c804472Sopenharmony_ci     */
4077c804472Sopenharmony_ci    checkAppAccountSyncEnable(name: string, callback: AsyncCallback<boolean>): void;
4087c804472Sopenharmony_ci
4097c804472Sopenharmony_ci    /**
4107c804472Sopenharmony_ci     * Checks whether a specified application account allows application data synchronization.
4117c804472Sopenharmony_ci     * <p>
4127c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
4137c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to check
4147c804472Sopenharmony_ci     * whether application data can be synchronized.
4157c804472Sopenharmony_ci     * <p>
4167c804472Sopenharmony_ci     *
4177c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
4187c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4197c804472Sopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise.
4207c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4217c804472Sopenharmony_ci     * @since 7
4227c804472Sopenharmony_ci     * @deprecated since 9
4237c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#checkDataSyncEnabled
4247c804472Sopenharmony_ci     */
4257c804472Sopenharmony_ci    checkAppAccountSyncEnable(name: string): Promise<boolean>;
4267c804472Sopenharmony_ci
4277c804472Sopenharmony_ci    /**
4287c804472Sopenharmony_ci     * Checks whether application data synchronization is enabled for the specified account.
4297c804472Sopenharmony_ci     * <p>
4307c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
4317c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to check
4327c804472Sopenharmony_ci     * whether application data can be synchronized.
4337c804472Sopenharmony_ci     * <p>
4347c804472Sopenharmony_ci     *
4357c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
4367c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4377c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface.
4387c804472Sopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
4397c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
4407c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
4417c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
4427c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
4437c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4447c804472Sopenharmony_ci     * @since 9
4457c804472Sopenharmony_ci     */
4467c804472Sopenharmony_ci    checkDataSyncEnabled(name: string, callback: AsyncCallback<boolean>): void;
4477c804472Sopenharmony_ci
4487c804472Sopenharmony_ci    /**
4497c804472Sopenharmony_ci     * Checks whether application data synchronization is enabled for the specified account.
4507c804472Sopenharmony_ci     * <p>
4517c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
4527c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to check
4537c804472Sopenharmony_ci     * whether application data can be synchronized.
4547c804472Sopenharmony_ci     * <p>
4557c804472Sopenharmony_ci     *
4567c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
4577c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4587c804472Sopenharmony_ci     * @returns { Promise<boolean> } Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise.
4597c804472Sopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
4607c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
4617c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
4627c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
4637c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
4647c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4657c804472Sopenharmony_ci     * @since 9
4667c804472Sopenharmony_ci     */
4677c804472Sopenharmony_ci    checkDataSyncEnabled(name: string): Promise<boolean>;
4687c804472Sopenharmony_ci
4697c804472Sopenharmony_ci    /**
4707c804472Sopenharmony_ci     * Sets the credential for this application account.
4717c804472Sopenharmony_ci     *
4727c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4737c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to set.
4747c804472Sopenharmony_ci     * @param { string } credential - Indicates the credential to set.
4757c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
4767c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4777c804472Sopenharmony_ci     * @since 7
4787c804472Sopenharmony_ci     * @deprecated since 9
4797c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCredential
4807c804472Sopenharmony_ci     */
4817c804472Sopenharmony_ci    setAccountCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>): void;
4827c804472Sopenharmony_ci
4837c804472Sopenharmony_ci    /**
4847c804472Sopenharmony_ci     * Sets the credential for this application account.
4857c804472Sopenharmony_ci     *
4867c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
4877c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to set.
4887c804472Sopenharmony_ci     * @param { string } credential - Indicates the credential to set.
4897c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
4907c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
4917c804472Sopenharmony_ci     * @since 7
4927c804472Sopenharmony_ci     * @deprecated since 9
4937c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCredential
4947c804472Sopenharmony_ci     */
4957c804472Sopenharmony_ci    setAccountCredential(name: string, credentialType: string, credential: string): Promise<void>;
4967c804472Sopenharmony_ci
4977c804472Sopenharmony_ci    /**
4987c804472Sopenharmony_ci     * Sets the credential for this application account.
4997c804472Sopenharmony_ci     *
5007c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
5017c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to set.
5027c804472Sopenharmony_ci     * @param { string } credential - Indicates the credential to set.
5037c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
5047c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
5057c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
5067c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, credentialType or credential.
5077c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
5087c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
5097c804472Sopenharmony_ci     * @since 9
5107c804472Sopenharmony_ci     */
5117c804472Sopenharmony_ci    setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>): void;
5127c804472Sopenharmony_ci
5137c804472Sopenharmony_ci    /**
5147c804472Sopenharmony_ci     * Sets the credential for this application account.
5157c804472Sopenharmony_ci     *
5167c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
5177c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to set.
5187c804472Sopenharmony_ci     * @param { string } credential - Indicates the credential to set.
5197c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
5207c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
5217c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
5227c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, credentialType or credential.
5237c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
5247c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
5257c804472Sopenharmony_ci     * @since 9
5267c804472Sopenharmony_ci     */
5277c804472Sopenharmony_ci    setCredential(name: string, credentialType: string, credential: string): Promise<void>;
5287c804472Sopenharmony_ci
5297c804472Sopenharmony_ci    /**
5307c804472Sopenharmony_ci     * Sets extra information for this application account.
5317c804472Sopenharmony_ci     * <p>
5327c804472Sopenharmony_ci     * You can call this method when you forget the extra information of your application account or
5337c804472Sopenharmony_ci     * need to modify the extra information.
5347c804472Sopenharmony_ci     *
5357c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
5367c804472Sopenharmony_ci     * @param { string } extraInfo - Indicates the extra information to set.
5377c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
5387c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
5397c804472Sopenharmony_ci     * @since 7
5407c804472Sopenharmony_ci     * @deprecated since 9
5417c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCustomData
5427c804472Sopenharmony_ci     */
5437c804472Sopenharmony_ci    setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
5447c804472Sopenharmony_ci
5457c804472Sopenharmony_ci    /**
5467c804472Sopenharmony_ci     * Sets extra information for this application account.
5477c804472Sopenharmony_ci     * <p>
5487c804472Sopenharmony_ci     * You can call this method when you forget the extra information of your application account or
5497c804472Sopenharmony_ci     * need to modify the extra information.
5507c804472Sopenharmony_ci     *
5517c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
5527c804472Sopenharmony_ci     * @param { string } extraInfo - Indicates the extra information to set.
5537c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
5547c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
5557c804472Sopenharmony_ci     * @since 7
5567c804472Sopenharmony_ci     * @deprecated since 9
5577c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCustomData
5587c804472Sopenharmony_ci     */
5597c804472Sopenharmony_ci    setAccountExtraInfo(name: string, extraInfo: string): Promise<void>;
5607c804472Sopenharmony_ci
5617c804472Sopenharmony_ci    /**
5627c804472Sopenharmony_ci     * Sets whether a specified application account allows application data synchronization.
5637c804472Sopenharmony_ci     * <p>
5647c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
5657c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to set whether to
5667c804472Sopenharmony_ci     * allow cross-device data synchronization. If synchronization is allowed, application data can be synchronized
5677c804472Sopenharmony_ci     * among these devices in the event of any changes related to the application account.
5687c804472Sopenharmony_ci     * If synchronization is not allowed, the application data is stored only on the local device.
5697c804472Sopenharmony_ci     * <p>
5707c804472Sopenharmony_ci     * <b>Application account-related changes</b>: adding or deleting an application account, setting extra
5717c804472Sopenharmony_ci     * information (such as updating a token), and setting data associated with this application account
5727c804472Sopenharmony_ci     * <p>
5737c804472Sopenharmony_ci     * <b>Application data that can be synchronized</b>: application account name, token,
5747c804472Sopenharmony_ci     * and data associated with this application account
5757c804472Sopenharmony_ci     * <p>
5767c804472Sopenharmony_ci     *
5777c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
5787c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
5797c804472Sopenharmony_ci     * @param { boolean } isEnable - Specifies whether to allow application data synchronization.
5807c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
5817c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
5827c804472Sopenharmony_ci     * @since 7
5837c804472Sopenharmony_ci     * @deprecated since 9
5847c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setDataSyncEnabled
5857c804472Sopenharmony_ci     */
5867c804472Sopenharmony_ci    setAppAccountSyncEnable(name: string, isEnable: boolean, callback: AsyncCallback<void>): void;
5877c804472Sopenharmony_ci
5887c804472Sopenharmony_ci    /**
5897c804472Sopenharmony_ci     * Sets whether a specified application account allows application data synchronization.
5907c804472Sopenharmony_ci     * <p>
5917c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
5927c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to set whether to
5937c804472Sopenharmony_ci     * allow cross-device data synchronization. If synchronization is allowed, application data can be synchronized
5947c804472Sopenharmony_ci     * among these devices in the event of any changes related to the application account.
5957c804472Sopenharmony_ci     * If synchronization is not allowed, the application data is stored only on the local device.
5967c804472Sopenharmony_ci     * <p>
5977c804472Sopenharmony_ci     * <b>Application account-related changes</b>: adding or deleting an application account, setting extra
5987c804472Sopenharmony_ci     * information (such as updating a token), and setting data associated with this application account
5997c804472Sopenharmony_ci     * <p>
6007c804472Sopenharmony_ci     * <b>Application data that can be synchronized</b>: application account name, token,
6017c804472Sopenharmony_ci     * and data associated with this application account
6027c804472Sopenharmony_ci     * <p>
6037c804472Sopenharmony_ci     *
6047c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
6057c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
6067c804472Sopenharmony_ci     * @param { boolean } isEnable - Specifies whether to allow application data synchronization.
6077c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
6087c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
6097c804472Sopenharmony_ci     * @since 7
6107c804472Sopenharmony_ci     * @deprecated since 9
6117c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setDataSyncEnabled
6127c804472Sopenharmony_ci     */
6137c804472Sopenharmony_ci    setAppAccountSyncEnable(name: string, isEnable: boolean): Promise<void>;
6147c804472Sopenharmony_ci
6157c804472Sopenharmony_ci    /**
6167c804472Sopenharmony_ci     * Sets whether a specified application account enables application data synchronization.
6177c804472Sopenharmony_ci     * <p>
6187c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
6197c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to set whether to
6207c804472Sopenharmony_ci     * enable cross-device data synchronization. If synchronization is enabled, application data can be synchronized
6217c804472Sopenharmony_ci     * among these devices in the event of any changes related to the application account.
6227c804472Sopenharmony_ci     * If synchronization is not enabled, the application data is stored only on the local device.
6237c804472Sopenharmony_ci     * <p>
6247c804472Sopenharmony_ci     * <b>Application account-related changes</b>: adding or deleting an application account, setting extra
6257c804472Sopenharmony_ci     * information (such as updating a token), and setting data associated with this application account
6267c804472Sopenharmony_ci     * <p>
6277c804472Sopenharmony_ci     * <b>Application data that can be synchronized</b>: application account name, token,
6287c804472Sopenharmony_ci     * and data associated with this application account
6297c804472Sopenharmony_ci     * <p>
6307c804472Sopenharmony_ci     *
6317c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
6327c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
6337c804472Sopenharmony_ci     * @param { boolean } isEnabled - Specifies whether to enable application data synchronization.
6347c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
6357c804472Sopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
6367c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
6377c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
6387c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
6397c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
6407c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
6417c804472Sopenharmony_ci     * @since 9
6427c804472Sopenharmony_ci     */
6437c804472Sopenharmony_ci    setDataSyncEnabled(name: string, isEnabled: boolean, callback: AsyncCallback<void>): void;
6447c804472Sopenharmony_ci
6457c804472Sopenharmony_ci    /**
6467c804472Sopenharmony_ci     * Sets whether a specified application account enables application data synchronization.
6477c804472Sopenharmony_ci     * <p>
6487c804472Sopenharmony_ci     * If the same OHOS account has logged in to multiple devices, these devices constitute a super device
6497c804472Sopenharmony_ci     * through the distributed networking. On the connected devices, you can call this method to set whether to
6507c804472Sopenharmony_ci     * enable cross-device data synchronization. If synchronization is enabled, application data can be synchronized
6517c804472Sopenharmony_ci     * among these devices in the event of any changes related to the application account.
6527c804472Sopenharmony_ci     * If synchronization is not enabled, the application data is stored only on the local device.
6537c804472Sopenharmony_ci     * <p>
6547c804472Sopenharmony_ci     * <b>Application account-related changes</b>: adding or deleting an application account, setting extra
6557c804472Sopenharmony_ci     * information (such as updating a token), and setting data associated with this application account
6567c804472Sopenharmony_ci     * <p>
6577c804472Sopenharmony_ci     * <b>Application data that can be synchronized</b>: application account name, token,
6587c804472Sopenharmony_ci     * and data associated with this application account
6597c804472Sopenharmony_ci     * <p>
6607c804472Sopenharmony_ci     *
6617c804472Sopenharmony_ci     * @permission ohos.permission.DISTRIBUTED_DATASYNC
6627c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
6637c804472Sopenharmony_ci     * @param { boolean } isEnabled - Specifies whether to enable application data synchronization.
6647c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
6657c804472Sopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
6667c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
6677c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
6687c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name.
6697c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
6707c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
6717c804472Sopenharmony_ci     * @since 9
6727c804472Sopenharmony_ci     */
6737c804472Sopenharmony_ci    setDataSyncEnabled(name: string, isEnabled: boolean): Promise<void>;
6747c804472Sopenharmony_ci
6757c804472Sopenharmony_ci    /**
6767c804472Sopenharmony_ci     * Sets data associated with this application account.
6777c804472Sopenharmony_ci     *
6787c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
6797c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to set. The key can be customized.
6807c804472Sopenharmony_ci     * @param { string } value - Indicates the value of the data to set.
6817c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
6827c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
6837c804472Sopenharmony_ci     * @since 7
6847c804472Sopenharmony_ci     * @deprecated since 9
6857c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCustomData
6867c804472Sopenharmony_ci     */
6877c804472Sopenharmony_ci    setAssociatedData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;
6887c804472Sopenharmony_ci
6897c804472Sopenharmony_ci    /**
6907c804472Sopenharmony_ci     * Sets data associated with this application account.
6917c804472Sopenharmony_ci     *
6927c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
6937c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to set. The key can be customized.
6947c804472Sopenharmony_ci     * @param { string } value - Indicates the value of the data to set.
6957c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
6967c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
6977c804472Sopenharmony_ci     * @since 7
6987c804472Sopenharmony_ci     * @deprecated since 9
6997c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setCustomData
7007c804472Sopenharmony_ci     */
7017c804472Sopenharmony_ci    setAssociatedData(name: string, key: string, value: string): Promise<void>;
7027c804472Sopenharmony_ci
7037c804472Sopenharmony_ci    /**
7047c804472Sopenharmony_ci     * Sets data associated with this application account.
7057c804472Sopenharmony_ci     *
7067c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
7077c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to set. The key can be customized.
7087c804472Sopenharmony_ci     * @param { string } value - Indicates the value of the data to set.
7097c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
7107c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
7117c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
7127c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, key or value.
7137c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
7147c804472Sopenharmony_ci     * @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit.
7157c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
7167c804472Sopenharmony_ci     * @since 9
7177c804472Sopenharmony_ci     */
7187c804472Sopenharmony_ci    setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;
7197c804472Sopenharmony_ci
7207c804472Sopenharmony_ci    /**
7217c804472Sopenharmony_ci     * Sets data associated with this application account.
7227c804472Sopenharmony_ci     *
7237c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
7247c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to set. The key can be customized.
7257c804472Sopenharmony_ci     * @param { string } value - Indicates the value of the data to set.
7267c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
7277c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
7287c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
7297c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, key or value.
7307c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
7317c804472Sopenharmony_ci     * @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit.
7327c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
7337c804472Sopenharmony_ci     * @since 9
7347c804472Sopenharmony_ci     */
7357c804472Sopenharmony_ci    setCustomData(name: string, key: string, value: string): Promise<void>;
7367c804472Sopenharmony_ci
7377c804472Sopenharmony_ci    /**
7387c804472Sopenharmony_ci     * Obtains information about all accessible accounts.
7397c804472Sopenharmony_ci     * <p>
7407c804472Sopenharmony_ci     * This method applies to the following accounts:
7417c804472Sopenharmony_ci     * <ul>
7427c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
7437c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
7447c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications.</li>
7457c804472Sopenharmony_ci     * </ul>
7467c804472Sopenharmony_ci     *
7477c804472Sopenharmony_ci     * @permission ohos.permission.GET_ALL_APP_ACCOUNTS
7487c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AppAccountInfo>> } callback - Asynchronous callback interface.
7497c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
7507c804472Sopenharmony_ci     * @since 7
7517c804472Sopenharmony_ci     * @deprecated since 9
7527c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAllAccounts
7537c804472Sopenharmony_ci     */
7547c804472Sopenharmony_ci    getAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;
7557c804472Sopenharmony_ci
7567c804472Sopenharmony_ci    /**
7577c804472Sopenharmony_ci     * Obtains information about all accessible accounts.
7587c804472Sopenharmony_ci     * <p>
7597c804472Sopenharmony_ci     * This method applies to the following accounts:
7607c804472Sopenharmony_ci     * <ul>
7617c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
7627c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
7637c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications.</li>
7647c804472Sopenharmony_ci     * </ul>
7657c804472Sopenharmony_ci     *
7667c804472Sopenharmony_ci     * @permission ohos.permission.GET_ALL_APP_ACCOUNTS
7677c804472Sopenharmony_ci     * @returns { Promise<Array<AppAccountInfo>> } Returns a list of application accounts.
7687c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
7697c804472Sopenharmony_ci     * @since 7
7707c804472Sopenharmony_ci     * @deprecated since 9
7717c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAllAccounts
7727c804472Sopenharmony_ci     */
7737c804472Sopenharmony_ci    getAllAccessibleAccounts(): Promise<Array<AppAccountInfo>>;
7747c804472Sopenharmony_ci
7757c804472Sopenharmony_ci    /**
7767c804472Sopenharmony_ci     * Obtains information about all accessible accounts.
7777c804472Sopenharmony_ci     * <p>
7787c804472Sopenharmony_ci     * This method applies to the following accounts:
7797c804472Sopenharmony_ci     * <ul>
7807c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
7817c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
7827c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications or
7837c804472Sopenharmony_ci     * have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.</li>
7847c804472Sopenharmony_ci     * </ul>
7857c804472Sopenharmony_ci     *
7867c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AppAccountInfo>> } callback - Asynchronous callback interface. Returns a list of application accounts.
7877c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
7887c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
7897c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
7907c804472Sopenharmony_ci     * @since 9
7917c804472Sopenharmony_ci     */
7927c804472Sopenharmony_ci    getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;
7937c804472Sopenharmony_ci
7947c804472Sopenharmony_ci    /**
7957c804472Sopenharmony_ci     * Obtains information about all accessible accounts.
7967c804472Sopenharmony_ci     * <p>
7977c804472Sopenharmony_ci     * This method applies to the following accounts:
7987c804472Sopenharmony_ci     * <ul>
7997c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
8007c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
8017c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications or
8027c804472Sopenharmony_ci     * have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.</li>
8037c804472Sopenharmony_ci     * </ul>
8047c804472Sopenharmony_ci     *
8057c804472Sopenharmony_ci     * @returns { Promise<Array<AppAccountInfo>> } Returns a list of application accounts.
8067c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
8077c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
8087c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
8097c804472Sopenharmony_ci     * @since 9
8107c804472Sopenharmony_ci     */
8117c804472Sopenharmony_ci    getAllAccounts(): Promise<Array<AppAccountInfo>>;
8127c804472Sopenharmony_ci
8137c804472Sopenharmony_ci    /**
8147c804472Sopenharmony_ci     * Obtains information about all accounts of a specified account owner.
8157c804472Sopenharmony_ci     * <p>
8167c804472Sopenharmony_ci     * This method applies to the following accounts:
8177c804472Sopenharmony_ci     * <ul>
8187c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
8197c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
8207c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications.</li>
8217c804472Sopenharmony_ci     * </ul>
8227c804472Sopenharmony_ci     *
8237c804472Sopenharmony_ci     * @permission ohos.permission.GET_ALL_APP_ACCOUNTS
8247c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
8257c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AppAccountInfo>> } callback - Asynchronous callback interface. Returns a list of application accounts.
8267c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
8277c804472Sopenharmony_ci     * @since 7
8287c804472Sopenharmony_ci     * @deprecated since 9
8297c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAccountsByOwner
8307c804472Sopenharmony_ci     */
8317c804472Sopenharmony_ci    getAllAccounts(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;
8327c804472Sopenharmony_ci
8337c804472Sopenharmony_ci    /**
8347c804472Sopenharmony_ci     * Obtains information about all accounts of a specified account owner.
8357c804472Sopenharmony_ci     * <p>
8367c804472Sopenharmony_ci     * This method applies to the following accounts:
8377c804472Sopenharmony_ci     * <ul>
8387c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
8397c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
8407c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications.</li>
8417c804472Sopenharmony_ci     * </ul>
8427c804472Sopenharmony_ci     *
8437c804472Sopenharmony_ci     * @permission ohos.permission.GET_ALL_APP_ACCOUNTS
8447c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
8457c804472Sopenharmony_ci     * @returns { Promise<Array<AppAccountInfo>> } Returns a list of application accounts.
8467c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
8477c804472Sopenharmony_ci     * @since 7
8487c804472Sopenharmony_ci     * @deprecated since 9
8497c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAccountsByOwner
8507c804472Sopenharmony_ci     */
8517c804472Sopenharmony_ci    getAllAccounts(owner: string): Promise<Array<AppAccountInfo>>;
8527c804472Sopenharmony_ci
8537c804472Sopenharmony_ci    /**
8547c804472Sopenharmony_ci     * Gets information about all accounts of a specified account owner.
8557c804472Sopenharmony_ci     * <p>
8567c804472Sopenharmony_ci     * This method applies to the following accounts:
8577c804472Sopenharmony_ci     * <ul>
8587c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
8597c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
8607c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications or
8617c804472Sopenharmony_ci     * have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.</li>
8627c804472Sopenharmony_ci     * </ul>
8637c804472Sopenharmony_ci     *
8647c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
8657c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AppAccountInfo>> } callback - Asynchronous callback interface. Returns a list of application accounts.
8667c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
8677c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
8687c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
8697c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
8707c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
8717c804472Sopenharmony_ci     * @since 9
8727c804472Sopenharmony_ci     */
8737c804472Sopenharmony_ci    getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;
8747c804472Sopenharmony_ci
8757c804472Sopenharmony_ci    /**
8767c804472Sopenharmony_ci     * Gets information about all accounts of a specified account owner.
8777c804472Sopenharmony_ci     * <p>
8787c804472Sopenharmony_ci     * This method applies to the following accounts:
8797c804472Sopenharmony_ci     * <ul>
8807c804472Sopenharmony_ci     * <li>Accounts of this application.</li>
8817c804472Sopenharmony_ci     * <li>Accounts of third-party applications. To obtain such information,
8827c804472Sopenharmony_ci     * your application must have gained authorization from the third-party applications or
8837c804472Sopenharmony_ci     * have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.</li>
8847c804472Sopenharmony_ci     * </ul>
8857c804472Sopenharmony_ci     *
8867c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
8877c804472Sopenharmony_ci     * @returns { Promise<Array<AppAccountInfo>> } Returns a list of application accounts.
8887c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
8897c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
8907c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
8917c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
8927c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
8937c804472Sopenharmony_ci     * @since 9
8947c804472Sopenharmony_ci     */
8957c804472Sopenharmony_ci    getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>;
8967c804472Sopenharmony_ci
8977c804472Sopenharmony_ci    /**
8987c804472Sopenharmony_ci     * Obtains the credential of this application account.
8997c804472Sopenharmony_ci     *
9007c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9017c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to obtain.
9027c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns the credential of the application account.
9037c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9047c804472Sopenharmony_ci     * @since 7
9057c804472Sopenharmony_ci     * @deprecated since 9
9067c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCredential
9077c804472Sopenharmony_ci     */
9087c804472Sopenharmony_ci    getAccountCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;
9097c804472Sopenharmony_ci
9107c804472Sopenharmony_ci    /**
9117c804472Sopenharmony_ci     * Obtains the credential of this application account.
9127c804472Sopenharmony_ci     *
9137c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9147c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to obtain.
9157c804472Sopenharmony_ci     * @returns { Promise<string> } Returns the credential of the application account.
9167c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9177c804472Sopenharmony_ci     * @since 7
9187c804472Sopenharmony_ci     * @deprecated since 9
9197c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCredential
9207c804472Sopenharmony_ci     */
9217c804472Sopenharmony_ci    getAccountCredential(name: string, credentialType: string): Promise<string>;
9227c804472Sopenharmony_ci
9237c804472Sopenharmony_ci    /**
9247c804472Sopenharmony_ci     * Obtains the credential of this application account.
9257c804472Sopenharmony_ci     *
9267c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9277c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to obtain.
9287c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns the credential of the application account.
9297c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
9307c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
9317c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or credentialType.
9327c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
9337c804472Sopenharmony_ci     * @throws { BusinessError } 12300102 - Credential not found.
9347c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9357c804472Sopenharmony_ci     * @since 9
9367c804472Sopenharmony_ci     */
9377c804472Sopenharmony_ci    getCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;
9387c804472Sopenharmony_ci
9397c804472Sopenharmony_ci    /**
9407c804472Sopenharmony_ci     * Obtains the credential of this application account.
9417c804472Sopenharmony_ci     *
9427c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9437c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to obtain.
9447c804472Sopenharmony_ci     * @returns { Promise<string> } Returns the credential of the application account.
9457c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
9467c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
9477c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or credentialType.
9487c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
9497c804472Sopenharmony_ci     * @throws { BusinessError } 12300102 - Credential not found.
9507c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9517c804472Sopenharmony_ci     * @since 9
9527c804472Sopenharmony_ci     */
9537c804472Sopenharmony_ci    getCredential(name: string, credentialType: string): Promise<string>;
9547c804472Sopenharmony_ci
9557c804472Sopenharmony_ci    /**
9567c804472Sopenharmony_ci     * Obtains extra information of this application account.
9577c804472Sopenharmony_ci     *
9587c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9597c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface.
9607c804472Sopenharmony_ci     *   Returns the extra information of the account; returns {@code null} in other scenarios,
9617c804472Sopenharmony_ci     *   for example, if the account does not exist.
9627c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9637c804472Sopenharmony_ci     * @since 7
9647c804472Sopenharmony_ci     * @deprecated since 9
9657c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCustomData
9667c804472Sopenharmony_ci     */
9677c804472Sopenharmony_ci    getAccountExtraInfo(name: string, callback: AsyncCallback<string>): void;
9687c804472Sopenharmony_ci
9697c804472Sopenharmony_ci    /**
9707c804472Sopenharmony_ci     * Obtains extra information of this application account.
9717c804472Sopenharmony_ci     *
9727c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9737c804472Sopenharmony_ci     * @returns { Promise<string> } Returns the extra information of the account; returns {@code null} in other scenarios,
9747c804472Sopenharmony_ci     *         for example, if the account does not exist.
9757c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9767c804472Sopenharmony_ci     * @since 7
9777c804472Sopenharmony_ci     * @deprecated since 9
9787c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCustomData
9797c804472Sopenharmony_ci     */
9807c804472Sopenharmony_ci    getAccountExtraInfo(name: string): Promise<string>;
9817c804472Sopenharmony_ci
9827c804472Sopenharmony_ci    /**
9837c804472Sopenharmony_ci     * Obtains data associated with this application account.
9847c804472Sopenharmony_ci     *
9857c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9867c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to obtain.
9877c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns the associated data of the application account.
9887c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
9897c804472Sopenharmony_ci     * @since 7
9907c804472Sopenharmony_ci     * @deprecated since 9
9917c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCustomData
9927c804472Sopenharmony_ci     */
9937c804472Sopenharmony_ci    getAssociatedData(name: string, key: string, callback: AsyncCallback<string>): void;
9947c804472Sopenharmony_ci
9957c804472Sopenharmony_ci    /**
9967c804472Sopenharmony_ci     * Obtains data associated with this application account.
9977c804472Sopenharmony_ci     *
9987c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
9997c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to obtain.
10007c804472Sopenharmony_ci     * @returns { Promise<string> } Returns the associated data of the application account.
10017c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10027c804472Sopenharmony_ci     * @since 7
10037c804472Sopenharmony_ci     * @deprecated since 9
10047c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getCustomData
10057c804472Sopenharmony_ci     */
10067c804472Sopenharmony_ci    getAssociatedData(name: string, key: string): Promise<string>;
10077c804472Sopenharmony_ci
10087c804472Sopenharmony_ci    /**
10097c804472Sopenharmony_ci     * Obtains data associated with this application account.
10107c804472Sopenharmony_ci     *
10117c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
10127c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to obtain.
10137c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns the associated data of the application account.
10147c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
10157c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
10167c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or key.
10177c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
10187c804472Sopenharmony_ci     * @throws { BusinessError } 12400002 - Custom data not found.
10197c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10207c804472Sopenharmony_ci     * @since 9
10217c804472Sopenharmony_ci     */
10227c804472Sopenharmony_ci    getCustomData(name: string, key: string, callback: AsyncCallback<string>): void;
10237c804472Sopenharmony_ci
10247c804472Sopenharmony_ci    /**
10257c804472Sopenharmony_ci     * Obtains data associated with this application account.
10267c804472Sopenharmony_ci     *
10277c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
10287c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to obtain.
10297c804472Sopenharmony_ci     * @returns { Promise<string> } Returns the associated data of the application account.
10307c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
10317c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
10327c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or key.
10337c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
10347c804472Sopenharmony_ci     * @throws { BusinessError } 12400002 - Custom data not found
10357c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10367c804472Sopenharmony_ci     * @since 9
10377c804472Sopenharmony_ci     */
10387c804472Sopenharmony_ci    getCustomData(name: string, key: string): Promise<string>;
10397c804472Sopenharmony_ci
10407c804472Sopenharmony_ci    /**
10417c804472Sopenharmony_ci     * Obtains data associated with the specified account synchronously.
10427c804472Sopenharmony_ci     *
10437c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
10447c804472Sopenharmony_ci     * @param { string } key - Indicates the key of the data to obtain.
10457c804472Sopenharmony_ci     * @returns { string } Returns the associated data of the application account.
10467c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
10477c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
10487c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or key.
10497c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
10507c804472Sopenharmony_ci     * @throws { BusinessError } 12400002 - Custom data not found.
10517c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10527c804472Sopenharmony_ci     * @since 9
10537c804472Sopenharmony_ci     */
10547c804472Sopenharmony_ci    getCustomDataSync(name: string, key: string): string;
10557c804472Sopenharmony_ci
10567c804472Sopenharmony_ci    /**
10577c804472Sopenharmony_ci     * Subscribes to the change events of accounts of the specified owners.
10587c804472Sopenharmony_ci     * <p>
10597c804472Sopenharmony_ci     * When the account owner updates the account, the subscriber will receive a notification
10607c804472Sopenharmony_ci     * about the account change event.
10617c804472Sopenharmony_ci     *
10627c804472Sopenharmony_ci     * @param { 'change' } type - Event type.
10637c804472Sopenharmony_ci     * @param { Array<string> } owners - Indicates the account owners, which are specified
10647c804472Sopenharmony_ci     *        by {@link AppAccount#AppAccount(String name, String owner)}.
10657c804472Sopenharmony_ci     * @param { Callback<Array<AppAccountInfo>> } callback - Asynchronous callback interface.
10667c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10677c804472Sopenharmony_ci     * @since 7
10687c804472Sopenharmony_ci     * @deprecated since 9
10697c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#on
10707c804472Sopenharmony_ci     */
10717c804472Sopenharmony_ci    on(type: 'change', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void;
10727c804472Sopenharmony_ci
10737c804472Sopenharmony_ci    /**
10747c804472Sopenharmony_ci     * Subscribes to the change events of accounts of the specified owners.
10757c804472Sopenharmony_ci     * <p>
10767c804472Sopenharmony_ci     * When the account owner updates the account, the subscriber will receive a notification
10777c804472Sopenharmony_ci     * about the account change event.
10787c804472Sopenharmony_ci     *
10797c804472Sopenharmony_ci     * @param { 'accountChange' } type - Event type.
10807c804472Sopenharmony_ci     * @param { Array<string> } owners - Indicates the account owners, which are specified
10817c804472Sopenharmony_ci     *        by {@link AppAccount#AppAccount(String name, String owner)}.
10827c804472Sopenharmony_ci     * @param { Callback<Array<AppAccountInfo>> } callback - Asynchronous callback interface.
10837c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
10847c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
10857c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type or owners.
10867c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
10877c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10887c804472Sopenharmony_ci     * @since 9
10897c804472Sopenharmony_ci     */
10907c804472Sopenharmony_ci    on(type: 'accountChange', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void;
10917c804472Sopenharmony_ci
10927c804472Sopenharmony_ci    /**
10937c804472Sopenharmony_ci     * Unsubscribes from account events.
10947c804472Sopenharmony_ci     *
10957c804472Sopenharmony_ci     * @param { 'change' } type - Event type.
10967c804472Sopenharmony_ci     * @param { Callback<Array<AppAccountInfo>> } [callback] - Asynchronous callback interface.
10977c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
10987c804472Sopenharmony_ci     * @since 7
10997c804472Sopenharmony_ci     * @deprecated since 9
11007c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#off
11017c804472Sopenharmony_ci     */
11027c804472Sopenharmony_ci    off(type: 'change', callback?: Callback<Array<AppAccountInfo>>): void;
11037c804472Sopenharmony_ci
11047c804472Sopenharmony_ci    /**
11057c804472Sopenharmony_ci     * Unsubscribes from account events.
11067c804472Sopenharmony_ci     *
11077c804472Sopenharmony_ci     * @param { 'accountChange' } type - Event type.
11087c804472Sopenharmony_ci     * @param { Callback<Array<AppAccountInfo>> } [callback] - Asynchronous callback interface.
11097c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
11107c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
11117c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid type.
11127c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
11137c804472Sopenharmony_ci     * @since 9
11147c804472Sopenharmony_ci     */
11157c804472Sopenharmony_ci    off(type: 'accountChange', callback?: Callback<Array<AppAccountInfo>>): void;
11167c804472Sopenharmony_ci
11177c804472Sopenharmony_ci    /**
11187c804472Sopenharmony_ci     * Authenticates an application account to get an oauth token.
11197c804472Sopenharmony_ci     *
11207c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
11217c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
11227c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
11237c804472Sopenharmony_ci     * @param { object } options - Indicates the authenticator-specific options for the request.
11247c804472Sopenharmony_ci     * @param { AuthenticatorCallback } callback - Indicates the authenticator callback.
11257c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
11267c804472Sopenharmony_ci     * @since 8
11277c804472Sopenharmony_ci     * @deprecated since 9
11287c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#auth
11297c804472Sopenharmony_ci     */
11307c804472Sopenharmony_ci    authenticate(
11317c804472Sopenharmony_ci      name: string,
11327c804472Sopenharmony_ci      owner: string,
11337c804472Sopenharmony_ci      authType: string,
11347c804472Sopenharmony_ci      options: { [key: string]: any },
11357c804472Sopenharmony_ci      callback: AuthenticatorCallback
11367c804472Sopenharmony_ci    ): void;
11377c804472Sopenharmony_ci
11387c804472Sopenharmony_ci    /**
11397c804472Sopenharmony_ci     * Authenticates an application account to get an auth token.
11407c804472Sopenharmony_ci     *
11417c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
11427c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
11437c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
11447c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
11457c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
11467c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
11477c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or authType.
11487c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
11497c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
11507c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
11517c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
11527c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
11537c804472Sopenharmony_ci     * @since 9
11547c804472Sopenharmony_ci     */
11557c804472Sopenharmony_ci    auth(name: string, owner: string, authType: string, callback: AuthCallback): void;
11567c804472Sopenharmony_ci
11577c804472Sopenharmony_ci    /**
11587c804472Sopenharmony_ci     * Authenticates an application account to get an auth token.
11597c804472Sopenharmony_ci     *
11607c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
11617c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
11627c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
11637c804472Sopenharmony_ci     * @param { Record<string, Object> } options - Indicates the authenticator-specific options for the request.
11647c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
11657c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
11667c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
11677c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner, authType or options.
11687c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
11697c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
11707c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
11717c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
11727c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
11737c804472Sopenharmony_ci     * @since 9
11747c804472Sopenharmony_ci     */
11757c804472Sopenharmony_ci    auth(
11767c804472Sopenharmony_ci      name: string,
11777c804472Sopenharmony_ci      owner: string,
11787c804472Sopenharmony_ci      authType: string,
11797c804472Sopenharmony_ci      options: Record<string, Object>,
11807c804472Sopenharmony_ci      callback: AuthCallback
11817c804472Sopenharmony_ci    ): void;
11827c804472Sopenharmony_ci
11837c804472Sopenharmony_ci    /**
11847c804472Sopenharmony_ci     * Gets an oauth token with the specified authentication type from a particular application account.
11857c804472Sopenharmony_ci     *
11867c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
11877c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
11887c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
11897c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns an oauth token.
11907c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
11917c804472Sopenharmony_ci     * @since 8
11927c804472Sopenharmony_ci     * @deprecated since 9
11937c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthToken
11947c804472Sopenharmony_ci     */
11957c804472Sopenharmony_ci    getOAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>): void;
11967c804472Sopenharmony_ci
11977c804472Sopenharmony_ci    /**
11987c804472Sopenharmony_ci     * Gets an oauth token with the specified authentication type from a particular application account.
11997c804472Sopenharmony_ci     *
12007c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
12017c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
12027c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12037c804472Sopenharmony_ci     * @returns { Promise<string> } Returns an oauth token.
12047c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12057c804472Sopenharmony_ci     * @since 8
12067c804472Sopenharmony_ci     * @deprecated since 9
12077c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthToken
12087c804472Sopenharmony_ci     */
12097c804472Sopenharmony_ci    getOAuthToken(name: string, owner: string, authType: string): Promise<string>;
12107c804472Sopenharmony_ci
12117c804472Sopenharmony_ci    /**
12127c804472Sopenharmony_ci     * Gets an auth token with the specified authentication type from a particular application account.
12137c804472Sopenharmony_ci     *
12147c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
12157c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
12167c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12177c804472Sopenharmony_ci     * @param { AsyncCallback<string> } callback - Asynchronous callback interface. Returns an auth token.
12187c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
12197c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
12207c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or authType.
12217c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
12227c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
12237c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12247c804472Sopenharmony_ci     * @since 9
12257c804472Sopenharmony_ci     */
12267c804472Sopenharmony_ci    getAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>): void;
12277c804472Sopenharmony_ci
12287c804472Sopenharmony_ci    /**
12297c804472Sopenharmony_ci     * Gets an auth token with the specified authentication type from a particular application account.
12307c804472Sopenharmony_ci     *
12317c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
12327c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
12337c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12347c804472Sopenharmony_ci     * @returns { Promise<string> } Returns an auth token.
12357c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
12367c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
12377c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or authType.
12387c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
12397c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
12407c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12417c804472Sopenharmony_ci     * @since 9
12427c804472Sopenharmony_ci     */
12437c804472Sopenharmony_ci    getAuthToken(name: string, owner: string, authType: string): Promise<string>;
12447c804472Sopenharmony_ci
12457c804472Sopenharmony_ci    /**
12467c804472Sopenharmony_ci     * Sets an oauth token with the specified authentication type for a particular account.
12477c804472Sopenharmony_ci     * <p>
12487c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
12497c804472Sopenharmony_ci     *
12507c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
12517c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12527c804472Sopenharmony_ci     * @param { string } token - Indicates the oauth token.
12537c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
12547c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12557c804472Sopenharmony_ci     * @since 8
12567c804472Sopenharmony_ci     * @deprecated since 9
12577c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAuthToken
12587c804472Sopenharmony_ci     */
12597c804472Sopenharmony_ci    setOAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>): void;
12607c804472Sopenharmony_ci
12617c804472Sopenharmony_ci    /**
12627c804472Sopenharmony_ci     * Sets an oauth token with the specified authentication type for a particular account.
12637c804472Sopenharmony_ci     * <p>
12647c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
12657c804472Sopenharmony_ci     *
12667c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
12677c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12687c804472Sopenharmony_ci     * @param { string } token - Indicates the oauth token.
12697c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
12707c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12717c804472Sopenharmony_ci     * @since 8
12727c804472Sopenharmony_ci     * @deprecated since 9
12737c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAuthToken
12747c804472Sopenharmony_ci     */
12757c804472Sopenharmony_ci    setOAuthToken(name: string, authType: string, token: string): Promise<void>;
12767c804472Sopenharmony_ci
12777c804472Sopenharmony_ci    /**
12787c804472Sopenharmony_ci     * Sets an auth token with the specified authentication type for a particular account.
12797c804472Sopenharmony_ci     * <p>
12807c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
12817c804472Sopenharmony_ci     *
12827c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
12837c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
12847c804472Sopenharmony_ci     * @param { string } token - Indicates the auth token.
12857c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
12867c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
12877c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
12887c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or token.
12897c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
12907c804472Sopenharmony_ci     * @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit.
12917c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
12927c804472Sopenharmony_ci     * @since 9
12937c804472Sopenharmony_ci     */
12947c804472Sopenharmony_ci    setAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>): void;
12957c804472Sopenharmony_ci
12967c804472Sopenharmony_ci    /**
12977c804472Sopenharmony_ci     * Sets an auth token with the specified authentication type for a particular account.
12987c804472Sopenharmony_ci     * <p>
12997c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
13007c804472Sopenharmony_ci     *
13017c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
13027c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13037c804472Sopenharmony_ci     * @param { string } token - Indicates the auth token.
13047c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
13057c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
13067c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
13077c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or token.
13087c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
13097c804472Sopenharmony_ci     * @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit.
13107c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
13117c804472Sopenharmony_ci     * @since 9
13127c804472Sopenharmony_ci     */
13137c804472Sopenharmony_ci    setAuthToken(name: string, authType: string, token: string): Promise<void>;
13147c804472Sopenharmony_ci
13157c804472Sopenharmony_ci    /**
13167c804472Sopenharmony_ci     * Deletes an oauth token for the specified application account.
13177c804472Sopenharmony_ci     * <p>
13187c804472Sopenharmony_ci     * Only tokens visible to the caller application can be deleted.
13197c804472Sopenharmony_ci     *
13207c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
13217c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
13227c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13237c804472Sopenharmony_ci     * @param { string } token - Indicates the oauth token.
13247c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback Asynchronous callback interface.
13257c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
13267c804472Sopenharmony_ci     * @since 8
13277c804472Sopenharmony_ci     * @deprecated since 9
13287c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#deleteAuthToken
13297c804472Sopenharmony_ci     */
13307c804472Sopenharmony_ci    deleteOAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>): void;
13317c804472Sopenharmony_ci
13327c804472Sopenharmony_ci    /**
13337c804472Sopenharmony_ci     * Deletes an oauth token for the specified application account.
13347c804472Sopenharmony_ci     * <p>
13357c804472Sopenharmony_ci     * Only tokens visible to the caller application can be deleted.
13367c804472Sopenharmony_ci     *
13377c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
13387c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
13397c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13407c804472Sopenharmony_ci     * @param { string } token - Indicates the oauth token.
13417c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
13427c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
13437c804472Sopenharmony_ci     * @since 8
13447c804472Sopenharmony_ci     * @deprecated since 9
13457c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#deleteAuthToken
13467c804472Sopenharmony_ci     */
13477c804472Sopenharmony_ci    deleteOAuthToken(name: string, owner: string, authType: string, token: string): Promise<void>;
13487c804472Sopenharmony_ci
13497c804472Sopenharmony_ci    /**
13507c804472Sopenharmony_ci     * Deletes an auth token for the specified application account.
13517c804472Sopenharmony_ci     * <p>
13527c804472Sopenharmony_ci     * Only tokens visible to the caller application can be deleted.
13537c804472Sopenharmony_ci     *
13547c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
13557c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
13567c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13577c804472Sopenharmony_ci     * @param { string } token - Indicates the auth token.
13587c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
13597c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
13607c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
13617c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner, authType or token.
13627c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
13637c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
13647c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
13657c804472Sopenharmony_ci     * @since 9
13667c804472Sopenharmony_ci     */
13677c804472Sopenharmony_ci    deleteAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>): void;
13687c804472Sopenharmony_ci
13697c804472Sopenharmony_ci    /**
13707c804472Sopenharmony_ci     * Deletes an auth token for the specified application account.
13717c804472Sopenharmony_ci     * <p>
13727c804472Sopenharmony_ci     * Only tokens visible to the caller application can be deleted.
13737c804472Sopenharmony_ci     *
13747c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
13757c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
13767c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13777c804472Sopenharmony_ci     * @param { string } token - Indicates the auth token.
13787c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
13797c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
13807c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
13817c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner, authType or token.
13827c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
13837c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
13847c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
13857c804472Sopenharmony_ci     * @since 9
13867c804472Sopenharmony_ci     */
13877c804472Sopenharmony_ci    deleteAuthToken(name: string, owner: string, authType: string, token: string): Promise<void>;
13887c804472Sopenharmony_ci
13897c804472Sopenharmony_ci    /**
13907c804472Sopenharmony_ci     * Sets the oauth token visibility of the specified authentication type to a third-party application.
13917c804472Sopenharmony_ci     * <p>
13927c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
13937c804472Sopenharmony_ci     *
13947c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
13957c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
13967c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
13977c804472Sopenharmony_ci     * @param { boolean } isVisible - Indicates the bool value of visibility.
13987c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
13997c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
14007c804472Sopenharmony_ci     * @since 8
14017c804472Sopenharmony_ci     * @deprecated since 9
14027c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAuthTokenVisibility
14037c804472Sopenharmony_ci     */
14047c804472Sopenharmony_ci    setOAuthTokenVisibility(
14057c804472Sopenharmony_ci      name: string,
14067c804472Sopenharmony_ci      authType: string,
14077c804472Sopenharmony_ci      bundleName: string,
14087c804472Sopenharmony_ci      isVisible: boolean,
14097c804472Sopenharmony_ci      callback: AsyncCallback<void>
14107c804472Sopenharmony_ci    ): void;
14117c804472Sopenharmony_ci
14127c804472Sopenharmony_ci    /**
14137c804472Sopenharmony_ci     * Sets the oauth token visibility of the specified authentication type to a third-party application.
14147c804472Sopenharmony_ci     * <p>
14157c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
14167c804472Sopenharmony_ci     *
14177c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
14187c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
14197c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
14207c804472Sopenharmony_ci     * @param { boolean } isVisible - Indicates the bool value of visibility.
14217c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
14227c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
14237c804472Sopenharmony_ci     * @since 8
14247c804472Sopenharmony_ci     * @deprecated since 9
14257c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#setAuthTokenVisibility
14267c804472Sopenharmony_ci     */
14277c804472Sopenharmony_ci    setOAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise<void>;
14287c804472Sopenharmony_ci
14297c804472Sopenharmony_ci    /**
14307c804472Sopenharmony_ci     * Sets the auth token visibility of the specified authentication type to a third-party application.
14317c804472Sopenharmony_ci     * <p>
14327c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
14337c804472Sopenharmony_ci     *
14347c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
14357c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
14367c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
14377c804472Sopenharmony_ci     * @param { boolean } isVisible - Indicates the bool value of visibility.
14387c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
14397c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
14407c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
14417c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
14427c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
14437c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
14447c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
14457c804472Sopenharmony_ci     * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
14467c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
14477c804472Sopenharmony_ci     * @since 9
14487c804472Sopenharmony_ci     */
14497c804472Sopenharmony_ci    setAuthTokenVisibility(
14507c804472Sopenharmony_ci      name: string,
14517c804472Sopenharmony_ci      authType: string,
14527c804472Sopenharmony_ci      bundleName: string,
14537c804472Sopenharmony_ci      isVisible: boolean,
14547c804472Sopenharmony_ci      callback: AsyncCallback<void>
14557c804472Sopenharmony_ci    ): void;
14567c804472Sopenharmony_ci
14577c804472Sopenharmony_ci    /**
14587c804472Sopenharmony_ci     * Sets the auth token visibility of the specified authentication type to a third-party application.
14597c804472Sopenharmony_ci     * <p>
14607c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
14617c804472Sopenharmony_ci     *
14627c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
14637c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
14647c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
14657c804472Sopenharmony_ci     * @param { boolean } isVisible - Indicates the bool value of visibility.
14667c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
14677c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
14687c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
14697c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
14707c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
14717c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
14727c804472Sopenharmony_ci     * @throws { BusinessError } 12400001 - Application not found.
14737c804472Sopenharmony_ci     * @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
14747c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
14757c804472Sopenharmony_ci     * @since 9
14767c804472Sopenharmony_ci     */
14777c804472Sopenharmony_ci    setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise<void>;
14787c804472Sopenharmony_ci
14797c804472Sopenharmony_ci    /**
14807c804472Sopenharmony_ci     * Checks the oauth token visibility of the specified authentication type for a third-party application.
14817c804472Sopenharmony_ci     * <p>
14827c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
14837c804472Sopenharmony_ci     *
14847c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
14857c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
14867c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
14877c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface. Returns the bool value of visibility.
14887c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
14897c804472Sopenharmony_ci     * @since 8
14907c804472Sopenharmony_ci     * @deprecated since 9
14917c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#checkAuthTokenVisibility
14927c804472Sopenharmony_ci     */
14937c804472Sopenharmony_ci    checkOAuthTokenVisibility(
14947c804472Sopenharmony_ci      name: string,
14957c804472Sopenharmony_ci      authType: string,
14967c804472Sopenharmony_ci      bundleName: string,
14977c804472Sopenharmony_ci      callback: AsyncCallback<boolean>
14987c804472Sopenharmony_ci    ): void;
14997c804472Sopenharmony_ci
15007c804472Sopenharmony_ci    /**
15017c804472Sopenharmony_ci     * Checks the oauth token visibility of the specified authentication type for a third-party application.
15027c804472Sopenharmony_ci     * <p>
15037c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
15047c804472Sopenharmony_ci     *
15057c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15067c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
15077c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
15087c804472Sopenharmony_ci     * @returns { Promise<boolean> } Returns the bool value of visibility.
15097c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15107c804472Sopenharmony_ci     * @since 8
15117c804472Sopenharmony_ci     * @deprecated since 9
15127c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#checkAuthTokenVisibility
15137c804472Sopenharmony_ci     */
15147c804472Sopenharmony_ci    checkOAuthTokenVisibility(name: string, authType: string, bundleName: string): Promise<boolean>;
15157c804472Sopenharmony_ci
15167c804472Sopenharmony_ci    /**
15177c804472Sopenharmony_ci     * Checks the auth token visibility of the specified authentication type for a third-party application.
15187c804472Sopenharmony_ci     * <p>
15197c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
15207c804472Sopenharmony_ci     *
15217c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15227c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
15237c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
15247c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface.
15257c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
15267c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
15277c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
15287c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
15297c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
15307c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15317c804472Sopenharmony_ci     * @since 9
15327c804472Sopenharmony_ci     */
15337c804472Sopenharmony_ci    checkAuthTokenVisibility(
15347c804472Sopenharmony_ci      name: string,
15357c804472Sopenharmony_ci      authType: string,
15367c804472Sopenharmony_ci      bundleName: string,
15377c804472Sopenharmony_ci      callback: AsyncCallback<boolean>
15387c804472Sopenharmony_ci    ): void;
15397c804472Sopenharmony_ci
15407c804472Sopenharmony_ci    /**
15417c804472Sopenharmony_ci     * Checks the auth token visibility of the specified authentication type for a third-party application.
15427c804472Sopenharmony_ci     * <p>
15437c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
15447c804472Sopenharmony_ci     *
15457c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15467c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
15477c804472Sopenharmony_ci     * @param { string } bundleName - Indicates the bundle name of the third-party application.
15487c804472Sopenharmony_ci     * @returns { Promise<boolean> } Returns the bool value of visibility.
15497c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
15507c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
15517c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
15527c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
15537c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
15547c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15557c804472Sopenharmony_ci     * @since 9
15567c804472Sopenharmony_ci     */
15577c804472Sopenharmony_ci    checkAuthTokenVisibility(name: string, authType: string, bundleName: string): Promise<boolean>;
15587c804472Sopenharmony_ci
15597c804472Sopenharmony_ci    /**
15607c804472Sopenharmony_ci     * Gets all oauth tokens visible to the caller application.
15617c804472Sopenharmony_ci     *
15627c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15637c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
15647c804472Sopenharmony_ci     * @param { AsyncCallback<Array<OAuthTokenInfo>> } callback - Asynchronous callback interface.
15657c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15667c804472Sopenharmony_ci     * @since 8
15677c804472Sopenharmony_ci     * @deprecated since 9
15687c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAllAuthTokens
15697c804472Sopenharmony_ci     */
15707c804472Sopenharmony_ci    getAllOAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<OAuthTokenInfo>>): void;
15717c804472Sopenharmony_ci
15727c804472Sopenharmony_ci    /**
15737c804472Sopenharmony_ci     * Gets all oauth tokens visible to the caller application.
15747c804472Sopenharmony_ci     *
15757c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15767c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
15777c804472Sopenharmony_ci     * @returns { Promise<Array<OAuthTokenInfo>> } Returns a list of oauth tokens visible to the caller application.
15787c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15797c804472Sopenharmony_ci     * @since 8
15807c804472Sopenharmony_ci     * @deprecated since 9
15817c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAllAuthTokens
15827c804472Sopenharmony_ci     */
15837c804472Sopenharmony_ci    getAllOAuthTokens(name: string, owner: string): Promise<Array<OAuthTokenInfo>>;
15847c804472Sopenharmony_ci
15857c804472Sopenharmony_ci    /**
15867c804472Sopenharmony_ci     * Gets all auth tokens visible to the caller application.
15877c804472Sopenharmony_ci     *
15887c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
15897c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
15907c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AuthTokenInfo>> } callback - Asynchronous callback interface.
15917c804472Sopenharmony_ci     *   Returns a list of auth tokens visible to the caller application.
15927c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
15937c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
15947c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or owner.
15957c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
15967c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
15977c804472Sopenharmony_ci     * @since 9
15987c804472Sopenharmony_ci     */
15997c804472Sopenharmony_ci    getAllAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<AuthTokenInfo>>): void;
16007c804472Sopenharmony_ci
16017c804472Sopenharmony_ci    /**
16027c804472Sopenharmony_ci     * Gets all auth tokens visible to the caller application.
16037c804472Sopenharmony_ci     *
16047c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application or third-party applications.
16057c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
16067c804472Sopenharmony_ci     * @returns { Promise<Array<AuthTokenInfo>> } Returns a list of auth tokens visible to the caller application.
16077c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
16087c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
16097c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or owner.
16107c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
16117c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16127c804472Sopenharmony_ci     * @since 9
16137c804472Sopenharmony_ci     */
16147c804472Sopenharmony_ci    getAllAuthTokens(name: string, owner: string): Promise<Array<AuthTokenInfo>>;
16157c804472Sopenharmony_ci
16167c804472Sopenharmony_ci    /**
16177c804472Sopenharmony_ci     * Gets the open authorization list with a specified authentication type for a particular application account.
16187c804472Sopenharmony_ci     * <p>
16197c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
16207c804472Sopenharmony_ci     *
16217c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
16227c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
16237c804472Sopenharmony_ci     * @param { AsyncCallback<Array<string>> } callback - Asynchronous callback interface.
16247c804472Sopenharmony_ci     *   Returns the open authorization list of the specified authentication type.
16257c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16267c804472Sopenharmony_ci     * @since 8
16277c804472Sopenharmony_ci     * @deprecated since 9
16287c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthList
16297c804472Sopenharmony_ci     */
16307c804472Sopenharmony_ci    getOAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>): void;
16317c804472Sopenharmony_ci
16327c804472Sopenharmony_ci    /**
16337c804472Sopenharmony_ci     * Gets the open authorization list with a specified authentication type for a particular application account.
16347c804472Sopenharmony_ci     * <p>
16357c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
16367c804472Sopenharmony_ci     *
16377c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
16387c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
16397c804472Sopenharmony_ci     * @returns { Promise<Array<string>> } Returns the open authorization list of the specified authentication type.
16407c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16417c804472Sopenharmony_ci     * @since 8
16427c804472Sopenharmony_ci     * @deprecated since 9
16437c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthList
16447c804472Sopenharmony_ci     */
16457c804472Sopenharmony_ci    getOAuthList(name: string, authType: string): Promise<Array<string>>;
16467c804472Sopenharmony_ci
16477c804472Sopenharmony_ci    /**
16487c804472Sopenharmony_ci     * Gets the open authorization list with a specified authentication type for a particular application account.
16497c804472Sopenharmony_ci     * <p>
16507c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
16517c804472Sopenharmony_ci     *
16527c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
16537c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
16547c804472Sopenharmony_ci     * @param { AsyncCallback<Array<string>> } callback - Asynchronous callback interface.
16557c804472Sopenharmony_ci     *   Returns the open authorization list of the specified authentication type.
16567c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
16577c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
16587c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or authType.
16597c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
16607c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
16617c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16627c804472Sopenharmony_ci     * @since 9
16637c804472Sopenharmony_ci     */
16647c804472Sopenharmony_ci    getAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>): void;
16657c804472Sopenharmony_ci
16667c804472Sopenharmony_ci    /**
16677c804472Sopenharmony_ci     * Gets the open authorization list with a specified authentication type for a particular application account.
16687c804472Sopenharmony_ci     * <p>
16697c804472Sopenharmony_ci     * Only the owner of the application account has the permission to call this method.
16707c804472Sopenharmony_ci     *
16717c804472Sopenharmony_ci     * @param { string } name - Indicates the account name of your application.
16727c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
16737c804472Sopenharmony_ci     * @returns { Promise<Array<string>> } Returns the open authorization list of the specified authentication type.
16747c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
16757c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
16767c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or authType.
16777c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
16787c804472Sopenharmony_ci     * @throws { BusinessError } 12300107 - AuthType not found.
16797c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16807c804472Sopenharmony_ci     * @since 9
16817c804472Sopenharmony_ci     */
16827c804472Sopenharmony_ci    getAuthList(name: string, authType: string): Promise<Array<string>>;
16837c804472Sopenharmony_ci
16847c804472Sopenharmony_ci    /**
16857c804472Sopenharmony_ci     * Gets the authenticator callback with the specified session id.
16867c804472Sopenharmony_ci     * <p>
16877c804472Sopenharmony_ci     * Only the owner of the authenticator has the permission to call this method.
16887c804472Sopenharmony_ci     *
16897c804472Sopenharmony_ci     * @param { string } sessionId - Indicates the id of a authentication session.
16907c804472Sopenharmony_ci     * @param { AsyncCallback<AuthenticatorCallback> } callback - Asynchronous callback interface.
16917c804472Sopenharmony_ci     *   Returns the authenticator callback related to the session id.
16927c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
16937c804472Sopenharmony_ci     * @since 8
16947c804472Sopenharmony_ci     * @deprecated since 9
16957c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthCallback
16967c804472Sopenharmony_ci     */
16977c804472Sopenharmony_ci    getAuthenticatorCallback(sessionId: string, callback: AsyncCallback<AuthenticatorCallback>): void;
16987c804472Sopenharmony_ci
16997c804472Sopenharmony_ci    /**
17007c804472Sopenharmony_ci     * Gets the authenticator callback with the specified session id.
17017c804472Sopenharmony_ci     * <p>
17027c804472Sopenharmony_ci     * Only the owner of the authenticator has the permission to call this method.
17037c804472Sopenharmony_ci     *
17047c804472Sopenharmony_ci     * @param { string } sessionId - Indicates the id of a authentication session.
17057c804472Sopenharmony_ci     * @returns { Promise<AuthenticatorCallback> } Returns the authenticator callback related to the session id.
17067c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17077c804472Sopenharmony_ci     * @since 8
17087c804472Sopenharmony_ci     * @deprecated since 9
17097c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#getAuthCallback
17107c804472Sopenharmony_ci     */
17117c804472Sopenharmony_ci    getAuthenticatorCallback(sessionId: string): Promise<AuthenticatorCallback>;
17127c804472Sopenharmony_ci
17137c804472Sopenharmony_ci    /**
17147c804472Sopenharmony_ci     * Obtains the authenticator callback with the specified session id.
17157c804472Sopenharmony_ci     * <p>
17167c804472Sopenharmony_ci     * Only the owner of the authenticator has the permission to call this method.
17177c804472Sopenharmony_ci     *
17187c804472Sopenharmony_ci     * @param { string } sessionId - Indicates the id of a authentication session.
17197c804472Sopenharmony_ci     * @param { AsyncCallback<AuthCallback> } callback - Asynchronous callback interface.
17207c804472Sopenharmony_ci     *   Returns the authenticator callback related to the session id.
17217c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
17227c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
17237c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid sessionId.
17247c804472Sopenharmony_ci     * @throws { BusinessError } 12300108 - Session not found.
17257c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17267c804472Sopenharmony_ci     * @since 9
17277c804472Sopenharmony_ci     */
17287c804472Sopenharmony_ci    getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): void;
17297c804472Sopenharmony_ci
17307c804472Sopenharmony_ci    /**
17317c804472Sopenharmony_ci     * Obtains the authenticator callback with the specified session id.
17327c804472Sopenharmony_ci     * <p>
17337c804472Sopenharmony_ci     * Only the owner of the authenticator has the permission to call this method.
17347c804472Sopenharmony_ci     *
17357c804472Sopenharmony_ci     * @param { string } sessionId - Indicates the id of a authentication session.
17367c804472Sopenharmony_ci     * @returns { Promise<AuthCallback> } Returns the authenticator callback related to the session id.
17377c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
17387c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
17397c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid sessionId.
17407c804472Sopenharmony_ci     * @throws { BusinessError } 12300108 - Session not found.
17417c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17427c804472Sopenharmony_ci     * @since 9
17437c804472Sopenharmony_ci     */
17447c804472Sopenharmony_ci    getAuthCallback(sessionId: string): Promise<AuthCallback>;
17457c804472Sopenharmony_ci
17467c804472Sopenharmony_ci    /**
17477c804472Sopenharmony_ci     * Gets the authenticator information of an application account.
17487c804472Sopenharmony_ci     *
17497c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
17507c804472Sopenharmony_ci     * @param { AsyncCallback<AuthenticatorInfo> } callback - Asynchronous callback interface.
17517c804472Sopenharmony_ci     *   Returns the authenticator information of the application account.
17527c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17537c804472Sopenharmony_ci     * @since 8
17547c804472Sopenharmony_ci     * @deprecated since 9
17557c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#queryAuthenticatorInfo
17567c804472Sopenharmony_ci     */
17577c804472Sopenharmony_ci    getAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>): void;
17587c804472Sopenharmony_ci
17597c804472Sopenharmony_ci    /**
17607c804472Sopenharmony_ci     * Gets the authenticator information of an application account.
17617c804472Sopenharmony_ci     *
17627c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
17637c804472Sopenharmony_ci     * @returns { Promise<AuthenticatorInfo> } Returns the authenticator information of the application account.
17647c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17657c804472Sopenharmony_ci     * @since 8
17667c804472Sopenharmony_ci     * @deprecated since 9
17677c804472Sopenharmony_ci     * @useinstead appAccount.AppAccountManager#queryAuthenticatorInfo
17687c804472Sopenharmony_ci     */
17697c804472Sopenharmony_ci    getAuthenticatorInfo(owner: string): Promise<AuthenticatorInfo>;
17707c804472Sopenharmony_ci
17717c804472Sopenharmony_ci    /**
17727c804472Sopenharmony_ci     * Queries the authenticator information of an application account.
17737c804472Sopenharmony_ci     *
17747c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
17757c804472Sopenharmony_ci     * @param { AsyncCallback<AuthenticatorInfo> } callback - Asynchronous callback interface.
17767c804472Sopenharmony_ci     *   Returns the authenticator information of the application account.
17777c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
17787c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
17797c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
17807c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
17817c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17827c804472Sopenharmony_ci     * @since 9
17837c804472Sopenharmony_ci     */
17847c804472Sopenharmony_ci    queryAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>): void;
17857c804472Sopenharmony_ci
17867c804472Sopenharmony_ci    /**
17877c804472Sopenharmony_ci     * Queries the authenticator information of an application account.
17887c804472Sopenharmony_ci     *
17897c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner of your application or third-party applications.
17907c804472Sopenharmony_ci     * @returns { Promise<AuthenticatorInfo> } Returns the authenticator information of the application account.
17917c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
17927c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
17937c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
17947c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
17957c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
17967c804472Sopenharmony_ci     * @since 9
17977c804472Sopenharmony_ci     */
17987c804472Sopenharmony_ci    queryAuthenticatorInfo(owner: string): Promise<AuthenticatorInfo>;
17997c804472Sopenharmony_ci
18007c804472Sopenharmony_ci    /**
18017c804472Sopenharmony_ci     * Checks whether a particular account has all specified labels.
18027c804472Sopenharmony_ci     *
18037c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
18047c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner.
18057c804472Sopenharmony_ci     * @param { Array<string> } labels - Indicates an array of labels to check.
18067c804472Sopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Asynchronous callback interface.
18077c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18087c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18097c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or labels.
18107c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
18117c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
18127c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
18137c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
18147c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18157c804472Sopenharmony_ci     * @since 9
18167c804472Sopenharmony_ci     */
18177c804472Sopenharmony_ci    checkAccountLabels(name: string, owner: string, labels: Array<string>, callback: AsyncCallback<boolean>): void;
18187c804472Sopenharmony_ci
18197c804472Sopenharmony_ci    /**
18207c804472Sopenharmony_ci     * Checks whether a particular account has all specified labels.
18217c804472Sopenharmony_ci     *
18227c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
18237c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner.
18247c804472Sopenharmony_ci     * @param { Array<string> } labels - Indicates an array of labels to check.
18257c804472Sopenharmony_ci     * @returns { Promise<boolean> } The promise returned by the function.
18267c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18277c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18287c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or labels.
18297c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
18307c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
18317c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
18327c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
18337c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18347c804472Sopenharmony_ci     * @since 9
18357c804472Sopenharmony_ci     */
18367c804472Sopenharmony_ci    checkAccountLabels(name: string, owner: string, labels: Array<string>): Promise<boolean>;
18377c804472Sopenharmony_ci
18387c804472Sopenharmony_ci    /**
18397c804472Sopenharmony_ci     * Deletes the credential of the specified application account.
18407c804472Sopenharmony_ci     *
18417c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
18427c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to delete.
18437c804472Sopenharmony_ci     * @param { AsyncCallback<void> } callback - Asynchronous callback interface.
18447c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18457c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18467c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or credentialType.
18477c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
18487c804472Sopenharmony_ci     * @throws { BusinessError } 12300102 - Credential not found.
18497c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18507c804472Sopenharmony_ci     * @since 9
18517c804472Sopenharmony_ci     */
18527c804472Sopenharmony_ci    deleteCredential(name: string, credentialType: string, callback: AsyncCallback<void>): void;
18537c804472Sopenharmony_ci
18547c804472Sopenharmony_ci    /**
18557c804472Sopenharmony_ci     * Deletes the credential of the specified application account.
18567c804472Sopenharmony_ci     *
18577c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
18587c804472Sopenharmony_ci     * @param { string } credentialType - Indicates the type of the credential to delete.
18597c804472Sopenharmony_ci     * @returns { Promise<void> } The promise returned by the function.
18607c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18617c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18627c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or credentialType.
18637c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
18647c804472Sopenharmony_ci     * @throws { BusinessError } 12300102 - Credential not found.
18657c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18667c804472Sopenharmony_ci     * @since 9
18677c804472Sopenharmony_ci     */
18687c804472Sopenharmony_ci    deleteCredential(name: string, credentialType: string): Promise<void>;
18697c804472Sopenharmony_ci
18707c804472Sopenharmony_ci    /**
18717c804472Sopenharmony_ci     * Selects a list of accounts that satisfied with the specified options.
18727c804472Sopenharmony_ci     *
18737c804472Sopenharmony_ci     * @param { SelectAccountsOptions } options - Indicates the options for selecting account.
18747c804472Sopenharmony_ci     * @param { AsyncCallback<Array<AppAccountInfo>> } callback - Asynchronous callback interface.
18757c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18767c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18777c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid options.
18787c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
18797c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
18807c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18817c804472Sopenharmony_ci     * @since 9
18827c804472Sopenharmony_ci     */
18837c804472Sopenharmony_ci    selectAccountsByOptions(options: SelectAccountsOptions, callback: AsyncCallback<Array<AppAccountInfo>>): void;
18847c804472Sopenharmony_ci
18857c804472Sopenharmony_ci    /**
18867c804472Sopenharmony_ci     * Selects a list of accounts that satisfied with the specified options.
18877c804472Sopenharmony_ci     *
18887c804472Sopenharmony_ci     * @param { SelectAccountsOptions } options - Indicates the options for selecting account.
18897c804472Sopenharmony_ci     * @returns { Promise<Array<AppAccountInfo>> } Returns a list of accounts.
18907c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
18917c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
18927c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid options.
18937c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
18947c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
18957c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
18967c804472Sopenharmony_ci     * @since 9
18977c804472Sopenharmony_ci     */
18987c804472Sopenharmony_ci    selectAccountsByOptions(options: SelectAccountsOptions): Promise<Array<AppAccountInfo>>;
18997c804472Sopenharmony_ci
19007c804472Sopenharmony_ci    /**
19017c804472Sopenharmony_ci     * Verifies the credential to ensure the user is the owner of the specified account.
19027c804472Sopenharmony_ci     *
19037c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
19047c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner.
19057c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
19067c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
19077c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
19087c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name or owner.
19097c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
19107c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
19117c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
19127c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
19137c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19147c804472Sopenharmony_ci     * @since 9
19157c804472Sopenharmony_ci     */
19167c804472Sopenharmony_ci    verifyCredential(name: string, owner: string, callback: AuthCallback): void;
19177c804472Sopenharmony_ci    /**
19187c804472Sopenharmony_ci     * Verifies the credential to ensure the user is the owner of the specified account.
19197c804472Sopenharmony_ci     *
19207c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
19217c804472Sopenharmony_ci     * @param { string } owner - Indicates the account owner.
19227c804472Sopenharmony_ci     * @param { VerifyCredentialOptions } options - Indicates the options for verifying credential.
19237c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
19247c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
19257c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
19267c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid name, owner or options.
19277c804472Sopenharmony_ci     * @throws { BusinessError } 12300003 - Account not found.
19287c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
19297c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
19307c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
19317c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19327c804472Sopenharmony_ci     * @since 9
19337c804472Sopenharmony_ci     */
19347c804472Sopenharmony_ci    verifyCredential(name: string, owner: string, options: VerifyCredentialOptions, callback: AuthCallback): void;
19357c804472Sopenharmony_ci
19367c804472Sopenharmony_ci    /**
19377c804472Sopenharmony_ci     * Sets properties for the specified account authenticator.
19387c804472Sopenharmony_ci     * <p>
19397c804472Sopenharmony_ci     * If the authenticator supports setting its properties,
19407c804472Sopenharmony_ci     * the caller will normally be redirected to an Ability specified by Want for property setting.
19417c804472Sopenharmony_ci     *
19427c804472Sopenharmony_ci     * @param { string } owner - Indicates the owner of authenticator.
19437c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
19447c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
19457c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
19467c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner.
19477c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
19487c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
19497c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
19507c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19517c804472Sopenharmony_ci     * @since 9
19527c804472Sopenharmony_ci     */
19537c804472Sopenharmony_ci    setAuthenticatorProperties(owner: string, callback: AuthCallback): void;
19547c804472Sopenharmony_ci    /**
19557c804472Sopenharmony_ci     * Sets properties for the specified account authenticator.
19567c804472Sopenharmony_ci     * <p>
19577c804472Sopenharmony_ci     * If the authenticator supports setting its properties,
19587c804472Sopenharmony_ci     * the caller will normally be redirected to an Ability specified by Want for property setting.
19597c804472Sopenharmony_ci     *
19607c804472Sopenharmony_ci     * @param { string } owner - Indicates the owner of authenticator.
19617c804472Sopenharmony_ci     * @param { SetPropertiesOptions } options - Indicates the options for setting properties.
19627c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
19637c804472Sopenharmony_ci     * @throws { BusinessError } 401 - The parameter check failed.
19647c804472Sopenharmony_ci     * @throws { BusinessError } 12300001 - System service exception.
19657c804472Sopenharmony_ci     * @throws { BusinessError } 12300002 - Invalid owner or options.
19667c804472Sopenharmony_ci     * @throws { BusinessError } 12300010 - Account service busy.
19677c804472Sopenharmony_ci     * @throws { BusinessError } 12300113 - Authenticator service not found.
19687c804472Sopenharmony_ci     * @throws { BusinessError } 12300114 - Authenticator service exception.
19697c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19707c804472Sopenharmony_ci     * @since 9
19717c804472Sopenharmony_ci     */
19727c804472Sopenharmony_ci    setAuthenticatorProperties(owner: string, options: SetPropertiesOptions, callback: AuthCallback): void;
19737c804472Sopenharmony_ci  }
19747c804472Sopenharmony_ci
19757c804472Sopenharmony_ci  /**
19767c804472Sopenharmony_ci   * Provides basic information of an application account, including the account owner and name.
19777c804472Sopenharmony_ci   *
19787c804472Sopenharmony_ci   * @interface AppAccountInfo
19797c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
19807c804472Sopenharmony_ci   * @since 7
19817c804472Sopenharmony_ci   */
19827c804472Sopenharmony_ci  interface AppAccountInfo {
19837c804472Sopenharmony_ci    /**
19847c804472Sopenharmony_ci     * The owner an application account.
19857c804472Sopenharmony_ci     *
19867c804472Sopenharmony_ci     * @type { string }
19877c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19887c804472Sopenharmony_ci     * @since 7
19897c804472Sopenharmony_ci     */
19907c804472Sopenharmony_ci    owner: string;
19917c804472Sopenharmony_ci
19927c804472Sopenharmony_ci    /**
19937c804472Sopenharmony_ci     * The name an application account.
19947c804472Sopenharmony_ci     *
19957c804472Sopenharmony_ci     * @type { string }
19967c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
19977c804472Sopenharmony_ci     * @since 7
19987c804472Sopenharmony_ci     */
19997c804472Sopenharmony_ci    name: string;
20007c804472Sopenharmony_ci  }
20017c804472Sopenharmony_ci
20027c804472Sopenharmony_ci  /**
20037c804472Sopenharmony_ci   * Provides basic information of an oauth token, including the authentication type and token value.
20047c804472Sopenharmony_ci   *
20057c804472Sopenharmony_ci   * @interface OAuthTokenInfo
20067c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
20077c804472Sopenharmony_ci   * @since 8
20087c804472Sopenharmony_ci   * @deprecated since 9
20097c804472Sopenharmony_ci   * @useinstead appAccount.AuthTokenInfo
20107c804472Sopenharmony_ci   */
20117c804472Sopenharmony_ci  interface OAuthTokenInfo {
20127c804472Sopenharmony_ci    /**
20137c804472Sopenharmony_ci     * The authentication type.
20147c804472Sopenharmony_ci     *
20157c804472Sopenharmony_ci     * @type { string }
20167c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20177c804472Sopenharmony_ci     * @since 8
20187c804472Sopenharmony_ci     * @deprecated since 9
20197c804472Sopenharmony_ci     */
20207c804472Sopenharmony_ci    authType: string;
20217c804472Sopenharmony_ci
20227c804472Sopenharmony_ci    /**
20237c804472Sopenharmony_ci     * The token value.
20247c804472Sopenharmony_ci     *
20257c804472Sopenharmony_ci     * @type { string }
20267c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20277c804472Sopenharmony_ci     * @since 8
20287c804472Sopenharmony_ci     * @deprecated since 9
20297c804472Sopenharmony_ci     */
20307c804472Sopenharmony_ci    token: string;
20317c804472Sopenharmony_ci  }
20327c804472Sopenharmony_ci
20337c804472Sopenharmony_ci  /**
20347c804472Sopenharmony_ci   * Provides basic information of an auth token, including the authentication type and token value.
20357c804472Sopenharmony_ci   *
20367c804472Sopenharmony_ci   * @interface AuthTokenInfo
20377c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
20387c804472Sopenharmony_ci   * @since 9
20397c804472Sopenharmony_ci   */
20407c804472Sopenharmony_ci  interface AuthTokenInfo {
20417c804472Sopenharmony_ci    /**
20427c804472Sopenharmony_ci     * The authentication type.
20437c804472Sopenharmony_ci     *
20447c804472Sopenharmony_ci     * @type { string }
20457c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20467c804472Sopenharmony_ci     * @since 9
20477c804472Sopenharmony_ci     */
20487c804472Sopenharmony_ci    authType: string;
20497c804472Sopenharmony_ci
20507c804472Sopenharmony_ci    /**
20517c804472Sopenharmony_ci     * The token value.
20527c804472Sopenharmony_ci     *
20537c804472Sopenharmony_ci     * @type { string }
20547c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20557c804472Sopenharmony_ci     * @since 9
20567c804472Sopenharmony_ci     */
20577c804472Sopenharmony_ci    token: string;
20587c804472Sopenharmony_ci
20597c804472Sopenharmony_ci    /**
20607c804472Sopenharmony_ci     * The account to which the token belongs.
20617c804472Sopenharmony_ci     *
20627c804472Sopenharmony_ci     * @type { ?AppAccountInfo }
20637c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20647c804472Sopenharmony_ci     * @since 9
20657c804472Sopenharmony_ci     */
20667c804472Sopenharmony_ci    account?: AppAccountInfo;
20677c804472Sopenharmony_ci  }
20687c804472Sopenharmony_ci
20697c804472Sopenharmony_ci  /**
20707c804472Sopenharmony_ci   * Provides basic information of an authenticator, including the authenticator owner, icon id and label id.
20717c804472Sopenharmony_ci   *
20727c804472Sopenharmony_ci   * @interface AuthenticatorInfo
20737c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
20747c804472Sopenharmony_ci   * @since 8
20757c804472Sopenharmony_ci   */
20767c804472Sopenharmony_ci  interface AuthenticatorInfo {
20777c804472Sopenharmony_ci    /**
20787c804472Sopenharmony_ci     * The owner of an authenticator.
20797c804472Sopenharmony_ci     *
20807c804472Sopenharmony_ci     * @type { string }
20817c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20827c804472Sopenharmony_ci     * @since 8
20837c804472Sopenharmony_ci     */
20847c804472Sopenharmony_ci    owner: string;
20857c804472Sopenharmony_ci
20867c804472Sopenharmony_ci    /**
20877c804472Sopenharmony_ci     * The icon id of an authenticator.
20887c804472Sopenharmony_ci     *
20897c804472Sopenharmony_ci     * @type { number }
20907c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
20917c804472Sopenharmony_ci     * @since 8
20927c804472Sopenharmony_ci     */
20937c804472Sopenharmony_ci    iconId: number;
20947c804472Sopenharmony_ci
20957c804472Sopenharmony_ci    /**
20967c804472Sopenharmony_ci     * The label id of an authenticator.
20977c804472Sopenharmony_ci     *
20987c804472Sopenharmony_ci     * @type { number }
20997c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21007c804472Sopenharmony_ci     * @since 8
21017c804472Sopenharmony_ci     */
21027c804472Sopenharmony_ci    labelId: number;
21037c804472Sopenharmony_ci  }
21047c804472Sopenharmony_ci
21057c804472Sopenharmony_ci  /**
21067c804472Sopenharmony_ci   * Provides the definition of the authentication result.
21077c804472Sopenharmony_ci   *
21087c804472Sopenharmony_ci   * @interface AuthResult
21097c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
21107c804472Sopenharmony_ci   * @since 9
21117c804472Sopenharmony_ci   */
21127c804472Sopenharmony_ci  interface AuthResult {
21137c804472Sopenharmony_ci    /**
21147c804472Sopenharmony_ci     * The account information.
21157c804472Sopenharmony_ci     *
21167c804472Sopenharmony_ci     * @type { ?AppAccountInfo }
21177c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21187c804472Sopenharmony_ci     * @since 9
21197c804472Sopenharmony_ci     */
21207c804472Sopenharmony_ci    account?: AppAccountInfo;
21217c804472Sopenharmony_ci
21227c804472Sopenharmony_ci    /**
21237c804472Sopenharmony_ci     * The token information.
21247c804472Sopenharmony_ci     *
21257c804472Sopenharmony_ci     * @type { ?AuthTokenInfo }
21267c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21277c804472Sopenharmony_ci     * @since 9
21287c804472Sopenharmony_ci     */
21297c804472Sopenharmony_ci    tokenInfo?: AuthTokenInfo;
21307c804472Sopenharmony_ci  }
21317c804472Sopenharmony_ci
21327c804472Sopenharmony_ci  /**
21337c804472Sopenharmony_ci   * Provides the available options for creating an account.
21347c804472Sopenharmony_ci   *
21357c804472Sopenharmony_ci   * @interface CreateAccountOptions
21367c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
21377c804472Sopenharmony_ci   * @since 9
21387c804472Sopenharmony_ci   */
21397c804472Sopenharmony_ci  interface CreateAccountOptions {
21407c804472Sopenharmony_ci    /**
21417c804472Sopenharmony_ci     * The custom data for creating an account,
21427c804472Sopenharmony_ci     * which can be further modified by function setCustomData.
21437c804472Sopenharmony_ci     *
21447c804472Sopenharmony_ci     * @type { ?Record<string, string> }
21457c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21467c804472Sopenharmony_ci     * @since 9
21477c804472Sopenharmony_ci     */
21487c804472Sopenharmony_ci    customData?: Record<string, string>;
21497c804472Sopenharmony_ci  }
21507c804472Sopenharmony_ci
21517c804472Sopenharmony_ci  /**
21527c804472Sopenharmony_ci   * Provides the available options for creating an account implicitly.
21537c804472Sopenharmony_ci   *
21547c804472Sopenharmony_ci   * @interface CreateAccountImplicitlyOptions
21557c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
21567c804472Sopenharmony_ci   * @since 9
21577c804472Sopenharmony_ci   */
21587c804472Sopenharmony_ci  interface CreateAccountImplicitlyOptions {
21597c804472Sopenharmony_ci    /**
21607c804472Sopenharmony_ci     * The required labels for creating an account.
21617c804472Sopenharmony_ci     *
21627c804472Sopenharmony_ci     * @type { ?Array<string> }
21637c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21647c804472Sopenharmony_ci     * @since 9
21657c804472Sopenharmony_ci     */
21667c804472Sopenharmony_ci    requiredLabels?: Array<string>;
21677c804472Sopenharmony_ci
21687c804472Sopenharmony_ci    /**
21697c804472Sopenharmony_ci     * The authentication type.
21707c804472Sopenharmony_ci     *
21717c804472Sopenharmony_ci     * @type { ?string }
21727c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21737c804472Sopenharmony_ci     * @since 9
21747c804472Sopenharmony_ci     */
21757c804472Sopenharmony_ci    authType?: string;
21767c804472Sopenharmony_ci
21777c804472Sopenharmony_ci    /**
21787c804472Sopenharmony_ci     * The authenticator-specific parameters.
21797c804472Sopenharmony_ci     * The list of reserved parameter name:
21807c804472Sopenharmony_ci     * 1. Constants.KEY_CALLER_BUNDLE_NAME;
21817c804472Sopenharmony_ci     * The above parameters are set by the appAccount management service and can be used for identify the caller.
21827c804472Sopenharmony_ci     *
21837c804472Sopenharmony_ci     * @type { ?Record<string, Object> }
21847c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
21857c804472Sopenharmony_ci     * @since 9
21867c804472Sopenharmony_ci     */
21877c804472Sopenharmony_ci    parameters?: Record<string, Object>;
21887c804472Sopenharmony_ci  }
21897c804472Sopenharmony_ci
21907c804472Sopenharmony_ci  /**
21917c804472Sopenharmony_ci   * Provides the available options for selecting accounts.
21927c804472Sopenharmony_ci   *
21937c804472Sopenharmony_ci   * @interface SelectAccountsOptions
21947c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
21957c804472Sopenharmony_ci   * @since 9
21967c804472Sopenharmony_ci   */
21977c804472Sopenharmony_ci  interface SelectAccountsOptions {
21987c804472Sopenharmony_ci    /**
21997c804472Sopenharmony_ci     * The list of accounts allowed to be selected.
22007c804472Sopenharmony_ci     *
22017c804472Sopenharmony_ci     * @type { ?Array<AppAccountInfo> }
22027c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22037c804472Sopenharmony_ci     * @since 9
22047c804472Sopenharmony_ci     */
22057c804472Sopenharmony_ci    allowedAccounts?: Array<AppAccountInfo>;
22067c804472Sopenharmony_ci
22077c804472Sopenharmony_ci    /**
22087c804472Sopenharmony_ci     * The list of account owners, whose accounts allowed to be selected.
22097c804472Sopenharmony_ci     *
22107c804472Sopenharmony_ci     * @type { ?Array<string> }
22117c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22127c804472Sopenharmony_ci     * @since 9
22137c804472Sopenharmony_ci     */
22147c804472Sopenharmony_ci    allowedOwners?: Array<string>;
22157c804472Sopenharmony_ci
22167c804472Sopenharmony_ci    /**
22177c804472Sopenharmony_ci     * The labels required for the selected accounts.
22187c804472Sopenharmony_ci     *
22197c804472Sopenharmony_ci     * @type { ?Array<string> }
22207c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22217c804472Sopenharmony_ci     * @since 9
22227c804472Sopenharmony_ci     */
22237c804472Sopenharmony_ci    requiredLabels?: Array<string>;
22247c804472Sopenharmony_ci  }
22257c804472Sopenharmony_ci
22267c804472Sopenharmony_ci  /**
22277c804472Sopenharmony_ci   * Provides the available options for verifying credential.
22287c804472Sopenharmony_ci   *
22297c804472Sopenharmony_ci   * @interface VerifyCredentialOptions
22307c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
22317c804472Sopenharmony_ci   * @since 9
22327c804472Sopenharmony_ci   */
22337c804472Sopenharmony_ci  interface VerifyCredentialOptions {
22347c804472Sopenharmony_ci    /**
22357c804472Sopenharmony_ci     * The credential type to be verified.
22367c804472Sopenharmony_ci     *
22377c804472Sopenharmony_ci     * @type { ?string }
22387c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22397c804472Sopenharmony_ci     * @since 9
22407c804472Sopenharmony_ci     */
22417c804472Sopenharmony_ci    credentialType?: string;
22427c804472Sopenharmony_ci
22437c804472Sopenharmony_ci    /**
22447c804472Sopenharmony_ci     * The credential to be verified.
22457c804472Sopenharmony_ci     *
22467c804472Sopenharmony_ci     * @type { ?string }
22477c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22487c804472Sopenharmony_ci     * @since 9
22497c804472Sopenharmony_ci     */
22507c804472Sopenharmony_ci    credential?: string;
22517c804472Sopenharmony_ci
22527c804472Sopenharmony_ci    /**
22537c804472Sopenharmony_ci     * The authenticator-specific parameters.
22547c804472Sopenharmony_ci     * The list of reserved parameter name:
22557c804472Sopenharmony_ci     * 1. Constants.KEY_CALLER_BUNDLE_NAME;
22567c804472Sopenharmony_ci     * The above parameters are set by the appAccount management service and can be used for identify the caller.
22577c804472Sopenharmony_ci     *
22587c804472Sopenharmony_ci     * @type { ?Record<string, Object> }
22597c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22607c804472Sopenharmony_ci     * @since 9
22617c804472Sopenharmony_ci     */
22627c804472Sopenharmony_ci    parameters?: Record<string, Object>;
22637c804472Sopenharmony_ci  }
22647c804472Sopenharmony_ci
22657c804472Sopenharmony_ci  /**
22667c804472Sopenharmony_ci   * Provides the available options for setting properties.
22677c804472Sopenharmony_ci   *
22687c804472Sopenharmony_ci   * @interface SetPropertiesOptions
22697c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
22707c804472Sopenharmony_ci   * @since 9
22717c804472Sopenharmony_ci   */
22727c804472Sopenharmony_ci  interface SetPropertiesOptions {
22737c804472Sopenharmony_ci    /**
22747c804472Sopenharmony_ci     * The properties to be set.
22757c804472Sopenharmony_ci     *
22767c804472Sopenharmony_ci     * @type { ?Record<string, Object> }
22777c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22787c804472Sopenharmony_ci     * @since 9
22797c804472Sopenharmony_ci     */
22807c804472Sopenharmony_ci    properties?: Record<string, Object>;
22817c804472Sopenharmony_ci
22827c804472Sopenharmony_ci    /**
22837c804472Sopenharmony_ci     * The authenticator-specific parameters.
22847c804472Sopenharmony_ci     * The list of reserved parameter name:
22857c804472Sopenharmony_ci     * 1. Constants.KEY_CALLER_BUNDLE_NAME;
22867c804472Sopenharmony_ci     * The above parameters are set by the appAccount management service and can be used for identify the caller.
22877c804472Sopenharmony_ci     *
22887c804472Sopenharmony_ci     * @type { ?Record<string, Object> }
22897c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
22907c804472Sopenharmony_ci     * @since 9
22917c804472Sopenharmony_ci     */
22927c804472Sopenharmony_ci    parameters?: Record<string, Object>;
22937c804472Sopenharmony_ci  }
22947c804472Sopenharmony_ci
22957c804472Sopenharmony_ci  /**
22967c804472Sopenharmony_ci   * Provides constants definition.
22977c804472Sopenharmony_ci   *
22987c804472Sopenharmony_ci   * @enum { string } Constants
22997c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
23007c804472Sopenharmony_ci   * @since 8
23017c804472Sopenharmony_ci   */
23027c804472Sopenharmony_ci  enum Constants {
23037c804472Sopenharmony_ci    /**
23047c804472Sopenharmony_ci     * Indicates the action for adding account implicitly.
23057c804472Sopenharmony_ci     *
23067c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23077c804472Sopenharmony_ci     * @since 8
23087c804472Sopenharmony_ci     * @deprecated since 9
23097c804472Sopenharmony_ci     * @useinstead appAccount.Constants#ACTION_CREATE_ACCOUNT_IMPLICITLY
23107c804472Sopenharmony_ci     */
23117c804472Sopenharmony_ci    ACTION_ADD_ACCOUNT_IMPLICITLY = 'addAccountImplicitly',
23127c804472Sopenharmony_ci
23137c804472Sopenharmony_ci    /**
23147c804472Sopenharmony_ci     * Indicates the action for authenticating.
23157c804472Sopenharmony_ci     *
23167c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23177c804472Sopenharmony_ci     * @since 8
23187c804472Sopenharmony_ci     * @deprecated since 9
23197c804472Sopenharmony_ci     * @useinstead appAccount.Constants#ACTION_AUTH
23207c804472Sopenharmony_ci     */
23217c804472Sopenharmony_ci    ACTION_AUTHENTICATE = 'authenticate',
23227c804472Sopenharmony_ci
23237c804472Sopenharmony_ci    /**
23247c804472Sopenharmony_ci     * Indicates the action for creating account implicitly.
23257c804472Sopenharmony_ci     *
23267c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23277c804472Sopenharmony_ci     * @since 9
23287c804472Sopenharmony_ci     */
23297c804472Sopenharmony_ci    ACTION_CREATE_ACCOUNT_IMPLICITLY = 'createAccountImplicitly',
23307c804472Sopenharmony_ci
23317c804472Sopenharmony_ci    /**
23327c804472Sopenharmony_ci     * Indicates the action for authenticating.
23337c804472Sopenharmony_ci     *
23347c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23357c804472Sopenharmony_ci     * @since 9
23367c804472Sopenharmony_ci     */
23377c804472Sopenharmony_ci    ACTION_AUTH = 'auth',
23387c804472Sopenharmony_ci
23397c804472Sopenharmony_ci    /**
23407c804472Sopenharmony_ci     * Indicates the action for verifying credential.
23417c804472Sopenharmony_ci     *
23427c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23437c804472Sopenharmony_ci     * @since 9
23447c804472Sopenharmony_ci     */
23457c804472Sopenharmony_ci    ACTION_VERIFY_CREDENTIAL = 'verifyCredential',
23467c804472Sopenharmony_ci
23477c804472Sopenharmony_ci    /**
23487c804472Sopenharmony_ci     * Indicates the action for set authenticator properties.
23497c804472Sopenharmony_ci     *
23507c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23517c804472Sopenharmony_ci     * @since 9
23527c804472Sopenharmony_ci     */
23537c804472Sopenharmony_ci    ACTION_SET_AUTHENTICATOR_PROPERTIES = 'setAuthenticatorProperties',
23547c804472Sopenharmony_ci
23557c804472Sopenharmony_ci    /**
23567c804472Sopenharmony_ci     * Indicates the key of name.
23577c804472Sopenharmony_ci     *
23587c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23597c804472Sopenharmony_ci     * @since 8
23607c804472Sopenharmony_ci     */
23617c804472Sopenharmony_ci    KEY_NAME = 'name',
23627c804472Sopenharmony_ci
23637c804472Sopenharmony_ci    /**
23647c804472Sopenharmony_ci     * Indicates the key of owner.
23657c804472Sopenharmony_ci     *
23667c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23677c804472Sopenharmony_ci     * @since 8
23687c804472Sopenharmony_ci     */
23697c804472Sopenharmony_ci    KEY_OWNER = 'owner',
23707c804472Sopenharmony_ci
23717c804472Sopenharmony_ci    /**
23727c804472Sopenharmony_ci     * Indicates the key of token.
23737c804472Sopenharmony_ci     *
23747c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23757c804472Sopenharmony_ci     * @since 8
23767c804472Sopenharmony_ci     */
23777c804472Sopenharmony_ci    KEY_TOKEN = 'token',
23787c804472Sopenharmony_ci
23797c804472Sopenharmony_ci    /**
23807c804472Sopenharmony_ci     * Indicates the key of action.
23817c804472Sopenharmony_ci     *
23827c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23837c804472Sopenharmony_ci     * @since 8
23847c804472Sopenharmony_ci     */
23857c804472Sopenharmony_ci    KEY_ACTION = 'action',
23867c804472Sopenharmony_ci
23877c804472Sopenharmony_ci    /**
23887c804472Sopenharmony_ci     * Indicates the key of authentication type.
23897c804472Sopenharmony_ci     *
23907c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23917c804472Sopenharmony_ci     * @since 8
23927c804472Sopenharmony_ci     */
23937c804472Sopenharmony_ci    KEY_AUTH_TYPE = 'authType',
23947c804472Sopenharmony_ci
23957c804472Sopenharmony_ci    /**
23967c804472Sopenharmony_ci     * Indicates the key of session id.
23977c804472Sopenharmony_ci     *
23987c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
23997c804472Sopenharmony_ci     * @since 8
24007c804472Sopenharmony_ci     */
24017c804472Sopenharmony_ci    KEY_SESSION_ID = 'sessionId',
24027c804472Sopenharmony_ci
24037c804472Sopenharmony_ci    /**
24047c804472Sopenharmony_ci     * Indicates the key of caller pid.
24057c804472Sopenharmony_ci     *
24067c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
24077c804472Sopenharmony_ci     * @since 8
24087c804472Sopenharmony_ci     */
24097c804472Sopenharmony_ci    KEY_CALLER_PID = 'callerPid',
24107c804472Sopenharmony_ci
24117c804472Sopenharmony_ci    /**
24127c804472Sopenharmony_ci     * Indicates the key of caller uid.
24137c804472Sopenharmony_ci     *
24147c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
24157c804472Sopenharmony_ci     * @since 8
24167c804472Sopenharmony_ci     */
24177c804472Sopenharmony_ci    KEY_CALLER_UID = 'callerUid',
24187c804472Sopenharmony_ci
24197c804472Sopenharmony_ci    /**
24207c804472Sopenharmony_ci     * Indicates the key of caller bundle name.
24217c804472Sopenharmony_ci     *
24227c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
24237c804472Sopenharmony_ci     * @since 8
24247c804472Sopenharmony_ci     */
24257c804472Sopenharmony_ci    KEY_CALLER_BUNDLE_NAME = 'callerBundleName',
24267c804472Sopenharmony_ci
24277c804472Sopenharmony_ci    /**
24287c804472Sopenharmony_ci     * Indicates the key of required labels.
24297c804472Sopenharmony_ci     *
24307c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
24317c804472Sopenharmony_ci     * @since 9
24327c804472Sopenharmony_ci     */
24337c804472Sopenharmony_ci    KEY_REQUIRED_LABELS = 'requiredLabels',
24347c804472Sopenharmony_ci
24357c804472Sopenharmony_ci    /**
24367c804472Sopenharmony_ci     * Indicates the key of boolean result.
24377c804472Sopenharmony_ci     *
24387c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
24397c804472Sopenharmony_ci     * @since 9
24407c804472Sopenharmony_ci     */
24417c804472Sopenharmony_ci    KEY_BOOLEAN_RESULT = 'booleanResult'
24427c804472Sopenharmony_ci  }
24437c804472Sopenharmony_ci
24447c804472Sopenharmony_ci  /**
24457c804472Sopenharmony_ci   * Provides result code definition.
24467c804472Sopenharmony_ci   *
24477c804472Sopenharmony_ci   * @enum { number } ResultCode
24487c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
24497c804472Sopenharmony_ci   * @since 8
24507c804472Sopenharmony_ci   * @deprecated since 9
24517c804472Sopenharmony_ci   */
24527c804472Sopenharmony_ci  enum ResultCode {
24537c804472Sopenharmony_ci    /**
24547c804472Sopenharmony_ci    * Indicates the success result.
24557c804472Sopenharmony_ci    *
24567c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
24577c804472Sopenharmony_ci    * @since 8
24587c804472Sopenharmony_ci    * @deprecated since 9
24597c804472Sopenharmony_ci    */
24607c804472Sopenharmony_ci    SUCCESS = 0,
24617c804472Sopenharmony_ci
24627c804472Sopenharmony_ci    /**
24637c804472Sopenharmony_ci    * Indicates the result of account not exist.
24647c804472Sopenharmony_ci    *
24657c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
24667c804472Sopenharmony_ci    * @since 8
24677c804472Sopenharmony_ci    * @deprecated since 9
24687c804472Sopenharmony_ci    */
24697c804472Sopenharmony_ci    ERROR_ACCOUNT_NOT_EXIST = 10001,
24707c804472Sopenharmony_ci
24717c804472Sopenharmony_ci    /**
24727c804472Sopenharmony_ci    * Indicates the result of account service exception.
24737c804472Sopenharmony_ci    *
24747c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
24757c804472Sopenharmony_ci    * @since 8
24767c804472Sopenharmony_ci    * @deprecated since 9
24777c804472Sopenharmony_ci    */
24787c804472Sopenharmony_ci    ERROR_APP_ACCOUNT_SERVICE_EXCEPTION = 10002,
24797c804472Sopenharmony_ci
24807c804472Sopenharmony_ci    /**
24817c804472Sopenharmony_ci    * Indicates the result of password is invalid.
24827c804472Sopenharmony_ci    *
24837c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
24847c804472Sopenharmony_ci    * @since 8
24857c804472Sopenharmony_ci    * @deprecated since 9
24867c804472Sopenharmony_ci    */
24877c804472Sopenharmony_ci    ERROR_INVALID_PASSWORD = 10003,
24887c804472Sopenharmony_ci
24897c804472Sopenharmony_ci    /**
24907c804472Sopenharmony_ci    * Indicates the result of request is invalid.
24917c804472Sopenharmony_ci    *
24927c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
24937c804472Sopenharmony_ci    * @since 8
24947c804472Sopenharmony_ci    * @deprecated since 9
24957c804472Sopenharmony_ci    */
24967c804472Sopenharmony_ci    ERROR_INVALID_REQUEST = 10004,
24977c804472Sopenharmony_ci
24987c804472Sopenharmony_ci    /**
24997c804472Sopenharmony_ci    * Indicates the result of response is invalid.
25007c804472Sopenharmony_ci    *
25017c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25027c804472Sopenharmony_ci    * @since 8
25037c804472Sopenharmony_ci    * @deprecated since 9
25047c804472Sopenharmony_ci    */
25057c804472Sopenharmony_ci    ERROR_INVALID_RESPONSE = 10005,
25067c804472Sopenharmony_ci
25077c804472Sopenharmony_ci    /**
25087c804472Sopenharmony_ci    * Indicates the result of network exception.
25097c804472Sopenharmony_ci    *
25107c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25117c804472Sopenharmony_ci    * @since 8
25127c804472Sopenharmony_ci    * @deprecated since 9
25137c804472Sopenharmony_ci    */
25147c804472Sopenharmony_ci    ERROR_NETWORK_EXCEPTION = 10006,
25157c804472Sopenharmony_ci
25167c804472Sopenharmony_ci    /**
25177c804472Sopenharmony_ci    * Indicates the result of network exception.
25187c804472Sopenharmony_ci    *
25197c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25207c804472Sopenharmony_ci    * @since 8
25217c804472Sopenharmony_ci    * @deprecated since 9
25227c804472Sopenharmony_ci    */
25237c804472Sopenharmony_ci    ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST = 10007,
25247c804472Sopenharmony_ci
25257c804472Sopenharmony_ci    /**
25267c804472Sopenharmony_ci    * Indicates the result of auth has been canceled.
25277c804472Sopenharmony_ci    *
25287c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25297c804472Sopenharmony_ci    * @since 8
25307c804472Sopenharmony_ci    * @deprecated since 9
25317c804472Sopenharmony_ci    */
25327c804472Sopenharmony_ci    ERROR_OAUTH_CANCELED = 10008,
25337c804472Sopenharmony_ci
25347c804472Sopenharmony_ci    /**
25357c804472Sopenharmony_ci    * Indicates the result of auth list is too large.
25367c804472Sopenharmony_ci    *
25377c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25387c804472Sopenharmony_ci    * @since 8
25397c804472Sopenharmony_ci    * @deprecated since 9
25407c804472Sopenharmony_ci    */
25417c804472Sopenharmony_ci    ERROR_OAUTH_LIST_TOO_LARGE = 10009,
25427c804472Sopenharmony_ci
25437c804472Sopenharmony_ci    /**
25447c804472Sopenharmony_ci    * Indicates the result of auth service is busy.
25457c804472Sopenharmony_ci    *
25467c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25477c804472Sopenharmony_ci    * @since 8
25487c804472Sopenharmony_ci    * @deprecated since 9
25497c804472Sopenharmony_ci    */
25507c804472Sopenharmony_ci    ERROR_OAUTH_SERVICE_BUSY = 10010,
25517c804472Sopenharmony_ci
25527c804472Sopenharmony_ci    /**
25537c804472Sopenharmony_ci    * Indicates the result of auth service exception.
25547c804472Sopenharmony_ci    *
25557c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25567c804472Sopenharmony_ci    * @since 8
25577c804472Sopenharmony_ci    * @deprecated since 9
25587c804472Sopenharmony_ci    */
25597c804472Sopenharmony_ci    ERROR_OAUTH_SERVICE_EXCEPTION = 10011,
25607c804472Sopenharmony_ci
25617c804472Sopenharmony_ci    /**
25627c804472Sopenharmony_ci    * Indicates the result of auth session is not exist.
25637c804472Sopenharmony_ci    *
25647c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25657c804472Sopenharmony_ci    * @since 8
25667c804472Sopenharmony_ci    * @deprecated since 9
25677c804472Sopenharmony_ci    */
25687c804472Sopenharmony_ci    ERROR_OAUTH_SESSION_NOT_EXIST = 10012,
25697c804472Sopenharmony_ci
25707c804472Sopenharmony_ci    /**
25717c804472Sopenharmony_ci    * Indicates the result of auth timeout.
25727c804472Sopenharmony_ci    *
25737c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25747c804472Sopenharmony_ci    * @since 8
25757c804472Sopenharmony_ci    * @deprecated since 9
25767c804472Sopenharmony_ci    */
25777c804472Sopenharmony_ci    ERROR_OAUTH_TIMEOUT = 10013,
25787c804472Sopenharmony_ci
25797c804472Sopenharmony_ci    /**
25807c804472Sopenharmony_ci    * Indicates the result of token is not exist.
25817c804472Sopenharmony_ci    *
25827c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25837c804472Sopenharmony_ci    * @since 8
25847c804472Sopenharmony_ci    * @deprecated since 9
25857c804472Sopenharmony_ci    */
25867c804472Sopenharmony_ci    ERROR_OAUTH_TOKEN_NOT_EXIST = 10014,
25877c804472Sopenharmony_ci
25887c804472Sopenharmony_ci    /**
25897c804472Sopenharmony_ci    * Indicates the result of token is too many.
25907c804472Sopenharmony_ci    *
25917c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
25927c804472Sopenharmony_ci    * @since 8
25937c804472Sopenharmony_ci    * @deprecated since 9
25947c804472Sopenharmony_ci    */
25957c804472Sopenharmony_ci    ERROR_OAUTH_TOKEN_TOO_MANY = 10015,
25967c804472Sopenharmony_ci
25977c804472Sopenharmony_ci    /**
25987c804472Sopenharmony_ci    * Indicates the result of not supported action.
25997c804472Sopenharmony_ci    *
26007c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
26017c804472Sopenharmony_ci    * @since 8
26027c804472Sopenharmony_ci    * @deprecated since 9
26037c804472Sopenharmony_ci    */
26047c804472Sopenharmony_ci    ERROR_OAUTH_UNSUPPORT_ACTION = 10016,
26057c804472Sopenharmony_ci
26067c804472Sopenharmony_ci    /**
26077c804472Sopenharmony_ci    * Indicates the result of not supported auth type.
26087c804472Sopenharmony_ci    *
26097c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
26107c804472Sopenharmony_ci    * @since 8
26117c804472Sopenharmony_ci    * @deprecated since 9
26127c804472Sopenharmony_ci    */
26137c804472Sopenharmony_ci    ERROR_OAUTH_UNSUPPORT_AUTH_TYPE = 10017,
26147c804472Sopenharmony_ci
26157c804472Sopenharmony_ci    /**
26167c804472Sopenharmony_ci    * Indicates the result of permission denied.
26177c804472Sopenharmony_ci    *
26187c804472Sopenharmony_ci    * @syscap SystemCapability.Account.AppAccount
26197c804472Sopenharmony_ci    * @since 8
26207c804472Sopenharmony_ci    * @deprecated since 9
26217c804472Sopenharmony_ci    */
26227c804472Sopenharmony_ci    ERROR_PERMISSION_DENIED = 10018
26237c804472Sopenharmony_ci  }
26247c804472Sopenharmony_ci
26257c804472Sopenharmony_ci  /**
26267c804472Sopenharmony_ci   * Provides methods for authenticator callback.
26277c804472Sopenharmony_ci   *
26287c804472Sopenharmony_ci   * @interface AuthenticatorCallback
26297c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
26307c804472Sopenharmony_ci   * @since 8
26317c804472Sopenharmony_ci   * @deprecated since 9
26327c804472Sopenharmony_ci   * @useinstead AppAccount.AuthCallback
26337c804472Sopenharmony_ci   */
26347c804472Sopenharmony_ci  interface AuthenticatorCallback {
26357c804472Sopenharmony_ci    /**
26367c804472Sopenharmony_ci     * Notifies the client of the authentication result.
26377c804472Sopenharmony_ci     *
26387c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
26397c804472Sopenharmony_ci     * @since 8
26407c804472Sopenharmony_ci     * @deprecated since 9
26417c804472Sopenharmony_ci     */
26427c804472Sopenharmony_ci    onResult: (code: number, result: { [key: string]: any }) => void;
26437c804472Sopenharmony_ci
26447c804472Sopenharmony_ci    /**
26457c804472Sopenharmony_ci     * Notifies the client that the authentication request need to be redirected.
26467c804472Sopenharmony_ci     *
26477c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
26487c804472Sopenharmony_ci     * @since 8
26497c804472Sopenharmony_ci     * @deprecated since 9
26507c804472Sopenharmony_ci     */
26517c804472Sopenharmony_ci    onRequestRedirected: (request: Want) => void;
26527c804472Sopenharmony_ci  }
26537c804472Sopenharmony_ci
26547c804472Sopenharmony_ci  /**
26557c804472Sopenharmony_ci   * Provides methods for authentication callback.
26567c804472Sopenharmony_ci   *
26577c804472Sopenharmony_ci   * @interface AuthCallback
26587c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
26597c804472Sopenharmony_ci   * @since 9
26607c804472Sopenharmony_ci   */
26617c804472Sopenharmony_ci  interface AuthCallback {
26627c804472Sopenharmony_ci    /**
26637c804472Sopenharmony_ci     * Notifies the client of the authentication result.
26647c804472Sopenharmony_ci     *
26657c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
26667c804472Sopenharmony_ci     * @since 9
26677c804472Sopenharmony_ci     */
26687c804472Sopenharmony_ci    onResult: (code: number, result?: AuthResult) => void;
26697c804472Sopenharmony_ci
26707c804472Sopenharmony_ci    /**
26717c804472Sopenharmony_ci     * Notifies the client that the authentication request need to be redirected.
26727c804472Sopenharmony_ci     *
26737c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
26747c804472Sopenharmony_ci     * @since 9
26757c804472Sopenharmony_ci     */
26767c804472Sopenharmony_ci    onRequestRedirected: (request: Want) => void;
26777c804472Sopenharmony_ci
26787c804472Sopenharmony_ci    /**
26797c804472Sopenharmony_ci     * Notifies the client that the request is continued.
26807c804472Sopenharmony_ci     *
26817c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
26827c804472Sopenharmony_ci     * @since 9
26837c804472Sopenharmony_ci     */
26847c804472Sopenharmony_ci    onRequestContinued?: () => void;
26857c804472Sopenharmony_ci  }
26867c804472Sopenharmony_ci
26877c804472Sopenharmony_ci  /**
26887c804472Sopenharmony_ci   * Provides methods for authenticator.
26897c804472Sopenharmony_ci   *
26907c804472Sopenharmony_ci   * @syscap SystemCapability.Account.AppAccount
26917c804472Sopenharmony_ci   * @since 8
26927c804472Sopenharmony_ci   * @name Authenticator
26937c804472Sopenharmony_ci   */
26947c804472Sopenharmony_ci  class Authenticator {
26957c804472Sopenharmony_ci    /**
26967c804472Sopenharmony_ci     * Adds an application account of a specified owner implicitly.
26977c804472Sopenharmony_ci     *
26987c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
26997c804472Sopenharmony_ci     * @param { string } callerBundleName - Indicates the caller bundle name.
27007c804472Sopenharmony_ci     * @param { object } options - Indicates the authenticator-specific options for the request.
27017c804472Sopenharmony_ci     * @param { AuthenticatorCallback } callback - Indicates the authenticator callback.
27027c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27037c804472Sopenharmony_ci     * @since 8
27047c804472Sopenharmony_ci     * @deprecated since 9
27057c804472Sopenharmony_ci     * @useinstead appAccount.Authenticator#createAccountImplicitly
27067c804472Sopenharmony_ci     */
27077c804472Sopenharmony_ci    addAccountImplicitly(
27087c804472Sopenharmony_ci      authType: string,
27097c804472Sopenharmony_ci      callerBundleName: string,
27107c804472Sopenharmony_ci      options: { [key: string]: any },
27117c804472Sopenharmony_ci      callback: AuthenticatorCallback
27127c804472Sopenharmony_ci    ): void;
27137c804472Sopenharmony_ci
27147c804472Sopenharmony_ci    /**
27157c804472Sopenharmony_ci     * Creates an application account of a specified owner implicitly.
27167c804472Sopenharmony_ci     *
27177c804472Sopenharmony_ci     * @param { CreateAccountImplicitlyOptions } options - Indicates the authenticator-specific options for the request.
27187c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27197c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27207c804472Sopenharmony_ci     * @since 9
27217c804472Sopenharmony_ci     */
27227c804472Sopenharmony_ci    createAccountImplicitly(options: CreateAccountImplicitlyOptions, callback: AuthCallback): void;
27237c804472Sopenharmony_ci
27247c804472Sopenharmony_ci    /**
27257c804472Sopenharmony_ci     * Authenticates an application account to get an oauth token.
27267c804472Sopenharmony_ci     *
27277c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
27287c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
27297c804472Sopenharmony_ci     * @param { string } callerBundleName - Indicates the caller bundle name.
27307c804472Sopenharmony_ci     * @param { object } options - Indicates the authenticator-specific options for the request.
27317c804472Sopenharmony_ci     * @param { AuthenticatorCallback } callback - Indicates the authenticator callback.
27327c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27337c804472Sopenharmony_ci     * @since 8
27347c804472Sopenharmony_ci     * @deprecated since 9
27357c804472Sopenharmony_ci     * @useinstead appAccount.Authenticator#auth
27367c804472Sopenharmony_ci     */
27377c804472Sopenharmony_ci    authenticate(
27387c804472Sopenharmony_ci      name: string,
27397c804472Sopenharmony_ci      authType: string,
27407c804472Sopenharmony_ci      callerBundleName: string,
27417c804472Sopenharmony_ci      options: { [key: string]: any },
27427c804472Sopenharmony_ci      callback: AuthenticatorCallback
27437c804472Sopenharmony_ci    ): void;
27447c804472Sopenharmony_ci
27457c804472Sopenharmony_ci    /**
27467c804472Sopenharmony_ci     * Authenticates an application account to get an oauth token.
27477c804472Sopenharmony_ci     *
27487c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
27497c804472Sopenharmony_ci     * @param { string } authType - Indicates the authentication type.
27507c804472Sopenharmony_ci     * @param { Record<string, Object> } options - Indicates the authenticator-specific options for the request.
27517c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27527c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27537c804472Sopenharmony_ci     * @since 9
27547c804472Sopenharmony_ci     */
27557c804472Sopenharmony_ci    auth(name: string, authType: string, options: Record<string, Object>, callback: AuthCallback): void;
27567c804472Sopenharmony_ci
27577c804472Sopenharmony_ci    /**
27587c804472Sopenharmony_ci     * Verifies the credential to ensure the user is the owner of the specified application account.
27597c804472Sopenharmony_ci     * <p>
27607c804472Sopenharmony_ci     * The credential can be provided in the options, otherwise an Ability will normally be returned,
27617c804472Sopenharmony_ci     * which can be started by the caller to further verify credential.
27627c804472Sopenharmony_ci     *
27637c804472Sopenharmony_ci     * @param { string } name - Indicates the name of the application account.
27647c804472Sopenharmony_ci     * @param { VerifyCredentialOptions } options - Indicates the options for verifying credential.
27657c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27667c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27677c804472Sopenharmony_ci     * @since 9
27687c804472Sopenharmony_ci     */
27697c804472Sopenharmony_ci    verifyCredential(name: string, options: VerifyCredentialOptions, callback: AuthCallback): void;
27707c804472Sopenharmony_ci
27717c804472Sopenharmony_ci    /**
27727c804472Sopenharmony_ci     * Sets properties for the authenticator.
27737c804472Sopenharmony_ci     *
27747c804472Sopenharmony_ci     * @param { SetPropertiesOptions } options - Indicates the options for setting properties.
27757c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27767c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27777c804472Sopenharmony_ci     * @since 9
27787c804472Sopenharmony_ci     */
27797c804472Sopenharmony_ci    setProperties(options: SetPropertiesOptions, callback: AuthCallback): void;
27807c804472Sopenharmony_ci
27817c804472Sopenharmony_ci    /**
27827c804472Sopenharmony_ci     * Checks whether a particular account has all specified labels.
27837c804472Sopenharmony_ci     *
27847c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
27857c804472Sopenharmony_ci     * @param { Array<string> } labels - Indicates an array of labels to check.
27867c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27877c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27887c804472Sopenharmony_ci     * @since 9
27897c804472Sopenharmony_ci     */
27907c804472Sopenharmony_ci    checkAccountLabels(name: string, labels: Array<string>, callback: AuthCallback): void;
27917c804472Sopenharmony_ci
27927c804472Sopenharmony_ci    /**
27937c804472Sopenharmony_ci     * Checks whether the specified account can be removed.
27947c804472Sopenharmony_ci     *
27957c804472Sopenharmony_ci     * @param { string } name - Indicates the account name.
27967c804472Sopenharmony_ci     * @param { AuthCallback } callback - Indicates the authenticator callback.
27977c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
27987c804472Sopenharmony_ci     * @since 9
27997c804472Sopenharmony_ci     */
28007c804472Sopenharmony_ci    checkAccountRemovable(name: string, callback: AuthCallback): void;
28017c804472Sopenharmony_ci
28027c804472Sopenharmony_ci    /**
28037c804472Sopenharmony_ci     * Gets the remote object of the authenticator for remote procedure call.
28047c804472Sopenharmony_ci     *
28057c804472Sopenharmony_ci     * @returns { rpc.RemoteObject } Returns a remote object.
28067c804472Sopenharmony_ci     * @syscap SystemCapability.Account.AppAccount
28077c804472Sopenharmony_ci     * @since 9
28087c804472Sopenharmony_ci     */
28097c804472Sopenharmony_ci    getRemoteObject(): rpc.RemoteObject;
28107c804472Sopenharmony_ci  }
28117c804472Sopenharmony_ci}
28127c804472Sopenharmony_ci
28137c804472Sopenharmony_ciexport default appAccount;
2814