• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# WantAgentInfo
2
3The module defines the information required for triggering a WantAgent.
4
5> **NOTE**
6>
7> 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.
8>
9> This topic describes only system APIs provided by the module. For details about its public APIs, see [WantAgentInfo](js-apis-inner-wantAgent-wantAgentInfo.md).
10
11## Modules to Import
12
13```ts
14import { wantAgent as abilityWantAgent } from '@kit.AbilityKit';
15```
16
17## LocalWantAgentInfo<sup>20+</sup>
18
19Defines the information required for triggering a local WantAgent object. The information can be used as an input parameter in [createLocalWantAgent](js-apis-app-ability-wantAgent-sys.md#wantagentcreatelocalwantagent20) to obtain a local WantAgent object.
20
21**System capability**: SystemCapability.Ability.AbilityRuntime.Core
22
23**System API**: This is a system API.
24
25**Model restriction**: This API can be used only in the stage model.
26
27| Name          | Type                           | Read-Only | Optional | Description                  |
28| -------------- | ------------------------------- | --- | ---- | ---------------------- |
29| wants          | Array\<[Want](js-apis-app-ability-want.md)\>                          | No  | No  | Array of all Want objects. Currently, only one Want object is supported. If multiple values are passed in, only the first member in the array is used.   |
30| operationType  | [wantAgent.OperationType](js-apis-wantAgent.md#operationtype)         | No  | Yes  | Type of the operation to execute.     |
31| requestCode    | number                          | No  | No  | Custom request code, which is used to identify the operation to execute.|
32