Skip to content

Commit

Permalink
feat: Imported Firefox 111.0b7 API schema (#4733)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpl authored Feb 27, 2023
1 parent e14c01d commit 04dd99a
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 13 deletions.
30 changes: 29 additions & 1 deletion src/schema/imported/declarative_net_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,34 @@
]
}
],
"properties": {
"DYNAMIC_RULESET_ID": {
"type": "string",
"value": "_dynamic",
"description": "Ruleset ID for the dynamic rules added by the extension."
},
"GUARANTEED_MINIMUM_STATIC_RULES": {
"type": "number",
"description": "The minimum number of static rules guaranteed to an extension across its enabled static rulesets. Any rules above this limit will count towards the global static rule limit."
},
"MAX_NUMBER_OF_STATIC_RULESETS": {
"type": "number",
"description": "The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key."
},
"MAX_NUMBER_OF_ENABLED_STATIC_RULESETS": {
"type": "number",
"description": "The maximum number of static Rulesets an extension can enable at any one time."
},
"MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES": {
"type": "number",
"description": "The maximum number of dynamic and session rules an extension can add. NOTE: in the Firefox we are enforcing this limit to the session and dynamic rules count separately, instead of enforcing it to the rules count for both combined as the Chrome implementation does."
},
"SESSION_RULESET_ID": {
"type": "string",
"value": "_session",
"description": "Ruleset ID for the session-scoped rules added by the extension."
}
},
"definitions": {
"Permission": {
"anyOf": [
Expand Down Expand Up @@ -514,7 +542,7 @@
},
"isUrlFilterCaseSensitive": {
"type": "boolean",
"description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive. Defaults to true."
"description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive."
},
"initiatorDomains": {
"type": "array",
Expand Down
4 changes: 4 additions & 0 deletions src/schema/imported/find.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"type": "boolean",
"description": "Find only ranges with case sensitive match."
},
"matchDiacritics": {
"type": "boolean",
"description": "Find only ranges with diacritic sensitive match."
},
"entireWord": {
"type": "boolean",
"description": "Find only ranges that match entire word."
Expand Down
1 change: 0 additions & 1 deletion src/schema/imported/geckoProfiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
"stackwalk",
"jsallocations",
"nostacksampling",
"preferencereads",
"nativeallocations",
"ipcmessages",
"audiocallbacktracing",
Expand Down
10 changes: 0 additions & 10 deletions src/schema/imported/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,6 @@
"type": "object",
"description": "Represents a WebExtension language pack manifest.json file",
"properties": {
"homepage_url": {
"type": "string",
"format": "url",
"preprocess": "localize"
},
"langpack_id": {
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z-]+$"
Expand Down Expand Up @@ -540,11 +535,6 @@
"type": "object",
"description": "Represents a WebExtension dictionary manifest.json file",
"properties": {
"homepage_url": {
"type": "string",
"format": "url",
"preprocess": "localize"
},
"dictionaries": {
"type": "object",
"patternProperties": {
Expand Down
62 changes: 61 additions & 1 deletion src/schema/imported/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,67 @@
"type": "string",
"description": "Search engine to use. Uses the default if not specified."
},
"disposition": {
"allOf": [
{
"$ref": "#/types/Disposition"
},
{
"description": "Location where search results should be displayed. NEW_TAB is the default."
}
]
},
"tabId": {
"type": "integer",
"description": "The ID of the tab for the search results. If not specified, a new tab is created."
"description": "The ID of the tab for the search results. If not specified, a new tab is created, unless disposition is set. tabId cannot be used with disposition."
}
},
"required": [
"query"
]
}
]
},
{
"name": "query",
"type": "function",
"async": "callback",
"description": "Use the chrome.search API to search via the default provider.",
"parameters": [
{
"type": "object",
"name": "queryInfo",
"properties": {
"text": {
"type": "string",
"description": "String to query with the default search provider."
},
"disposition": {
"allOf": [
{
"$ref": "#/types/Disposition"
},
{
"description": "Location where search results should be displayed. CURRENT_TAB is the default."
}
]
},
"tabId": {
"type": "integer",
"description": "Location where search results should be displayed. tabId cannot be used with disposition."
}
},
"required": [
"text"
]
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
}
],
"definitions": {
Expand Down Expand Up @@ -83,6 +134,15 @@
"name",
"isDefault"
]
},
"Disposition": {
"type": "string",
"description": "Location where search results should be displayed.",
"enum": [
"CURRENT_TAB",
"NEW_TAB",
"NEW_WINDOW"
]
}
}
}

0 comments on commit 04dd99a

Please sign in to comment.