summaryrefslogtreecommitdiffstats
path: root/browser/components/search/schema
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /browser/components/search/schema
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/search/schema')
-rw-r--r--browser/components/search/schema/Readme.txt7
-rw-r--r--browser/components/search/schema/search-telemetry-schema.json103
-rw-r--r--browser/components/search/schema/search-telemetry-ui-schema.json12
3 files changed, 122 insertions, 0 deletions
diff --git a/browser/components/search/schema/Readme.txt b/browser/components/search/schema/Readme.txt
new file mode 100644
index 0000000000..14fffb5c10
--- /dev/null
+++ b/browser/components/search/schema/Readme.txt
@@ -0,0 +1,7 @@
+The schemas in this directory are the primary source for the schemas they represent.
+
+They are uploaded to the RemoteSettings server to validate new configurations.
+
+Any changes should be validated by the Search team.
+
+See the documentation for more information: https://firefox-source-docs.mozilla.org/
diff --git a/browser/components/search/schema/search-telemetry-schema.json b/browser/components/search/schema/search-telemetry-schema.json
new file mode 100644
index 0000000000..0851e7867b
--- /dev/null
+++ b/browser/components/search/schema/search-telemetry-schema.json
@@ -0,0 +1,103 @@
+{
+ "type": "object",
+ "required": [
+ "telemetryId",
+ "searchPageRegexp",
+ "queryParamName"
+ ],
+ "properties": {
+ "telemetryId": {
+ "type": "string",
+ "title": "Telemetry Id",
+ "description": "The telemetry identifier for the provider.",
+ "pattern": "^[a-z0-9-._]*$"
+ },
+ "searchPageRegexp": {
+ "type": "string",
+ "title": "Search Page Regular Expression",
+ "description": "A regular expression which matches the search page of the provider."
+ },
+ "queryParamName": {
+ "type": "string",
+ "title": "Search Query Parameter Name",
+ "description": "The name of the query parameter for the user's search string."
+ },
+ "codeParamName": {
+ "type": "string",
+ "title": "Partner Code Parameter Name",
+ "description": "The name of the query parameter for the partner code."
+ },
+ "codePrefixes": {
+ "type": "array",
+ "title": "Partner Code Prefixes",
+ "description": "An array of prefixes (or complete values) to match against the partner code paramters in the url.",
+ "items": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-._]*$"
+ }
+ },
+ "followOnParamNames": {
+ "type": "array",
+ "title": "Follow-on Search Parameter Names",
+ "description": "An array of query parameter names that are used when a follow-on search occurs.",
+ "items": {
+ "type": "string",
+ "pattern": "^[a-z0-9-._]*$"
+ }
+ },
+ "followOnCookies": {
+ "type": "array",
+ "title": "Follow-on Cookies",
+ "description": "An array of cookie details that are used to identify follow-on searches.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "extraCodeParamName": {
+ "type": "string",
+ "description": "The query parameter name in the URL that indicates this might be a follow-on search.",
+ "pattern": "^[a-z0-9-._]*$"
+ },
+ "extraCodePrefixes": {
+ "type": "array",
+ "description": "Possbile values for the query parameter in the URL that indicates this might be a follow-on search.",
+ "items": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-._]*$"
+ }
+ },
+ "host": {
+ "type": "string",
+ "description": "The hostname on which the cookie is stored.",
+ "pattern": "^[a-z0-9-._]*$"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the cookie to check.",
+ "pattern": "^[a-zA-Z0-9-._]*$"
+ },
+ "codeParamName": {
+ "type": "string",
+ "description": "The name of parameter within the cookie.",
+ "pattern": "^[a-zA-Z0-9-._]*$"
+ },
+ "codePrefixes": {
+ "type": "array",
+ "description": "Possbile values for the parameter within the cookie.",
+ "items": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-._]*$"
+ }
+ }
+ }
+ }
+ },
+ "extraAdServersRegexps": {
+ "type": "array",
+ "title": "Extra Ad Server Regular Expressions",
+ "description": "An array of regular expressions that match URLs of potential ad servers.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+}
diff --git a/browser/components/search/schema/search-telemetry-ui-schema.json b/browser/components/search/schema/search-telemetry-ui-schema.json
new file mode 100644
index 0000000000..4655313055
--- /dev/null
+++ b/browser/components/search/schema/search-telemetry-ui-schema.json
@@ -0,0 +1,12 @@
+{
+ "ui:order": [
+ "telemetryId",
+ "searchPageRegexp",
+ "queryParamName",
+ "codeParamName",
+ "codePrefixes",
+ "followOnParamNames",
+ "followOnCookies",
+ "extraAdServersRegexps"
+ ]
+}