Skip to content

Commit

Permalink
feat: Imported Firefox 127 API schema data (#5315)
Browse files Browse the repository at this point in the history
Co-authored-by: William Durand <will+git@drnd.me>
  • Loading branch information
rpl and willdurand committed Jun 6, 2024
1 parent fcfd156 commit 69e9017
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 2 deletions.
36 changes: 36 additions & 0 deletions src/schema/imported/declarative_net_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@
"description": "Returns the current set of dynamic rules for the extension.",
"async": "callback",
"parameters": [
{
"allOf": [
{
"$ref": "#/types/GetRulesFilter"
},
{
"name": "filter",
"optional": true,
"description": "An object to filter the set of dynamic rules for the extension."
}
]
},
{
"name": "callback",
"type": "function",
Expand All @@ -173,6 +185,18 @@
"description": "Returns the current set of session scoped rules for the extension.",
"async": "callback",
"parameters": [
{
"allOf": [
{
"$ref": "#/types/GetRulesFilter"
},
{
"name": "filter",
"optional": true,
"description": "An object to filter the set of session scoped rules for the extension."
}
]
},
{
"name": "callback",
"type": "function",
Expand Down Expand Up @@ -832,6 +856,18 @@
"condition",
"action"
]
},
"GetRulesFilter": {
"type": "object",
"properties": {
"ruleIds": {
"type": "array",
"description": "If specified, only rules with matching IDs are included.",
"items": {
"type": "integer"
}
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/schema/imported/geckoProfiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
"power",
"responsiveness",
"cpufreq",
"bandwidth"
"bandwidth",
"memory"
]
},
"supports": {
Expand Down
3 changes: 2 additions & 1 deletion src/schema/imported/management.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,13 @@
]
},
"ExtensionInstallType": {
"description": "How the extension was installed. One of<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via an .xpi file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>other</var>: The extension was installed by other means.",
"description": "How the extension was installed. One of<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via an .xpi file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>admin</var>: The extension was installed by policy,<br><var>other</var>: The extension was installed by other means.",
"type": "string",
"enum": [
"development",
"normal",
"sideload",
"admin",
"other"
]
},
Expand Down
158 changes: 158 additions & 0 deletions src/schema/imported/runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,39 @@
}
]
},
{
"name": "getContexts",
"type": "function",
"description": "Fetches information about active contexts associated with this extension",
"async": "callback",
"parameters": [
{
"allOf": [
{
"$ref": "#/types/ContextFilter"
},
{
"name": "filter",
"description": "A filter to find matching context."
}
]
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "contexts",
"type": "array",
"items": {
"$ref": "#/types/ExtensionContext"
},
"description": "The matching contexts, if any."
}
]
}
]
},
{
"name": "openOptionsPage",
"type": "function",
Expand Down Expand Up @@ -700,6 +733,131 @@
}
},
"types": {
"ContextFilter": {
"min_manifest_version": 3,
"type": "object",
"description": "A filter to match against existing extension context. Matching contexts must match all specified filters.",
"properties": {
"contextIds": {
"type": "array",
"items": {
"type": "string"
}
},
"contextTypes": {
"type": "array",
"items": {
"$ref": "#/types/ContextType"
}
},
"documentIds": {
"type": "array",
"items": {
"type": "string"
}
},
"documentOrigins": {
"type": "array",
"items": {
"type": "string"
}
},
"documentUrls": {
"type": "array",
"items": {
"type": "string"
}
},
"frameIds": {
"type": "array",
"items": {
"type": "integer"
}
},
"tabIds": {
"type": "array",
"items": {
"type": "integer"
}
},
"windowIds": {
"type": "array",
"items": {
"type": "integer"
}
},
"incognito": {
"type": "boolean"
}
}
},
"ContextType": {
"type": "string",
"enum": [
"BACKGROUND",
"POPUP",
"SIDE_PANEL",
"TAB"
],
"description": "The type of extension view."
},
"ExtensionContext": {
"type": "object",
"description": "A context hosting extension content",
"properties": {
"contextId": {
"type": "string",
"description": "An unique identifier associated to this context"
},
"contextType": {
"allOf": [
{
"$ref": "#/types/ContextType"
},
{
"description": "The type of the context"
}
]
},
"documentId": {
"type": "string",
"unsupported": true,
"description": "An UUID for the document associated with this context, or undefined if it is not hosted in a document"
},
"documentOrigin": {
"type": "string",
"description": "The origin of the document associated with this context, or undefined if it is not hosted in a document"
},
"documentUrl": {
"type": "string",
"description": "The URL of the document associated with this context, or undefined if it is not hosted in a document"
},
"incognito": {
"type": "boolean",
"description": "Whether the context is associated with an private browsing context."
},
"frameId": {
"type": "integer",
"description": "The frame ID for this context, or -1 if it is not hosted in a frame."
},
"tabId": {
"type": "integer",
"description": "The tab ID for this context, or -1 if it is not hosted in a tab."
},
"windowId": {
"type": "integer",
"description": "The window ID for this context, or -1 if it is not hosted in a window."
}
},
"required": [
"contextId",
"contextType",
"incognito",
"frameId",
"tabId",
"windowId"
]
},
"Port": {
"type": "object",
"allowedContexts": [
Expand Down

0 comments on commit 69e9017

Please sign in to comment.