未验证 提交 9169a3b4 编写于 作者: O openharmony_ci 提交者: Gitee

!4177 【OpenHarmony开源贡献者计划2022】API相关格式及表达问题0520-b

Merge pull request !4177 from king_he/0520b
# Ability Access Control # Ability Access Control
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control. ...@@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control.
**Return value** **Return value**
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| [AtManager](#atmanager) | **AtManager** instance obtained.| | [AtManager](#atmanager) | **AtManager** instance obtained. |
**Example** **Example**
...@@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP ...@@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| -------- | ------------------- | ---- | ------------------------------------------ | | -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to verify.| | permissionName | string | Yes | Name of the permission to verify. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;GrantStatus&gt; | Promise instance used to return the result.| | Promise&lt;GrantStatus&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r ...@@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.| | permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou ...@@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.| | permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.| | callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi ...@@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.| | permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn ...@@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.| | permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.| | callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u ...@@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to query.| | permissionName | string | Yes | Name of the permission to query. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -238,7 +238,7 @@ Enumerates the permission grant states. ...@@ -238,7 +238,7 @@ Enumerates the permission grant states.
**System capability**: SystemCapability.Security.AccessToken **System capability**: SystemCapability.Security.AccessToken
| Name | Default Value | Description | | Name | Default Value | Description |
| ----------------------------- | ---------------------- | ----------------------- | | ----------------------------- | ---------------------- | ----------------------- |
| PERMISSION_DENIED | -1 | Permission denied. | | PERMISSION_DENIED | -1 | Permission denied. |
| PERMISSION_GRANTED | 0 | Permission granted. | | PERMISSION_GRANTED | 0 | Permission granted. |
# AbilityDelegatorRegistry # AbilityDelegatorRegistry
> **NOTE** > **NOTE**<br>
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -18,13 +17,13 @@ Enumerates the ability lifecycle states. ...@@ -18,13 +17,13 @@ Enumerates the ability lifecycle states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name | Value | Description | | Name | Value | Description |
| ------------- | ---- | --------------------------- | | ------------- | ---- | --------------------------- |
| UNINITIALIZED | 0 | The ability is in an invalid state. | | UNINITIALIZED | 0 | The ability is in an invalid state. |
| CREATE | 1 | The ability is created.| | CREATE | 1 | The ability is created. |
| FOREGROUND | 2 | The ability is running in the foreground. | | FOREGROUND | 2 | The ability is running in the foreground. |
| BACKGROUND | 3 | The ability is running in the background. | | BACKGROUND | 3 | The ability is running in the background. |
| DESTROY | 4 | The ability is destroyed.| | DESTROY | 4 | The ability is destroyed. |
...@@ -38,9 +37,9 @@ Obtains the **AbilityDelegator** object of the application. ...@@ -38,9 +37,9 @@ Obtains the **AbilityDelegator** object of the application.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework.| | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework. |
**Example** **Example**
...@@ -62,9 +61,9 @@ Obtains the **AbilityDelegatorArgs** object of the application. ...@@ -62,9 +61,9 @@ Obtains the **AbilityDelegatorArgs** object of the application.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters.| | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters. |
**Example** **Example**
......
# AbilityRunningInfo # AbilityRunningInfo
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -25,14 +25,14 @@ abilitymanager.getAbilityRunningInfos((err,data) => { ...@@ -25,14 +25,14 @@ abilitymanager.getAbilityRunningInfos((err,data) => {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| No| Information that matches an ability. | | ability | ElementName | Yes | No | Information that matches an ability. |
| pid | number | Yes| No| Process ID.| | pid | number | Yes | No | Process ID. |
| uid | number | Yes| No| User ID. | | uid | number | Yes | No | User ID. |
| processName | string | Yes| No| Process name. | | processName | string | Yes | No | Process name. |
| startTime | number | Yes| No| Ability start time. | | startTime | number | Yes | No | Ability start time. |
| abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes| No| Ability state. | | abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes | No | Ability state. |
## abilityManager.AbilityState ## abilityManager.AbilityState
...@@ -41,10 +41,10 @@ Enumerates the ability states. ...@@ -41,10 +41,10 @@ Enumerates the ability states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Value| Description| | Name | Value | Description |
| -------- | -------- | -------- | | -------- | -------- | -------- |
| INITIAL | 0 | The ability is in the initial state.| | INITIAL | 0 | The ability is in the initial state. |
| FOREGROUND | 9 | The ability is in the foreground state. | | FOREGROUND | 9 | The ability is in the foreground state. |
| BACKGROUND | 10 | The ability is in the background state. | | BACKGROUND | 10 | The ability is in the background state. |
| FOREGROUNDING | 11 | The ability is in the foregrounding state. | | FOREGROUNDING | 11 | The ability is in the foregrounding state. |
| BACKGROUNDING | 12 | The ability is in the backgrounding state. | | BACKGROUNDING | 12 | The ability is in the backgrounding state. |
# AbilityStageContext # AbilityStageContext
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -28,7 +28,7 @@ class MyAbilityStage extends AbilityStage { ...@@ -28,7 +28,7 @@ class MyAbilityStage extends AbilityStage {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description| | Name| Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| currentHapModuleInfo | HapModuleInfo | Yes| No| **ModuleInfo** object corresponding to the **AbilityStage**.| | currentHapModuleInfo | HapModuleInfo | Yes | No | **ModuleInfo** object corresponding to the **AbilityStage**. |
| config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running.| | config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running. |
# Accessibility # Accessibility
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -15,11 +15,11 @@ Enumerates the states of an accessibility application. ...@@ -15,11 +15,11 @@ Enumerates the states of an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| enable | The accessibility application is enabled.| | enable | The accessibility application is enabled. |
| disable | The accessibility application is disabled.| | disable | The accessibility application is disabled. |
| install | The accessibility application has been installed.| | install | The accessibility application has been installed. |
## AbilityType ## AbilityType
...@@ -27,13 +27,13 @@ Enumerates the types of accessibility applications. ...@@ -27,13 +27,13 @@ Enumerates the types of accessibility applications.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| audible | The accessibility application provides audible feedback.| | audible | The accessibility application provides audible feedback. |
| generic | The accessibility application provides generic feedback.| | generic | The accessibility application provides generic feedback. |
| haptic | The accessibility application provides haptic feedback.| | haptic | The accessibility application provides haptic feedback. |
| spoken | The accessibility application provides spoken feedback.| | spoken | The accessibility application provides spoken feedback. |
| visual | The accessibility application provides visual feedback.| | visual | The accessibility application provides visual feedback. |
## AccessibilityAbilityInfo ## AccessibilityAbilityInfo
...@@ -43,15 +43,15 @@ Provides information about an accessibility application. ...@@ -43,15 +43,15 @@ Provides information about an accessibility application.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| id | number | Yes| No| Ability ID.| | id | number | Yes | No | Ability ID. |
| name | string | Yes| No| Ability name.| | name | string | Yes | No | Ability name. |
| bundleName | string | Yes| No| Bundle name.| | bundleName | string | Yes | No | Bundle name. |
| abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes| No| Accessibility application type.| | abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes | No | Accessibility application type. |
| capabilities | Array&lt;[Capability](#capability)&gt; | Yes| No| Capabilities list of the accessibility application.| | capabilities | Array&lt;[Capability](#capability)&gt; | Yes | No | Capabilities list of the accessibility application. |
| description | string | Yes| No| Description of the accessibility application.| | description | string | Yes | No | Description of the accessibility application. |
| eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes| No| List of events that the accessibility application focuses on.| | eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes | No | List of events that the accessibility application focuses on. |
## Action ## Action
...@@ -59,24 +59,24 @@ Describes the target action supported by an accessibility application. ...@@ -59,24 +59,24 @@ Describes the target action supported by an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| click | Clicking.| | click | Clicking. |
| longClick | Long pressing.| | longClick | Long pressing. |
| scrollForward | Scrolling forward.| | scrollForward | Scrolling forward. |
| scrollBackward | Scrolling backward.| | scrollBackward | Scrolling backward. |
| focus | Obtaining focus.| | focus | Obtaining focus. |
| clearFocus | Clearing focus.| | clearFocus | Clearing focus. |
| clearSelection | Clearing selection.| | clearSelection | Clearing selection. |
| accessibilityFocus | Obtaining the accessibility focus.| | accessibilityFocus | Obtaining the accessibility focus. |
| clearAccessibilityFocus | Clearing the accessibility focus.| | clearAccessibilityFocus | Clearing the accessibility focus. |
| cut | Cut.| | cut | Cut. |
| copy | Copy.| | copy | Copy. |
| paste | Paste.| | paste | Paste. |
| select | Select.| | select | Select. |
| setText | Setting the text.| | setText | Setting the text. |
| delete | Delete.| | delete | Delete. |
| setSelection | Setting the selection.| | setSelection | Setting the selection. |
## Capability ## Capability
...@@ -84,13 +84,13 @@ Enumerates the capabilities of an auxiliary application. ...@@ -84,13 +84,13 @@ Enumerates the capabilities of an auxiliary application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| retrieve | Capability to retrieve the window content.| | retrieve | Capability to retrieve the window content. |
| touchGuide | Capability of touch guide mode.| | touchGuide | Capability of touch guide mode. |
| keyEventObserver | Capability to filter key events.| | keyEventObserver | Capability to filter key events. |
| zoom | Capability to control the display zoom level.| | zoom | Capability to control the display zoom level. |
| gesture | Capability to perform gesture actions.| | gesture | Capability to perform gesture actions. |
## CaptionsFontEdgeType<sup>8+</sup> ## CaptionsFontEdgeType<sup>8+</sup>
...@@ -98,13 +98,13 @@ Enumerates the caption font edge type. ...@@ -98,13 +98,13 @@ Enumerates the caption font edge type.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| none | No effect.| | none | No effect. |
| raised | Raised effect.| | raised | Raised effect. |
| depressed | Depressed effect.| | depressed | Depressed effect. |
| uniform | Uniform effect.| | uniform | Uniform effect. |
| dropShadow | Drop shadow effect.| | dropShadow | Drop shadow effect. |
## CaptionsFontFamily<sup>8+</sup> ## CaptionsFontFamily<sup>8+</sup>
...@@ -112,16 +112,16 @@ Enumerates the caption font families. ...@@ -112,16 +112,16 @@ Enumerates the caption font families.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| default | Default font family.| | default | Default font family. |
| monospacedSerif | Monospaced Serif fonts, which use the same width for each character.| | monospacedSerif | Monospaced Serif fonts, which use the same width for each character. |
| serif | Serif fonts.| | serif | Serif fonts. |
| monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character.| | monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character. |
| sansSerif | Sans Serif fonts.| | sansSerif | Sans Serif fonts. |
| casual | Casual fonts.| | casual | Casual fonts. |
| cursive | Cursive fonts.| | cursive | Cursive fonts. |
| smallCapitals | Small caps fonts.| | smallCapitals | Small caps fonts. |
## CaptionsStyle<sup>8+</sup> ## CaptionsStyle<sup>8+</sup>
...@@ -129,14 +129,14 @@ Describes the caption style. ...@@ -129,14 +129,14 @@ Describes the caption style.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes| No| Font family of the captions.| | fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes | No | Font family of the captions. |
| fontScale | number | Yes| No| Font scale of the captions.| | fontScale | number | Yes | No | Font scale of the captions. |
| fontColor | number \| string | Yes| No| Font color of the captions.| | fontColor | number \ | string | Yes | No | Font color of the captions. |
| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes| No| Font edge type of the captions.| | fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes | No | Font edge type of the captions. |
| backgroundColor | number \| string | Yes| No| Background color of the captions.| | backgroundColor | number \ | string | Yes | No | Background color of the captions. |
| windowColor | number \| string | Yes| No| Window color of the captions.| | windowColor | number \ | string | Yes | No | Window color of the captions. |
## CaptionsManager<sup>8+</sup> ## CaptionsManager<sup>8+</sup>
...@@ -144,10 +144,10 @@ Implements caption configuration management. ...@@ -144,10 +144,10 @@ Implements caption configuration management.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| enabled | boolean | Yes| No| Whether to enable caption configuration.| | enabled | boolean | Yes | No | Whether to enable caption configuration. |
| style | [CaptionsStyle](#captionsstyle8) | Yes| No| Caption style.| | style | [CaptionsStyle](#captionsstyle8) | Yes | No | Caption style. |
### Methods ### Methods
...@@ -163,10 +163,10 @@ Enables listening for enable status changes of caption configuration. ...@@ -163,10 +163,10 @@ Enables listening for enable status changes of caption configuration.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status of caption configuration changes.| | callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status of caption configuration changes. |
- Example - Example
...@@ -186,10 +186,10 @@ Enables listening for caption style changes. ...@@ -186,10 +186,10 @@ Enables listening for caption style changes.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes| Callback invoked when the caption style changes.| | callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes | Callback invoked when the caption style changes. |
- Example - Example
...@@ -209,10 +209,10 @@ Disables listening for enable status changes of caption configuration. ...@@ -209,10 +209,10 @@ Disables listening for enable status changes of caption configuration.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status of caption configuration changes.| | callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status of caption configuration changes. |
- Example - Example
...@@ -230,10 +230,10 @@ Disables listening for caption style changes.s is removed. ...@@ -230,10 +230,10 @@ Disables listening for caption style changes.s is removed.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No| Callback invoked when the caption style changes.| | callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No | Callback invoked when the caption style changes. |
- Example - Example
...@@ -249,22 +249,22 @@ Describes a GUI change event. ...@@ -249,22 +249,22 @@ Describes a GUI change event.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| type | [EventType](#eventtype) | Yes| Yes| Accessibility event type.| | type | [EventType](#eventtype) | Yes | Yes | Accessibility event type. |
| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes| Yes| Window update type.| | windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes | Yes | Window update type. |
| bundleName | string | Yes| Yes| Target application name.| | bundleName | string | Yes | Yes | Target application name. |
| componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.| | componentType | string | Yes | Yes | Type of the event source component, for example, button or chart. |
| pageId | number | Yes| Yes| Page ID of the event source.| | pageId | number | Yes | Yes | Page ID of the event source. |
| description | string | Yes| Yes| Event description.| | description | string | Yes | Yes | Event description. |
| triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.| | triggerAction | [Action](#action) | Yes | Yes | Action that triggers the event. |
| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit.| | textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes | Yes | Text movement unit. |
| contents | Array&lt;string&gt; | Yes| Yes| Array of contents.| | contents | Array&lt;string&gt; | Yes | Yes | Array of contents. |
| lastContent | string | Yes| Yes| Latest content.| | lastContent | string | Yes | Yes | Latest content. |
| beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page.| | beginIndex | number | Yes | Yes | Sequence number of the first item displayed on the page. |
| currentIndex | number | Yes| Yes| Sequence number of the current item.| | currentIndex | number | Yes | Yes | Sequence number of the current item. |
| endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page.| | endIndex | number | Yes | Yes | Sequence number of the last item displayed on the page. |
| itemCount | number | Yes| Yes| Total number of items.| | itemCount | number | Yes | Yes | Total number of items. |
## EventType ## EventType
...@@ -272,19 +272,19 @@ Enumerates accessibility event types. ...@@ -272,19 +272,19 @@ Enumerates accessibility event types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| click | Event of clicking a component.| | click | Event of clicking a component. |
| longClick | Event of long-pressing a component.| | longClick | Event of long-pressing a component. |
| select | Event of selecting a component.| | select | Event of selecting a component. |
| focus | Event indicating that the component obtains the focus.| | focus | Event indicating that the component obtains the focus. |
| textUpdate | Event indicating that the component text has been updated.| | textUpdate | Event indicating that the component text has been updated. |
| hoverEnter | Event indicating that the hover enters a component.| | hoverEnter | Event indicating that the hover enters a component. |
| hoverExit | Event indicating that the hover exits a component.| | hoverExit | Event indicating that the hover exits a component. |
| scroll | Event of the scroll view.| | scroll | Event of the scroll view. |
| textSelectionUpdate | Event indicating that the selected text has been updated.| | textSelectionUpdate | Event indicating that the selected text has been updated. |
| accessibilityFocus | Event indicating that the accessibility focus has been obtained.| | accessibilityFocus | Event indicating that the accessibility focus has been obtained. |
| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.| | accessibilityFocusClear | Event indicating that the accessibility focus has been cleared. |
## TextMoveUnit ## TextMoveUnit
...@@ -292,13 +292,13 @@ Enumerates the movement units for traversing the node text. ...@@ -292,13 +292,13 @@ Enumerates the movement units for traversing the node text.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| char | The movement unit for traversing the node text is by character.| | char | The movement unit for traversing the node text is by character. |
| word | The movement unit for traversing the node text is by word.| | word | The movement unit for traversing the node text is by word. |
| line | The movement unit for traversing the node text is by line.| | line | The movement unit for traversing the node text is by line. |
| page | The movement unit for traversing the node text is by page.| | page | The movement unit for traversing the node text is by page. |
| paragraph | The movement unit for traversing the node text is by paragraph.| | paragraph | The movement unit for traversing the node text is by paragraph. |
## WindowUpdateType ## WindowUpdateType
...@@ -306,19 +306,19 @@ Enumerates window update types. ...@@ -306,19 +306,19 @@ Enumerates window update types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| add | Window adding.| | add | Window adding. |
| remove | Window deletion.| | remove | Window deletion. |
| title | Window title change.| | title | Window title change. |
| bounds | Window boundary change.| | bounds | Window boundary change. |
| layer | Window layer change.| | layer | Window layer change. |
| active | Window activity change.| | active | Window activity change. |
| focus | Window focus change.| | focus | Window focus change. |
| accessibilityFocus | Window accessibility focus change.| | accessibilityFocus | Window accessibility focus change. |
| parent | Parent window change.| | parent | Parent window change. |
| children | Child window change.| | children | Child window change. |
| pip | Picture-in-picture (PIP) mode change.| | pip | Picture-in-picture (PIP) mode change. |
## accessibility.getAbilityLists ## accessibility.getAbilityLists
...@@ -330,16 +330,16 @@ Obtains the accessibility application list. This API uses a promise to return th ...@@ -330,16 +330,16 @@ Obtains the accessibility application list. This API uses a promise to return th
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| | abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| | stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list.| | Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list. |
- Example - Example
...@@ -373,11 +373,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba ...@@ -373,11 +373,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| | abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| | stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
| callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes| Callback used to return the accessibility application list.| | callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes | Callback used to return the accessibility application list. |
- Example - Example
...@@ -412,9 +412,9 @@ Obtains the accessibility caption configuration. ...@@ -412,9 +412,9 @@ Obtains the accessibility caption configuration.
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| [CaptionsManager](#captionsmanager8) | Accessibility caption configuration.| | [CaptionsManager](#captionsmanager8) | Accessibility caption configuration. |
- Example - Example
...@@ -430,10 +430,10 @@ Enables listening for the accessibility application or touch guide mode status c ...@@ -430,10 +430,10 @@ Enables listening for the accessibility application or touch guide mode status c
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision| | type | string | Yes | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status changes.| | callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status changes. |
- Example - Example
...@@ -453,10 +453,10 @@ Disables listening for the accessibility application or touch guide mode status ...@@ -453,10 +453,10 @@ Disables listening for the accessibility application or touch guide mode status
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | No| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision| | type | string | No | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status changes.| | callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status changes. |
- Example - Example
...@@ -476,9 +476,9 @@ Checks whether accessibility is enabled. This API uses a promise to return the r ...@@ -476,9 +476,9 @@ Checks whether accessibility is enabled. This API uses a promise to return the r
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise.| | Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example - Example
...@@ -501,9 +501,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback ...@@ -501,9 +501,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback
- Parameters - Parameters
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example - Example
...@@ -527,9 +527,9 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th ...@@ -527,9 +527,9 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise.| | Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example - Example
...@@ -552,9 +552,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba ...@@ -552,9 +552,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba
- Parameters - Parameters
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example - Example
...@@ -578,15 +578,15 @@ Sends an accessibility event. This API uses a promise to return the result. ...@@ -578,15 +578,15 @@ Sends an accessibility event. This API uses a promise to return the result.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| | event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.| | Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example - Example
...@@ -609,10 +609,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t ...@@ -609,10 +609,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| | event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example - Example
......
# Animation<a name="EN-US_TOPIC_0000001127125026"></a> # Animation<a name="EN-US_TOPIC_0000001127125026"></a>
>![](../../public_sys-resources/icon-note.gif) **NOTE:** > **NOTE:**<br>
>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import<a name="s0e7b1e85a4274f58a8206e0b065bd80c"></a> ## Modules to Import<a name="s0e7b1e85a4274f58a8206e0b065bd80c"></a>
......
# App Account Management # App Account Management
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -20,9 +20,9 @@ Creates an **AppAccountManager** instance. ...@@ -20,9 +20,9 @@ Creates an **AppAccountManager** instance.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| ----------------- | ------------ | | ----------------- | ------------ |
| AppAccountManager | **AppAccountManager** instance created.| | AppAccountManager | **AppAccountManager** instance created. |
**Example** **Example**
```js ```js
...@@ -43,10 +43,10 @@ Adds an app account to the account management service. This method uses an async ...@@ -43,10 +43,10 @@ Adds an app account to the account management service. This method uses an async
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | --------------------- | | -------- | ------------------------- | ---- | --------------------- |
| name | string | Yes | Name of the app account to add. | | name | string | Yes | Name of the app account to add. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is added.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is added. |
**Example** **Example**
...@@ -67,11 +67,11 @@ Adds an app account and its additional information to the account management ser ...@@ -67,11 +67,11 @@ Adds an app account and its additional information to the account management ser
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------------------------------- | | --------- | ------------------------- | ---- | ---------------------------------------- |
| name | string | Yes | Name of the app account to add. | | name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information (for example, token) of the app account to add. The additional information cannot contain sensitive information about the app account.| | extraInfo | string | Yes | Additional information (for example, token) of the app account to add. The additional information cannot contain sensitive information about the app account. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account and its additional information are added. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account and its additional information are added. |
**Example** **Example**
...@@ -94,16 +94,16 @@ Adds an app account and its additional information to the account management ser ...@@ -94,16 +94,16 @@ Adds an app account and its additional information to the account management ser
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------------------------------- | | --------- | ------ | ---- | -------------------------------- |
| name | string | Yes | Name of the app account to add. | | name | string | Yes | Name of the app account to add. |
| extraInfo | string | Yes | Additional information of the app account to add. The additional information cannot contain sensitive information about the app account.| | extraInfo | string | Yes | Additional information of the app account to add. The additional information cannot contain sensitive information about the app account. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| ------------------- | --------------------- | | ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -126,12 +126,12 @@ Implicitly adds an app account based on the specified account owner, authenticat ...@@ -126,12 +126,12 @@ Implicitly adds an app account based on the specified account owner, authenticat
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- | | -------- | --------------------- | ---- | --------------- |
| owner | string | Yes | Bundle name of the app account to add.| | owner | string | Yes | Bundle name of the app account to add. |
| authType | string | Yes | Authentication type of the app account to add. | | authType | string | Yes | Authentication type of the app account to add. |
| options | {[key: string]: any} | Yes | Options for the authentication. | | options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.| | callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example** **Example**
...@@ -167,10 +167,10 @@ Deletes an app account from the account management service. This method uses an ...@@ -167,10 +167,10 @@ Deletes an app account from the account management service. This method uses an
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- | | -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | Name of the app account to delete. | | name | string | Yes | Name of the app account to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is deleted.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is deleted. |
**Example** **Example**
...@@ -191,15 +191,15 @@ Deletes an app account from the account management service. This method uses a p ...@@ -191,15 +191,15 @@ Deletes an app account from the account management service. This method uses a p
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------------ | | ---- | ------ | ---- | ------------ |
| name | string | Yes | Name of the app account to delete.| | name | string | Yes | Name of the app account to delete. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -222,11 +222,11 @@ Disables an app account from accessing an application with the given bundle name ...@@ -222,11 +222,11 @@ Disables an app account from accessing an application with the given bundle name
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- | | ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. | | bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is disabled from accessing the application with the given bundle name.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is disabled from accessing the application with the given bundle name. |
**Example** **Example**
...@@ -247,16 +247,16 @@ Disables an app account from accessing an application with the given bundle name ...@@ -247,16 +247,16 @@ Disables an app account from accessing an application with the given bundle name
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ----------------- | | ---------- | ------ | ---- | ----------------- |
| name | string | Yes | App account name.| | name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. | | bundleName | string | Yes | Bundle name of an app. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -279,11 +279,11 @@ Enables an app account to access an application with the given bundle name. This ...@@ -279,11 +279,11 @@ Enables an app account to access an application with the given bundle name. This
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------------------------- | | ---------- | ------------------------- | ---- | ------------------------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app. | | bundleName | string | Yes | Bundle name of an app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is enabled to access the application with the given bundle name.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the app account is enabled to access the application with the given bundle name. |
**Example** **Example**
...@@ -304,16 +304,16 @@ Enables an app account to access an application with the given bundle name. This ...@@ -304,16 +304,16 @@ Enables an app account to access an application with the given bundle name. This
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | --------- | | ---------- | ------ | ---- | --------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| bundleName | string | Yes | Bundle name of an app.| | bundleName | string | Yes | Bundle name of an app. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -337,10 +337,10 @@ Checks whether an app account allows application data synchronization. This meth ...@@ -337,10 +337,10 @@ Checks whether an app account allows application data synchronization. This meth
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------- | ---- | ---------------------- | | -------- | ---------------------------- | ---- | ---------------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the app account allows application data synchronization.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the app account allows application data synchronization. |
**Example** **Example**
...@@ -364,15 +364,15 @@ Checks whether an app account allows application data synchronization. This meth ...@@ -364,15 +364,15 @@ Checks whether an app account allows application data synchronization. This meth
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- | | ---- | ------ | ---- | ------- |
| name | string | Yes | App account name.| | name | string | Yes | App account name. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :--------------------- | :-------------------- | | :--------------------- | :-------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result.| | Promise&lt;boolean&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -395,12 +395,12 @@ Sets a credential for an app account. This method uses an asynchronous callback ...@@ -395,12 +395,12 @@ Sets a credential for an app account. This method uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------- | ------------------------- | ---- | -------------- | | -------------- | ------------------------- | ---- | -------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set. | | credentialType | string | Yes | Type of the credential to set. |
| credential | string | Yes | Credential to set. | | credential | string | Yes | Credential to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when a credential is set for the specified app account.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when a credential is set for the specified app account. |
**Example** **Example**
...@@ -421,17 +421,17 @@ Sets a credential for an app account. This method uses a promise to return the r ...@@ -421,17 +421,17 @@ Sets a credential for an app account. This method uses a promise to return the r
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- | | -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to set.| | credentialType | string | Yes | Type of the credential to set. |
| credential | string | Yes | Credential to set. | | credential | string | Yes | Credential to set. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -454,11 +454,11 @@ Sets additional information for an app account. This method uses an asynchronous ...@@ -454,11 +454,11 @@ Sets additional information for an app account. This method uses an asynchronous
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ------------------------- | ---- | ---------------- | | --------- | ------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set. | | extraInfo | string | Yes | Additional information to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when additional information is set for the specified app account.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when additional information is set for the specified app account. |
**Example** **Example**
...@@ -479,16 +479,16 @@ Sets additional information for an app account. This method uses a promise to re ...@@ -479,16 +479,16 @@ Sets additional information for an app account. This method uses a promise to re
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ------ | ---- | --------- | | --------- | ------ | ---- | --------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| extraInfo | string | Yes | Additional information to set.| | extraInfo | string | Yes | Additional information to set. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -513,11 +513,11 @@ Sets whether to enable application data synchronization for an app account. This ...@@ -513,11 +513,11 @@ Sets whether to enable application data synchronization for an app account. This
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------------------- | | -------- | ------------------------- | ---- | ------------------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization. | | isEnable | boolean | Yes | Whether to enable app data synchronization. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when application data synchronization is enabled or disabled for the app account.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when application data synchronization is enabled or disabled for the app account. |
**Example** **Example**
...@@ -540,16 +540,16 @@ Sets whether to enable application data synchronization for an app account. This ...@@ -540,16 +540,16 @@ Sets whether to enable application data synchronization for an app account. This
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------- | ---- | ----------- | | -------- | ------- | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| isEnable | boolean | Yes | Whether to enable app data synchronization.| | isEnable | boolean | Yes | Whether to enable app data synchronization. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -572,12 +572,12 @@ Sets data to be associated with an app account. This method uses an asynchronous ...@@ -572,12 +572,12 @@ Sets data to be associated with an app account. This method uses an asynchronous
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ----------------- | | -------- | ------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized.| | key | string | Yes | Key of the data to set. The private key can be customized. |
| value | string | Yes | Value of the data to be set. | | value | string | Yes | Value of the data to be set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the data associated with the specified app account is set.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked when the data associated with the specified app account is set. |
**Example** **Example**
...@@ -597,17 +597,17 @@ Sets data to be associated with an app account. This method uses a promise to re ...@@ -597,17 +597,17 @@ Sets data to be associated with an app account. This method uses a promise to re
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------------- | | ----- | ------ | ---- | ----------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| key | string | Yes | Key of the data to set. The private key can be customized.| | key | string | Yes | Key of the data to set. The private key can be customized. |
| value | string | Yes | Value of the data to be set. | | value | string | Yes | Value of the data to be set. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :------------------ | :-------------------- | | :------------------ | :-------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -630,11 +630,11 @@ Obtains the credential of an app account. This method uses an asynchronous callb ...@@ -630,11 +630,11 @@ Obtains the credential of an app account. This method uses an asynchronous callb
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------- | --------------------------- | ---- | -------------- | | -------------- | --------------------------- | ---- | -------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain. | | credentialType | string | Yes | Type of the credential to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the credential of the specified app account.| | callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the credential of the specified app account. |
**Example** **Example**
...@@ -656,16 +656,16 @@ Obtains the credential of an app account. This method uses a promise to return t ...@@ -656,16 +656,16 @@ Obtains the credential of an app account. This method uses a promise to return t
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------- | | -------------- | ------ | ---- | ---------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| credentialType | string | Yes | Type of the credential to obtain.| | credentialType | string | Yes | Type of the credential to obtain. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :-------------------- | :-------------------- | | :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.| | Promise&lt;string&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -688,10 +688,10 @@ Obtains additional information of an app account. This method uses an asynchrono ...@@ -688,10 +688,10 @@ Obtains additional information of an app account. This method uses an asynchrono
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ---------------- | | -------- | --------------------------- | ---- | ---------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the additional information of the specified app account.| | callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the additional information of the specified app account. |
**Example** **Example**
...@@ -713,15 +713,15 @@ Obtains additional information of an app account. This method uses a promise to ...@@ -713,15 +713,15 @@ Obtains additional information of an app account. This method uses a promise to
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ------- | | ---- | ------ | ---- | ------- |
| name | string | Yes | App account name.| | name | string | Yes | App account name. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :-------------------- | :-------------------- | | :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.| | Promise&lt;string&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -744,11 +744,11 @@ Obtains data associated with an app account. This method uses an asynchronous ca ...@@ -744,11 +744,11 @@ Obtains data associated with an app account. This method uses an asynchronous ca
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------------- | | -------- | --------------------------- | ---- | ----------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain. | | key | string | Yes | Key of the data to obtain. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the data associated with the specified app account.| | callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the data associated with the specified app account. |
**Example** **Example**
...@@ -770,16 +770,16 @@ Obtains data associated with an app account. This method uses a promise to retur ...@@ -770,16 +770,16 @@ Obtains data associated with an app account. This method uses a promise to retur
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- | | ---- | ------ | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| key | string | Yes | Key of the data to obtain.| | key | string | Yes | Key of the data to obtain. |
**Return Value** **Return Value**
| Type | Description | | Type | Description |
| :-------------------- | :-------------------- | | :-------------------- | :-------------------- |
| Promise&lt;string&gt; | Promise used to return the result.| | Promise&lt;string&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -804,9 +804,9 @@ Obtains information about all accessible app accounts. This method uses an async ...@@ -804,9 +804,9 @@ Obtains information about all accessible app accounts. This method uses an async
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- | | -------- | ---------------------------------------- | ---- | -------- |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts.| | callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts. |
**Example** **Example**
...@@ -830,9 +830,9 @@ Obtains information about all accessible app accounts. This method uses an async ...@@ -830,9 +830,9 @@ Obtains information about all accessible app accounts. This method uses an async
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ---------------------------------------- | --------------------- | | ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result.| | Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -857,10 +857,10 @@ Obtains information about all app accounts of the specified app. This method use ...@@ -857,10 +857,10 @@ Obtains information about all app accounts of the specified app. This method use
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | -------- | | -------- | ---------------------------------------- | ---- | -------- |
| owner | string | Yes | Bundle name of the app. | | owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts.| | callback | AsyncCallback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return information about all accessible app accounts. |
**Example** **Example**
...@@ -885,15 +885,15 @@ Obtains information about all app accounts of the specified app. This method use ...@@ -885,15 +885,15 @@ Obtains information about all app accounts of the specified app. This method use
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ---------------------------------------- | --------------------- | | ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result.| | Promise&lt;Array&lt;AppAccountInfo&gt;&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -917,11 +917,11 @@ Subscribes to the account change event of the specified account owners. This met ...@@ -917,11 +917,11 @@ Subscribes to the account change event of the specified account owners. This met
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------ | | -------- | ---------------------------------------- | ---- | ------------------------------ |
| type | 'change' | Yes | Type of the event to subscribe to. The subscriber will receive a notification when the account owners update their accounts.| | type | 'change' | Yes | Type of the event to subscribe to. The subscriber will receive a notification when the account owners update their accounts. |
| owners | Array&lt;string&gt; | Yes | Owners of the accounts. | | owners | Array&lt;string&gt; | Yes | Owners of the accounts. |
| callback | Callback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return the account change. | | callback | Callback&lt;Array&lt;AppAccountInfo&gt;&gt; | Yes | Callback invoked to return the account change. |
**Example** **Example**
...@@ -948,10 +948,10 @@ Unsubscribes from the account change event. This method uses an asynchronous cal ...@@ -948,10 +948,10 @@ Unsubscribes from the account change event. This method uses an asynchronous cal
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------------------------------- | ---- | ------------ | | -------- | -------------------------------- | ---- | ------------ |
| type | 'change' | Yes | Account change event to unsubscribe from. | | type | 'change' | Yes | Account change event to unsubscribe from. |
| callback | Callback<Array\<AppAccountInfo>> | No | Callback used to report the account change.| | callback | Callback<Array\<AppAccountInfo>> | No | Callback used to report the account change. |
**Example** **Example**
...@@ -981,13 +981,13 @@ Authenticates an app account to obtain the Open Authorization (OAuth) access tok ...@@ -981,13 +981,13 @@ Authenticates an app account to obtain the Open Authorization (OAuth) access tok
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------- | ---- | --------------- | | -------- | --------------------- | ---- | --------------- |
| name | string | Yes | Name of the app account to authenticate. | | name | string | Yes | Name of the app account to authenticate. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| options | {[key: string]: any} | Yes | Options for the authentication. | | options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.| | callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example** **Example**
...@@ -1023,12 +1023,12 @@ Obtains the OAuth access token of an app account based on the specified authenti ...@@ -1023,12 +1023,12 @@ Obtains the OAuth access token of an app account based on the specified authenti
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | --------------------------- | ---- | ----------- | | -------- | --------------------------- | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;string&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1050,17 +1050,17 @@ Obtains the OAuth access token of an app account based on the specified authenti ...@@ -1050,17 +1050,17 @@ Obtains the OAuth access token of an app account based on the specified authenti
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ----------- | | -------- | ------ | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| --------------------- | --------------------- | | --------------------- | --------------------- |
| Promise&lt;string&gt; | Promise used to return the result.| | Promise&lt;string&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1083,12 +1083,12 @@ Sets an OAuth access token for an app account. This method uses an asynchronous ...@@ -1083,12 +1083,12 @@ Sets an OAuth access token for an app account. This method uses an asynchronous
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | -------- | | -------- | ------------------------- | ---- | -------- |
| name | string | Yes | App account name.| | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set.| | token | string | Yes | OAuth access token to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1109,17 +1109,17 @@ Sets an OAuth access token for an app account. This method uses a promise to ret ...@@ -1109,17 +1109,17 @@ Sets an OAuth access token for an app account. This method uses a promise to ret
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- | | -------- | ------ | ---- | -------- |
| name | string | Yes | App account name.| | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to set.| | token | string | Yes | OAuth access token to set. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ------------------- | --------------------- | | ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1142,13 +1142,13 @@ Deletes the specified OAuth access token for an app account. This method uses an ...@@ -1142,13 +1142,13 @@ Deletes the specified OAuth access token for an app account. This method uses an
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------- | ---- | ------------ | | -------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. | | owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete.| | token | string | Yes | OAuth access token to delete. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1169,18 +1169,18 @@ Deletes the specified OAuth access token for an app account. This method uses a ...@@ -1169,18 +1169,18 @@ Deletes the specified OAuth access token for an app account. This method uses a
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ | | -------- | ------ | ---- | ------------ |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app. | | owner | string | Yes | Bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| token | string | Yes | OAuth access token to delete.| | token | string | Yes | OAuth access token to delete. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ------------------- | --------------------- | | ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1203,13 +1203,13 @@ Sets the visibility of an OAuth access token to the specified app. This method u ...@@ -1203,13 +1203,13 @@ Sets the visibility of an OAuth access token to the specified app. This method u
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------------------------- | ---- | ------------ | | ---------- | ------------------------- | ---- | ------------ |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.| | bundleName | string | Yes | Bundle name of the app. |
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. | | isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1230,18 +1230,18 @@ Sets the visibility of an OAuth access token to the specified app. This method u ...@@ -1230,18 +1230,18 @@ Sets the visibility of an OAuth access token to the specified app. This method u
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------- | ---- | ------------ | | ---------- | ------- | ---- | ------------ |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.| | bundleName | string | Yes | Bundle name of the app. |
| isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. | | isVisible | boolean | Yes | Whether the OAuth access token is visible to the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ------------------- | --------------------- | | ------------------- | --------------------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise&lt;void&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1264,12 +1264,12 @@ Checks whether an OAuth token is visible to the specified app. This method uses ...@@ -1264,12 +1264,12 @@ Checks whether an OAuth token is visible to the specified app. This method uses
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ---------------------------- | ---- | ------------- | | ---------- | ---------------------------- | ---- | ------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.| | bundleName | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1291,17 +1291,17 @@ Checks whether an OAuth token is visible to the specified app. This method uses ...@@ -1291,17 +1291,17 @@ Checks whether an OAuth token is visible to the specified app. This method uses
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ------ | ---- | ------------- | | ---------- | ------ | ---- | ------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| bundleName | string | Yes | Bundle name of the app.| | bundleName | string | Yes | Bundle name of the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ---------------------- | --------------------- | | ---------------------- | --------------------- |
| Promise&lt;boolean&gt; | Promise used to return the result.| | Promise&lt;boolean&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1324,11 +1324,11 @@ Obtains information about all OAuth access tokens of an app account visible to t ...@@ -1324,11 +1324,11 @@ Obtains information about all OAuth access tokens of an app account visible to t
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- | | -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1350,16 +1350,16 @@ Obtains information about all OAuth access tokens of an app account visible to t ...@@ -1350,16 +1350,16 @@ Obtains information about all OAuth access tokens of an app account visible to t
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- | | ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ---------------------------------------- | --------------------- | | ---------------------------------------- | --------------------- |
| Promise&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Promise used to return the result.| | Promise&lt;Array&lt;OAuthTokenInfo&gt;&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1382,11 +1382,11 @@ Obtains the authorization list of OAuth access tokens of an app account. This me ...@@ -1382,11 +1382,11 @@ Obtains the authorization list of OAuth access tokens of an app account. This me
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------- | | -------- | ---------------------------------------- | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1408,16 +1408,16 @@ Obtains the authorization list of OAuth access tokens of an app account. This me ...@@ -1408,16 +1408,16 @@ Obtains the authorization list of OAuth access tokens of an app account. This me
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- | | ----- | ------ | ---- | ----------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ---------------------------------- | --------------------- | | ---------------------------------- | --------------------- |
| Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the result.| | Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1440,10 +1440,10 @@ Obtains the authenticator callback for a session. This method uses an asynchrono ...@@ -1440,10 +1440,10 @@ Obtains the authenticator callback for a session. This method uses an asynchrono
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ---------------------------------------- | ---- | -------- | | --------- | ---------------------------------------- | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate.| | sessionId | string | Yes | ID of the session to authenticate. |
| callback | AsyncCallback&lt;AuthenticatorCallback&gt; | Yes | Callback invoked to return the result.| | callback | AsyncCallback&lt;AuthenticatorCallback&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1475,15 +1475,15 @@ Obtains the authenticator callback for a session. This method uses a promise to ...@@ -1475,15 +1475,15 @@ Obtains the authenticator callback for a session. This method uses a promise to
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| --------- | ------ | ---- | -------- | | --------- | ------ | ---- | -------- |
| sessionId | string | Yes | ID of the session to authenticate.| | sessionId | string | Yes | ID of the session to authenticate. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| ------------------------------------ | --------------------- | | ------------------------------------ | --------------------- |
| Promise&lt;AuthenticatorCallback&gt; | Promise used to return the result.| | Promise&lt;AuthenticatorCallback&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1515,10 +1515,10 @@ Obtains authenticator information of an app account. This method uses an asynchr ...@@ -1515,10 +1515,10 @@ Obtains authenticator information of an app account. This method uses an asynchr
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | ---- | ----------- | | -------- | -------------------------------------- | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| callback | AsyncCallback&lt;AuthenticatorInfo&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;AuthenticatorInfo&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -1540,15 +1540,15 @@ Obtains authenticator information of an app account. This method uses a promise ...@@ -1540,15 +1540,15 @@ Obtains authenticator information of an app account. This method uses a promise
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- | | ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
**Parameters** **Parameters**
| Type | Description | | Type | Description |
| -------------------------------- | --------------------- | | -------------------------------- | --------------------- |
| Promise&lt;AuthenticatorInfo&gt; | Promise used to return the result.| | Promise&lt;AuthenticatorInfo&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -1567,10 +1567,10 @@ Defines app account information. ...@@ -1567,10 +1567,10 @@ Defines app account information.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----------- | | ----- | ------ | ---- | ----------- |
| owner | string | Yes | Bundle name of the app.| | owner | string | Yes | Bundle name of the app. |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
## OAuthTokenInfo<sup>8+</sup> ## OAuthTokenInfo<sup>8+</sup>
...@@ -1578,10 +1578,10 @@ Defines OAuth access token information. ...@@ -1578,10 +1578,10 @@ Defines OAuth access token information.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ------ | ---- | -------- | | -------- | ------ | ---- | -------- |
| authType | string | Yes | Authentication type.| | authType | string | Yes | Authentication type. |
| token | string | Yes | Value of the access token. | | token | string | Yes | Value of the access token. |
## AuthenticatorInfo<sup>8+</sup> ## AuthenticatorInfo<sup>8+</sup>
...@@ -1589,11 +1589,11 @@ Defines OAuth authenticator information. ...@@ -1589,11 +1589,11 @@ Defines OAuth authenticator information.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | ------ | ---- | ---------- | | ------- | ------ | ---- | ---------- |
| owner | string | Yes | Bundle name of the authenticator owner.| | owner | string | Yes | Bundle name of the authenticator owner. |
| iconId | string | Yes | ID of the authenticator icon. | | iconId | string | Yes | ID of the authenticator icon. |
| labelId | string | Yes | ID of the authenticator label. | | labelId | string | Yes | ID of the authenticator label. |
## Constants<sup>8+</sup> ## Constants<sup>8+</sup>
...@@ -1601,19 +1601,19 @@ Enumerates the constants. ...@@ -1601,19 +1601,19 @@ Enumerates the constants.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Default Value | Description | | Name | Default Value | Description |
| ----------------------------- | ---------------------- | ------------- | | ----------------------------- | ---------------------- | ------------- |
| ACTION_ADD_ACCOUNT_IMPLICITLY | "addAccountImplicitly" | Operation for implicitly adding an account. | | ACTION_ADD_ACCOUNT_IMPLICITLY | "addAccountImplicitly" | Operation for implicitly adding an account. |
| ACTION_AUTHENTICATE | "authenticate" | Authentication operation. | | ACTION_AUTHENTICATE | "authenticate" | Authentication operation. |
| KEY_NAME | "name" | App account name. | | KEY_NAME | "name" | App account name. |
| KEY_OWNER | "owner" | App account owner.| | KEY_OWNER | "owner" | App account owner. |
| KEY_TOKEN | "token" | OAuth access token. | | KEY_TOKEN | "token" | OAuth access token. |
| KEY_ACTION | "action" | Action. | | KEY_ACTION | "action" | Action. |
| KEY_AUTH_TYPE | "authType" | Authentication type. | | KEY_AUTH_TYPE | "authType" | Authentication type. |
| KEY_SESSION_ID | "sessionId" | Session ID. | | KEY_SESSION_ID | "sessionId" | Session ID. |
| KEY_CALLER_PID | "callerPid" | Caller process ID (PID). | | KEY_CALLER_PID | "callerPid" | Caller process ID (PID). |
| KEY_CALLER_UID | "callerUid" | Caller user ID (UID). | | KEY_CALLER_UID | "callerUid" | Caller user ID (UID). |
| KEY_CALLER_BUNDLE_NAME | "callerBundleName" | Caller bundle name. | | KEY_CALLER_BUNDLE_NAME | "callerBundleName" | Caller bundle name. |
## ResultCode<sup>8+</sup> ## ResultCode<sup>8+</sup>
...@@ -1621,27 +1621,27 @@ Enumerates the result codes. ...@@ -1621,27 +1621,27 @@ Enumerates the result codes.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
| Name | Default Value | Description | | Name | Default Value | Description |
| ----------------------------------- | ----- | ------------ | | ----------------------------------- | ----- | ------------ |
| SUCCESS | 0 | The operation is successful. | | SUCCESS | 0 | The operation is successful. |
| ERROR_ACCOUNT_NOT_EXIST | 10001 | The app account does not exist. | | ERROR_ACCOUNT_NOT_EXIST | 10001 | The app account does not exist. |
| ERROR_APP_ACCOUNT_SERVICE_EXCEPTION | 10002 | The app account service is abnormal. | | ERROR_APP_ACCOUNT_SERVICE_EXCEPTION | 10002 | The app account service is abnormal. |
| ERROR_INVALID_PASSWORD | 10003 | The password is invalid. | | ERROR_INVALID_PASSWORD | 10003 | The password is invalid. |
| ERROR_INVALID_REQUEST | 10004 | The request is invalid. | | ERROR_INVALID_REQUEST | 10004 | The request is invalid. |
| ERROR_INVALID_RESPONSE | 10005 | The response is invalid. | | ERROR_INVALID_RESPONSE | 10005 | The response is invalid. |
| ERROR_NETWORK_EXCEPTION | 10006 | The network is abnormal. | | ERROR_NETWORK_EXCEPTION | 10006 | The network is abnormal. |
| ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST | 10007 | The authenticator does not exist. | | ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST | 10007 | The authenticator does not exist. |
| ERROR_OAUTH_CANCELED | 10008 | The authentication is canceled. | | ERROR_OAUTH_CANCELED | 10008 | The authentication is canceled. |
| ERROR_OAUTH_LIST_TOO_LARGE | 10009 | The size of the OAuth list exceeds the limit. | | ERROR_OAUTH_LIST_TOO_LARGE | 10009 | The size of the OAuth list exceeds the limit. |
| ERROR_OAUTH_SERVICE_BUSY | 10010 | The OAuth service is busy. | | ERROR_OAUTH_SERVICE_BUSY | 10010 | The OAuth service is busy. |
| ERROR_OAUTH_SERVICE_EXCEPTION | 10011 | The OAuth service is abnormal. | | ERROR_OAUTH_SERVICE_EXCEPTION | 10011 | The OAuth service is abnormal. |
| ERROR_OAUTH_SESSION_NOT_EXIST | 10012 | The session to be authenticated does not exist. | | ERROR_OAUTH_SESSION_NOT_EXIST | 10012 | The session to be authenticated does not exist. |
| ERROR_OAUTH_TIMEOUT | 10013 | The authentication timed out. | | ERROR_OAUTH_TIMEOUT | 10013 | The authentication timed out. |
| ERROR_OAUTH_TOKEN_NOT_EXIST | 10014 | The OAuth access token does not exist.| | ERROR_OAUTH_TOKEN_NOT_EXIST | 10014 | The OAuth access token does not exist. |
| ERROR_OAUTH_TOKEN_TOO_MANY | 10015 | The number of OAuth access tokens reaches the limit. | | ERROR_OAUTH_TOKEN_TOO_MANY | 10015 | The number of OAuth access tokens reaches the limit. |
| ERROR_OAUTH_UNSUPPORT_ACTION | 10016 | The authentication operation is not supported. | | ERROR_OAUTH_UNSUPPORT_ACTION | 10016 | The authentication operation is not supported. |
| ERROR_OAUTH_UNSUPPORT_AUTH_TYPE | 10017 | The authentication type is not supported. | | ERROR_OAUTH_UNSUPPORT_AUTH_TYPE | 10017 | The authentication type is not supported. |
| ERROR_PERMISSION_DENIED | 10018 | The required permission is missing. | | ERROR_PERMISSION_DENIED | 10018 | The required permission is missing. |
## AuthenticatorCallback<sup>8+</sup> ## AuthenticatorCallback<sup>8+</sup>
...@@ -1656,10 +1656,10 @@ Called back to send the authentication result. ...@@ -1656,10 +1656,10 @@ Called back to send the authentication result.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------ | -------------------- | ---- | ------ | | ------ | -------------------- | ---- | ------ |
| code | number | Yes | Authentication result code.| | code | number | Yes | Authentication result code. |
| result | {[key: string]: any} | Yes | Authentication result. | | result | {[key: string]: any} | Yes | Authentication result. |
**Example** **Example**
...@@ -1686,9 +1686,9 @@ Called back to redirect an authentication request. ...@@ -1686,9 +1686,9 @@ Called back to redirect an authentication request.
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | ---- | ---- | ---------- | | ------- | ---- | ---- | ---------- |
| request | Want | Yes | Request to be redirected.| | request | Want | Yes | Request to be redirected. |
**Example** **Example**
...@@ -1723,12 +1723,12 @@ Implicitly adds an app account based on the specified authentication type and op ...@@ -1723,12 +1723,12 @@ Implicitly adds an app account based on the specified authentication type and op
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- | | ---------------- | --------------------- | ---- | --------------- |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. | | callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. | | options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.| | callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
### authenticate<sup>8+</sup> ### authenticate<sup>8+</sup>
...@@ -1739,13 +1739,13 @@ Authenticates an app account to obtain the OAuth access token. This method uses ...@@ -1739,13 +1739,13 @@ Authenticates an app account to obtain the OAuth access token. This method uses
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------------- | --------------------- | ---- | --------------- | | ---------------- | --------------------- | ---- | --------------- |
| name | string | Yes | App account name. | | name | string | Yes | App account name. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| callerBundleName | string | Yes | Bundle name of the authentication requester. | | callerBundleName | string | Yes | Bundle name of the authentication requester. |
| options | {[key: string]: any} | Yes | Options for the authentication. | | options | {[key: string]: any} | Yes | Options for the authentication. |
| callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result.| | callback | AuthenticatorCallback | Yes | Authenticator callback invoked to return the authentication result. |
**Example** **Example**
...@@ -1771,4 +1771,4 @@ Authenticates an app account to obtain the OAuth access token. This method uses ...@@ -1771,4 +1771,4 @@ Authenticates an app account to obtain the OAuth access token. This method uses
return new MyAuthenticator(); return new MyAuthenticator();
} }
} }
``` ```
\ No newline at end of file
# MissionSnapshot # MissionSnapshot
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -21,7 +21,7 @@ import { image } from '../@ohos.multimedia.image'; ...@@ -21,7 +21,7 @@ import { image } from '../@ohos.multimedia.image';
Describes the mission snapshot. Describes the mission snapshot.
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| Yes| Information that matches an ability.| | ability | ElementName | Yes | Yes | Information that matches an ability. |
| snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission.| | snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册