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    "insightIntents"
8  ],
9  "propertyNames": {
10    "enum": [
11      "insightIntents"
12    ]
13  },
14  "properties": {
15    "insightIntents": {
16      "description": "Indicates the configuration of insightIntents.",
17      "type": "array",
18      "minItems": 1,
19      "maxItems": 32,
20      "uniqueItems": true,
21      "items": {
22        "type": "object",
23        "propertyNames": {
24          "enum": [
25            "intentName",
26            "domain",
27            "intentVersion",
28            "srcEntry",
29            "uiAbility",
30            "serviceExtension",
31            "uiExtension",
32            "form"
33          ]
34        },
35        "required": [
36          "intentName",
37          "domain",
38          "intentVersion",
39          "srcEntry"
40        ],
41        "properties": {
42          "intentName": {
43            "description": "Indicates the name of insightIntent.It's also the intent interface to implement.",
44            "type": "string",
45            "pattern": "^[A-Z][a-zA-Z0-9]+$"
46          },
47          "domain": {
48            "description": "Indicates the domain of insightIntent.",
49            "type": "string"
50          },
51          "intentVersion": {
52            "description": "Indicates the version of insightIntent.",
53            "type": "string",
54            "pattern": "^(\\d+\\.){2}\\d+$"
55          },
56          "srcEntry": {
57            "description": "Indicates the js code path corresponding to the ability.",
58            "type": "string",
59            "maxLength": 127
60          },
61          "uiAbility": {
62            "type": "object",
63            "propertyNames": {
64              "enum": [
65                "ability",
66                "executeMode"
67              ]
68            },
69            "required": [
70              "ability",
71              "executeMode"
72            ],
73            "properties": {
74              "ability": {
75                "description": "Indicates the name of the ability.",
76                "type": "string",
77                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
78                "maxLength": 127
79              },
80              "executeMode": {
81                "type": "array",
82                "items": {
83                    "type":"string",
84                    "enum": [
85                        "background",
86                        "foreground"
87                    ]
88                }
89              }
90            }
91          },
92          "serviceExtension": {
93            "type": "object",
94            "propertyNames": {
95              "enum": [
96                "ability"
97              ]
98            },
99            "required": [
100              "ability"
101            ],
102            "properties": {
103              "ability": {
104                "description": "Indicates the name of the ability.",
105                "type": "string",
106                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
107                "maxLength": 127
108              }
109            }
110          },
111          "uiExtension": {
112            "type": "object",
113            "propertyNames": {
114              "enum": [
115                "ability"
116              ]
117            },
118            "required": [
119              "ability"
120            ],
121            "properties": {
122              "ability": {
123                "description": "Indicates the name of the ability.",
124                "type": "string",
125                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
126                "maxLength": 127
127              }
128            }
129          },
130          "form": {
131            "type": "object",
132            "propertyNames": {
133              "enum": [
134                "ability",
135                "formName"
136              ]
137            },
138            "required": [
139              "ability",
140              "formName"
141            ],
142            "properties": {
143              "ability": {
144                "description": "Indicates the name of the ability.",
145                "type": "string",
146                "pattern": "^[a-zA-Z][0-9a-zA-Z_.]+$",
147                "maxLength": 127
148              },
149              "formName": {
150                "description": "Indicates the name of the form class. The tag value is a string of up to 127 bytes. The tag cannot be default.",
151                "type": "string",
152                "maxLength": 127
153              }
154            }
155          }
156        }
157      }
158    }
159  }
160}