1# @ohos.app.ability.insightIntent (Basic Capability for Intent Calls) 2 3The module provides basic capabilities for intent calls. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8> 9> The APIs of this module can be used only in the stage model. 10 11## Modules to Import 12 13```ts 14import { insightIntent } from '@kit.AbilityKit'; 15``` 16 17## ExecuteMode 18 19Enumerates the intent call execution modes. 20 21**System capability**: SystemCapability.Ability.AbilityRuntime.Core 22 23| Name| Value| Description| 24| -------- | -------- | -------- | 25| UI_ABILITY_FOREGROUND | 0 | Display a UIAbility in the foreground.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 26| UI_ABILITY_BACKGROUND | 1 | Start a UIAbility in the background.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 27| UI_EXTENSION_ABILITY | 2 | Start a UIExtensionAbility.| 28 29## ExecuteResult 30 31Defines the intent call execution result. 32 33**System capability**: SystemCapability.Ability.AbilityRuntime.Core 34 35| Name| Type| Read-only| Optional| Description| 36| -------- | -------- | -------- | -------- | -------- | 37| code | number | No| No| Error code returned.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 38| result | Record<string, Object> | No| Yes| Execution result returned.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 39| uris<sup>18+</sup> | Array<string> | No| Yes| List of URIs authorized by the intent executor to the intent caller during the call.<br>**Atomic service API**: This API can be used in atomic services since API version 18.| 40| flags<sup>18+</sup> | number | No| Yes| [Flags](js-apis-app-ability-wantConstant.md#flags) of the URIs authorized by the intent executor to the intent caller during the call.<br>**Atomic service API**: This API can be used in atomic services since API version 18.<br>**NOTE**<br>This parameter supports only **FLAG_AUTH_READ_URI_PERMISSION**, **FLAG_AUTH_WRITE_URI_PERMISSION**, and FLAG_AUTH_READ_URI_PERMISSION\|FLAG_AUTH_WRITE_URI_PERMISSION.| 41 42## IntentEntity<sup>20+<sup> 43 44Base class of the [@InsightIntentEntity](./js-apis-app-ability-InsightIntentDecorator.md#insightintententity) decorator. It is used to define intent entities. 45 46**System capability**: SystemCapability.Ability.AbilityRuntime.Core 47 48**Model restriction**: This API can be used only in the stage model. 49 50| Name| Type| Read-only| Optional| Description| 51| -------- | -------- | -------- | -------- | -------- | 52| entityId | string | No| No| ID of the intent entity.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 53 54## IntentResult\<T><sup>20+<sup> 55 56Describes the result returned after an intent is executed. 57 58**System capability**: SystemCapability.Ability.AbilityRuntime.Core 59 60**Model restriction**: This API can be used only in the stage model. 61 62| Name| Type| Read-only| Optional| Description| 63| -------- | -------- | -------- | -------- | -------- | 64| code | number | No| No| Error code returned.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 65| result | T | No| Yes| Execution result returned.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 66