• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "title": "JSON schema for insight_intent.json",
3  "$schema": "http://json-schema.org/draft-07/schema#",
4  "type": "object",
5  "additionalProperties": false,
6  "required": [],
7  "propertyNames": {
8    "enum": [
9      "insightIntents",
10      "insightIntentsSrcEntry"
11    ]
12  },
13  "properties": {
14    "insightIntents": {
15      "description": "Indicates the configuration of insightIntents.",
16      "type": "array",
17      "minItems": 1,
18      "maxItems": 128,
19      "uniqueItems": true,
20      "items": {
21        "type": "object",
22        "propertyNames": {
23          "enum": [
24            "intentName",
25            "domain",
26            "intentVersion",
27            "srcEntry",
28            "uiAbility",
29            "serviceExtension",
30            "uiExtension",
31            "form",
32            "displayName",
33            "displayDescription",
34            "icon",
35            "keywords",
36            "inputParams",
37            "outputParams",
38            "entities"
39          ]
40        },
41        "required": [
42          "intentName",
43          "domain",
44          "intentVersion",
45          "srcEntry"
46        ],
47        "properties": {
48          "intentName": {
49            "description": "Indicates the name of insightIntent.It's also the intent interface to implement.",
50            "type": "string",
51            "pattern": "^[A-Z][a-zA-Z0-9]+$"
52          },
53          "domain": {
54            "description": "Indicates the domain of insightIntent.",
55            "type": "string"
56          },
57          "intentVersion": {
58            "description": "Indicates the version of insightIntent.",
59            "type": "string",
60            "pattern": "^(\\d+\\.){2}\\d+$"
61          },
62          "srcEntry": {
63            "description": "Indicates the js code path corresponding to the ability.",
64            "type": "string",
65            "maxLength": 127
66          },
67          "uiAbility": {
68            "type": "object",
69            "propertyNames": {
70              "enum": [
71                "ability",
72                "executeMode"
73              ]
74            },
75            "required": [
76              "ability",
77              "executeMode"
78            ],
79            "properties": {
80              "ability": {
81                "description": "Indicates the name of the ability.",
82                "type": "string",
83                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
84                "maxLength": 127
85              },
86              "executeMode": {
87                "type": "array",
88                "items": {
89                  "type": "string",
90                  "enum": [
91                    "background",
92                    "foreground"
93                  ]
94                }
95              }
96            }
97          },
98          "serviceExtension": {
99            "type": "object",
100            "propertyNames": {
101              "enum": [
102                "ability"
103              ]
104            },
105            "required": [
106              "ability"
107            ],
108            "properties": {
109              "ability": {
110                "description": "Indicates the name of the ability.",
111                "type": "string",
112                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
113                "maxLength": 127
114              }
115            }
116          },
117          "uiExtension": {
118            "type": "object",
119            "propertyNames": {
120              "enum": [
121                "ability"
122              ]
123            },
124            "required": [
125              "ability"
126            ],
127            "properties": {
128              "ability": {
129                "description": "Indicates the name of the ability.",
130                "type": "string",
131                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
132                "maxLength": 127
133              }
134            }
135          },
136          "form": {
137            "type": "object",
138            "propertyNames": {
139              "enum": [
140                "ability",
141                "formName"
142              ]
143            },
144            "required": [
145              "ability",
146              "formName"
147            ],
148            "properties": {
149              "ability": {
150                "description": "Indicates the name of the ability.",
151                "type": "string",
152                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
153                "maxLength": 127
154              },
155              "formName": {
156                "description": "Indicates the name of the form class. The tag value is a string of up to 127 bytes. The tag cannot be default.",
157                "type": "string",
158                "maxLength": 127
159              }
160            }
161          },
162          "displayName": {
163            "description": "Indicates the display name of insightIntent.",
164            "type": "string"
165          },
166          "displayDescription": {
167            "description": "Indicates the display description of insightIntent.",
168            "type": "string"
169          },
170          "icon": {
171            "description": "Indicates the display icon of insightIntent.",
172            "type": "string"
173          },
174          "keywords": {
175            "description": "Indicates the keywords of insightIntent.",
176            "type": "array",
177            "items": {
178              "type": "string"
179            }
180          },
181          "inputParams": {
182            "description": "Indicates the input params of insightIntent.",
183            "type": "array",
184            "items": {
185              "type": "object"
186            }
187          },
188          "outputParams": {
189            "description": "Indicates the output params of insightIntent.",
190            "type": "array",
191            "items": {
192              "type": "object"
193            }
194          },
195          "entities": {
196            "description": "Indicates the entities of insightIntent.",
197            "type": "object"
198          }
199        }
200      }
201    },
202    "insightIntentsSrcEntry": {
203      "description": "Indicates the srcEntry of insightIntents.",
204      "type": "array",
205      "uniqueItems": true,
206      "items": {
207        "type": "object",
208        "propertyNames": {
209          "enum": [
210            "srcEntry"
211          ]
212        },
213        "required": [
214          "srcEntry"
215        ],
216        "additionalProperties": false,
217        "properties": {
218          "srcEntry": {
219            "description": "Indicates the js code path corresponding to the insight intent entry executor.",
220            "type": "string",
221            "maxLength": 127
222          }
223        }
224      }
225    }
226  }
227}
228