Skip to content

Commit d569d33

Browse files
committed
Initial Firefox schemas, 2023Q1
1 parent 6183ce7 commit d569d33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+17215
-0
lines changed

interfaces/firefox/LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This source code is available under licenses which are both [free]
2+
and [open source].
3+
4+
More specifically, most of the source code is available under the
5+
[Mozilla Public License 2.0][MPL2].
6+
7+
Additionally, parts of the schema files originated from Chromium
8+
source code:
9+
10+
> Copyright (c) 2012 The Chromium Authors. All rights reserved.
11+
> Use of this source code is governed by a BSD-style license that can be
12+
> found in the [LICENSE] file.
13+
14+
You are not granted rights or licenses to the trademarks of the
15+
Mozilla Foundation or any party, including without limitation the
16+
Firefox name or logo.
17+
18+
For more information, see:
19+
http://www.mozilla.org/foundation/licensing.html
20+
21+
[free]: https://www.gnu.org/philosophy/free-sw.html
22+
[open source]: https://www.opensource.org/docs/definition.php
23+
[LICENSE]: schemas/LICENSE
24+
[MPL2]: MPL2

interfaces/firefox/MPL2

Lines changed: 363 additions & 0 deletions
Large diffs are not rendered by default.

interfaces/firefox/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Thes directory contains a 2023Q1 snapshot of most JSON Schema files
2+
used in Firefox.
3+
4+
It includes APIs that are already supported across browsers, and those we
5+
believe might be of interest to other browsers. We ommits APIs which are
6+
considered internal to Firefox.
7+
8+
The full and up to date list can always be found using this query from [mozilla-central](https://searchfox.org/mozilla-central/search?path=components%2Fextensions%2Fschemas%2F*.json).
9+
10+
See [LICENSE.md](LICENSE) for copyright details.

interfaces/firefox/schemas/LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are
5+
// met:
6+
//
7+
// * Redistributions of source code must retain the above copyright
8+
// notice, this list of conditions and the following disclaimer.
9+
// * Redistributions in binary form must reproduce the above
10+
// copyright notice, this list of conditions and the following disclaimer
11+
// in the documentation and/or other materials provided with the
12+
// distribution.
13+
// * Neither the name of Google Inc. nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
[
6+
{
7+
"namespace": "alarms",
8+
"permissions": ["alarms"],
9+
"types": [
10+
{
11+
"id": "Alarm",
12+
"type": "object",
13+
"properties": {
14+
"name": {
15+
"type": "string",
16+
"description": "Name of this alarm."
17+
},
18+
"scheduledTime": {
19+
"type": "number",
20+
"description": "Time when the alarm is scheduled to fire, in milliseconds past the epoch."
21+
},
22+
"periodInMinutes": {
23+
"type": "number",
24+
"optional": true,
25+
"description": "When present, signals that the alarm triggers periodically after so many minutes."
26+
}
27+
}
28+
}
29+
],
30+
"functions": [
31+
{
32+
"name": "create",
33+
"type": "function",
34+
"description": "Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.",
35+
"parameters": [
36+
{
37+
"type": "string",
38+
"name": "name",
39+
"optional": true,
40+
"description": "Optional name to identify this alarm. Defaults to the empty string."
41+
},
42+
{
43+
"type": "object",
44+
"name": "alarmInfo",
45+
"description": "Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.",
46+
"properties": {
47+
"when": {"type": "number", "optional": true,
48+
"description": "Time when the alarm is scheduled to first fire, in milliseconds past the epoch."},
49+
"delayInMinutes": {"type": "number", "optional": true,
50+
"description": "Number of minutes from the current time after which the alarm should first fire."},
51+
"periodInMinutes": {"type": "number", "optional": true,
52+
"description": "Number of minutes after which the alarm should recur repeatedly."}
53+
}
54+
}
55+
]
56+
},
57+
{
58+
"name": "get",
59+
"type": "function",
60+
"description": "Retrieves details about the specified alarm.",
61+
"async": "callback",
62+
"parameters": [
63+
{
64+
"type": "string",
65+
"name": "name",
66+
"optional": true,
67+
"description": "The name of the alarm to get. Defaults to the empty string."
68+
},
69+
{
70+
"type": "function",
71+
"name": "callback",
72+
"parameters": [
73+
{
74+
"name": "alarm",
75+
"$ref": "Alarm",
76+
"optional": true
77+
}
78+
]
79+
}
80+
]
81+
},
82+
{
83+
"name": "getAll",
84+
"type": "function",
85+
"description": "Gets an array of all the alarms.",
86+
"async": "callback",
87+
"parameters": [
88+
{
89+
"type": "function",
90+
"name": "callback",
91+
"parameters": [
92+
{ "name": "alarms", "type": "array", "items": { "$ref": "Alarm" } }
93+
]
94+
}
95+
]
96+
},
97+
{
98+
"name": "clear",
99+
"type": "function",
100+
"description": "Clears the alarm with the given name.",
101+
"async": "callback",
102+
"parameters": [
103+
{
104+
"type": "string",
105+
"name": "name",
106+
"optional": true,
107+
"description": "The name of the alarm to clear. Defaults to the empty string."
108+
},
109+
{
110+
"type": "function",
111+
"name": "callback",
112+
"parameters": [
113+
{ "name": "wasCleared", "type": "boolean", "description": "Whether an alarm of the given name was found to clear." }
114+
]
115+
}
116+
]
117+
},
118+
{
119+
"name": "clearAll",
120+
"type": "function",
121+
"description": "Clears all alarms.",
122+
"async": "callback",
123+
"parameters": [
124+
{
125+
"type": "function",
126+
"name": "callback",
127+
"parameters": [
128+
{ "name": "wasCleared", "type": "boolean", "description": "Whether any alarm was found to clear." }
129+
]
130+
}
131+
]
132+
}
133+
],
134+
"events": [
135+
{
136+
"name": "onAlarm",
137+
"type": "function",
138+
"description": "Fired when an alarm has expired. Useful for transient background pages.",
139+
"parameters": [
140+
{
141+
"name": "name",
142+
"$ref": "Alarm",
143+
"description": "The alarm that has expired."
144+
}
145+
]
146+
}
147+
]
148+
}
149+
]

0 commit comments

Comments
 (0)