Bug 1878081 - Drop per-file license header comments from schema files, r=willdurand...
[gecko.git] / toolkit / components / extensions / schemas / contextual_identities.json
blob315270ef20bfbe280391c2e6ace76cb81ce61acd
2   {
3     "namespace": "manifest",
4     "types": [
5       {
6         "$extend": "PermissionNoPrompt",
7         "choices": [
8           {
9             "type": "string",
10             "enum": ["contextualIdentities"]
11           }
12         ]
13       }
14     ]
15   },
16   {
17     "namespace": "contextualIdentities",
18     "description": "Use the <code>browser.contextualIdentities</code> API to query and modify contextual identity, also called as containers.",
19     "permissions": ["contextualIdentities"],
20     "types": [
21       {
22         "id": "ContextualIdentity",
23         "type": "object",
24         "description": "Represents information about a contextual identity.",
25         "properties": {
26           "name": {
27             "type": "string",
28             "description": "The name of the contextual identity."
29           },
30           "icon": {
31             "type": "string",
32             "description": "The icon name of the contextual identity."
33           },
34           "iconUrl": {
35             "type": "string",
36             "description": "The icon url of the contextual identity."
37           },
38           "color": {
39             "type": "string",
40             "description": "The color name of the contextual identity."
41           },
42           "colorCode": {
43             "type": "string",
44             "description": "The color hash of the contextual identity."
45           },
46           "cookieStoreId": {
47             "type": "string",
48             "description": "The cookie store ID of the contextual identity."
49           }
50         }
51       }
52     ],
53     "functions": [
54       {
55         "name": "get",
56         "type": "function",
57         "description": "Retrieves information about a single contextual identity.",
58         "async": true,
59         "parameters": [
60           {
61             "type": "string",
62             "name": "cookieStoreId",
63             "description": "The ID of the contextual identity cookie store. "
64           }
65         ]
66       },
67       {
68         "name": "query",
69         "type": "function",
70         "description": "Retrieves all contextual identities",
71         "async": true,
72         "parameters": [
73           {
74             "type": "object",
75             "name": "details",
76             "description": "Information to filter the contextual identities being retrieved.",
77             "properties": {
78               "name": {
79                 "type": "string",
80                 "optional": true,
81                 "description": "Filters the contextual identity by name."
82               }
83             }
84           }
85         ]
86       },
87       {
88         "name": "create",
89         "type": "function",
90         "description": "Creates a contextual identity with the given data.",
91         "async": true,
92         "parameters": [
93           {
94             "type": "object",
95             "name": "details",
96             "description": "Details about the contextual identity being created.",
97             "properties": {
98               "name": {
99                 "type": "string",
100                 "optional": false,
101                 "description": "The name of the contextual identity."
102               },
103               "color": {
104                 "type": "string",
105                 "optional": false,
106                 "description": "The color of the contextual identity."
107               },
108               "icon": {
109                 "type": "string",
110                 "optional": false,
111                 "description": "The icon of the contextual identity."
112               }
113             }
114           }
115         ]
116       },
117       {
118         "name": "update",
119         "type": "function",
120         "description": "Updates a contextual identity with the given data.",
121         "async": true,
122         "parameters": [
123           {
124             "type": "string",
125             "name": "cookieStoreId",
126             "description": "The ID of the contextual identity cookie store. "
127           },
128           {
129             "type": "object",
130             "name": "details",
131             "description": "Details about the contextual identity being created.",
132             "properties": {
133               "name": {
134                 "type": "string",
135                 "optional": true,
136                 "description": "The name of the contextual identity."
137               },
138               "color": {
139                 "type": "string",
140                 "optional": true,
141                 "description": "The color of the contextual identity."
142               },
143               "icon": {
144                 "type": "string",
145                 "optional": true,
146                 "description": "The icon of the contextual identity."
147               }
148             }
149           }
150         ]
151       },
152       {
153         "name": "move",
154         "type": "function",
155         "description": "Reorder one or more contextual identities by their cookieStoreIDs to a given position.",
156         "async": true,
157         "parameters": [
158           {
159             "name": "cookieStoreIds",
160             "description": "The ID or list of IDs of the contextual identity cookie stores. ",
161             "choices": [
162               { "type": "string" },
163               { "type": "array", "items": { "type": "string" } }
164             ]
165           },
166           {
167             "type": "integer",
168             "name": "position",
169             "description": "The position the contextual identity should move to."
170           }
171         ]
172       },
173       {
174         "name": "remove",
175         "type": "function",
176         "description": "Deletes a contextual identity by its cookie Store ID.",
177         "async": true,
178         "parameters": [
179           {
180             "type": "string",
181             "name": "cookieStoreId",
182             "description": "The ID of the contextual identity cookie store. "
183           }
184         ]
185       }
186     ],
187     "events": [
188       {
189         "name": "onUpdated",
190         "type": "function",
191         "description": "Fired when a container is updated.",
192         "parameters": [
193           {
194             "type": "object",
195             "name": "changeInfo",
196             "properties": {
197               "contextualIdentity": {
198                 "$ref": "ContextualIdentity",
199                 "description": "Contextual identity that has been updated"
200               }
201             }
202           }
203         ]
204       },
205       {
206         "name": "onCreated",
207         "type": "function",
208         "description": "Fired when a new container is created.",
209         "parameters": [
210           {
211             "type": "object",
212             "name": "changeInfo",
213             "properties": {
214               "contextualIdentity": {
215                 "$ref": "ContextualIdentity",
216                 "description": "Contextual identity that has been created"
217               }
218             }
219           }
220         ]
221       },
222       {
223         "name": "onRemoved",
224         "type": "function",
225         "description": "Fired when a container is removed.",
226         "parameters": [
227           {
228             "type": "object",
229             "name": "changeInfo",
230             "properties": {
231               "contextualIdentity": {
232                 "$ref": "ContextualIdentity",
233                 "description": "Contextual identity that has been removed"
234               }
235             }
236           }
237         ]
238       }
239     ]
240   }