diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index f604033d9dc1a9298833c71dcbe5f85f36c56054..a08f33eac576ebfa78272b0e913b12dacecb679f 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -16,12 +16,17 @@ import {AsyncCallback} from "./basic"; import {Want} from "./ability/want"; +/** + * This module provides the capability to manage application accounts. + * + * @since 7 + * @syscap SystemCapability.Account.AppAccount + */ declare namespace appAccount { /** * Obtains the AppAccountManager instance. * @since 7 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount * @return Returns the instance of the AppAccountManager. */ function createAppAccountManager(): AppAccountManager; @@ -30,8 +35,7 @@ declare namespace appAccount { * Provides methods for managing application accounts. * @name AppAccountManager * @since 7 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ interface AppAccountManager { /** @@ -40,7 +44,6 @@ declare namespace appAccount { * Only the owner of the application account has the permission to call this method. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account to add. * @param extraInfo Indicates the extra information of the application account to add. * The extra information cannot be sensitive information of the application account. @@ -54,7 +57,6 @@ declare namespace appAccount { * Adds an application account of a specified owner implicitly. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param owner Indicates the account owner of your application or third-party applications. * @param authType Indicates the authentication type. * @param options Indicates the authenticator-specific options for the request. @@ -69,7 +71,6 @@ declare namespace appAccount { * Only the owner of the application account has the permission to call this method. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account to delete. * @return void. */ @@ -81,7 +82,6 @@ declare namespace appAccount { * accessing the given application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account to disable access from * the third-party application. * @param bundleName Indicates the bundle name of the third-party application. @@ -95,7 +95,6 @@ declare namespace appAccount { * account for data query and listening. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param bundleName Indicates the bundle name of the third-party application. * @return void. @@ -112,7 +111,6 @@ declare namespace appAccount { *

* * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @return Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise. * @permission ohos.permission.DISTRIBUTED_DATASYNC. @@ -124,7 +122,6 @@ declare namespace appAccount { * Sets the credential for this application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param credentialType Indicates the type of the credential to set. * @param credential Indicates the credential to set. @@ -141,7 +138,6 @@ declare namespace appAccount { * need to modify the extra information. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param extraInfo Indicates the extra information to set. * @return void. @@ -166,7 +162,6 @@ declare namespace appAccount { *

* * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param isEnable Specifies whether to allow application data synchronization. * @return void. @@ -179,7 +174,6 @@ declare namespace appAccount { * Sets data associated with this application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param key Indicates the key of the data to set. The key can be customized. * @param value Indicates the value of the data to set. @@ -199,7 +193,6 @@ declare namespace appAccount { * * * @since 7 - * @devices phone, tablet, tv, wearable, car * @return Returns a list of application accounts. * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED. */ @@ -217,7 +210,6 @@ declare namespace appAccount { * * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param owner Indicates the account owner of your application or third-party applications. * @return Returns a list of application accounts. * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED. @@ -229,7 +221,6 @@ declare namespace appAccount { * Obtains the credential of this application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param credentialType Indicates the type of the credential to obtain. * @return Returns the credential of the application account. @@ -241,7 +232,6 @@ declare namespace appAccount { * Obtains extra information of this application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @return Returns the extra information of the account; returns {@code null} in other scenarios, * for example, if the account does not exist. @@ -253,7 +243,6 @@ declare namespace appAccount { * Obtains data associated with this application account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the name of the application account. * @param key Indicates the key of the data to obtain. * @return Returns the associated data of the application account. @@ -268,7 +257,6 @@ declare namespace appAccount { * about the account change event. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param owners Indicates the account owners, which are specified * by {@link AppAccount#AppAccount(String name, String owner)}. * @return void @@ -279,16 +267,14 @@ declare namespace appAccount { * Unsubscribes from account events. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @return void */ off(type: 'change', callback?: Callback): void; - + /** * Authenticates an application account to get an oauth token. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application or third-party applications. * @param owner Indicates the account owner of your application or third-party applications. * @param authType Indicates the authentication type. @@ -302,7 +288,6 @@ declare namespace appAccount { * Gets an oauth token with the specified authentication type from a particular application account. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application or third-party applications. * @param owner Indicates the account owner of your application or third-party applications. * @param authType Indicates the authentication type. @@ -315,9 +300,8 @@ declare namespace appAccount { * Sets an oauth token with the specified authentication type for a particular account. *

* Only the owner of the application account has the permission to call this method. - * + * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application. * @param authType Indicates the authentication type. * @param token Indicates the oauth token. @@ -332,7 +316,6 @@ declare namespace appAccount { * Only tokens visible to the caller application can be deleted. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application or third-party applications. * @param owner Indicates the account owner of your application or third-party applications. * @param authType Indicates the authentication type. @@ -348,7 +331,6 @@ declare namespace appAccount { * Only the owner of the application account has the permission to call this method. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application. * @param authType Indicates the authentication type. * @param bundleName Indicates the bundle name of the third-party application. @@ -364,7 +346,6 @@ declare namespace appAccount { * Only the owner of the application account has the permission to call this method. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application or third-party applications. * @param authType Indicates the authentication type. * @param bundleName Indicates the bundle name of the third-party application. @@ -377,7 +358,6 @@ declare namespace appAccount { * Gets all oauth tokens visible to the caller application. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application or third-party applications. * @param owner Indicates the account owner of your application or third-party applications. * @return Returns a list of oauth tokens visible to the caller application. @@ -391,7 +371,6 @@ declare namespace appAccount { * Only the owner of the application account has the permission to call this method. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name of your application. * @param authType Indicates the authentication type. * @return Returns the open authorization list of the specified authentication type. @@ -405,7 +384,6 @@ declare namespace appAccount { * Only the owner of the authenticator has the permission to call this method. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param sessionId Indicates the id of a authentication session. * @return Returns the authenticator callback related to the session id. */ @@ -416,7 +394,6 @@ declare namespace appAccount { * Gets the authenticator information of an application account. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param owner Indicates the account owner of your application or third-party applications. * @return Returns the authenticator information of the application account. */ @@ -428,8 +405,7 @@ declare namespace appAccount { * Provides basic information of an application account, including the account owner and name. * @name AppAccountInfo * @since 7 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ interface AppAccountInfo { /** @@ -447,8 +423,7 @@ declare namespace appAccount { * Provides basic information of an oauth token, including the authentication type and token value. * @name OAuthTokenInfo * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ interface OAuthTokenInfo { /** @@ -466,8 +441,7 @@ declare namespace appAccount { * Provides basic information of an authenticator, including the authenticator owner, icon id and label id. * @name AuthenticatorInfo * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ interface AuthenticatorInfo { /** @@ -490,8 +464,7 @@ declare namespace appAccount { * Provides constants definition. * @name Constants * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ enum Constants { ACTION_ADD_ACCOUNT_IMPLICITLY = "addAccountImplicitly", @@ -511,8 +484,7 @@ declare namespace appAccount { * Provides result code definition. * @name ResultCode * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ enum ResultCode { SUCCESS = 0, @@ -540,15 +512,13 @@ declare namespace appAccount { * Provides methods for authenticator callback. * @name AuthenticatorCallback * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ interface AuthenticatorCallback { /** * Notifies the client of the authentication result. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param code Indicates the result code. * @param result Indicates the authentication result. * @return void. @@ -559,7 +529,6 @@ declare namespace appAccount { * Notifies the client that the authentication request need to be redirected. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param request Indicates the request information to be redirected. * @return void. */ @@ -570,15 +539,13 @@ declare namespace appAccount { * Provides methods for authenticator. * @name Authenticator * @since 8 - * @sysCap SystemCapability.Account.AppAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.AppAccount */ class Authenticator { /** * Adds an application account of a specified owner implicitly. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param authType Indicates the authentication type. * @param callerBundleName Indicates the caller bundle name. * @param options Indicates the authenticator-specific options for the request. @@ -591,7 +558,6 @@ declare namespace appAccount { * Authenticates an application account to get an oauth token. * * @since 8 - * @devices phone, tablet, tv, wearable, car * @param name Indicates the account name. * @param authType Indicates the authentication type. * @param callerBundleName Indicates the caller bundle name. diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 294ca7fe1b2f6a45686e33170f23758a801e22c7..33ba7f02e20789e9f61c298cf7834330eba5caef 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -15,12 +15,17 @@ import {AsyncCallback} from './basic' +/** + * This module provides the capability to manage distributed accounts. + * + * @since 7 + * @syscap SystemCapability.Account.OsAccount + */ declare namespace distributedAccount { /** * Get the ability of the distributed account. * @since 7 - * @sysCap SystemCapability.Account.OsAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.OsAccount * @permission N/A * @return Ability to manage operations of distributed account. */ @@ -31,8 +36,7 @@ declare namespace distributedAccount { * * @name DistributedAccountAbility * @since 7 - * @sysCap SystemCapability.Account.OsAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.OsAccount * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS */ interface DistributedAccountAbility { @@ -40,7 +44,6 @@ declare namespace distributedAccount { * Queries the distributed information of the current OS account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @return The distributed information of the current OS account. * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. */ @@ -51,7 +54,6 @@ declare namespace distributedAccount { * Updates the distributed information of the OS account. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param accountInfo Indicates the information of the OS account used for a distributed system. * @return void * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. @@ -65,8 +67,7 @@ declare namespace distributedAccount { * * @name DistributedInfo * @since 7 - * @sysCap SystemCapability.Account.OsAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.OsAccount * @permission N/A */ interface DistributedInfo { diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index ba076d5dd09d062d8cae1af06e7d6f4310d0e1d1..1a4f81c7cbd30d6e0c01811d595ee5659b096729 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -16,12 +16,17 @@ import distributedAccount from './@ohos.account.distributedAccount' import {AsyncCallback} from "./basic"; +/** + * This module provides the capability to manage os accounts. + * + * @since 7 + * @syscap SystemCapability.Account.OsAccount + */ declare namespace osAccount { /** * Obtains the AccountManager instance. * @since 7 - * @sysCap SystemCapability.Account.OsAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.OsAccount * @return Returns the instance of the AccountManager. */ function getAccountManager(): AccountManager; @@ -30,8 +35,7 @@ declare namespace osAccount { * Provides abilities for you to manage and perform operations on your OS accounts. * @name AccountManager * @since 7 - * @sysCap SystemCapability.Account.OsAccount - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Account.OsAccount */ interface AccountManager { /** @@ -42,7 +46,6 @@ declare namespace osAccount { * switched to the background. *

* @since 7 - * @devices phone, tablet, tv, wearable, car * @param localId Indicates the local ID of the OS account. * @return void. * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION. @@ -55,7 +58,6 @@ declare namespace osAccount { * Checks whether the function of supporting multiple OS accounts is enabled. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @return Returns {@code true} if this function is enabled; returns {@code false} otherwise. */ isMultiOsAccountEnable(callback: AsyncCallback): void; @@ -65,7 +67,6 @@ declare namespace osAccount { * Checks whether an OS account is actived based on its local ID. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param localId Indicates the local ID of the OS account. * @return Returns {@code true} if the OS account is actived; returns {@code false} otherwise. * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS/ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS @@ -77,7 +78,6 @@ declare namespace osAccount { * Checks whether a constraint has been enabled for an OS account based on its local ID. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param localId Indicates the local ID of the OS account. * @param constraint Indicates the constraint to check. The value can be: *