summaryrefslogtreecommitdiffstats
path: root/browser/components/pagedata/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/pagedata/schemas')
-rw-r--r--browser/components/pagedata/schemas/article.schema.json26
-rw-r--r--browser/components/pagedata/schemas/audio.schema.json34
-rw-r--r--browser/components/pagedata/schemas/document.schema.json18
-rw-r--r--browser/components/pagedata/schemas/general.schema.json30
-rw-r--r--browser/components/pagedata/schemas/product.schema.json46
-rw-r--r--browser/components/pagedata/schemas/video.schema.json38
6 files changed, 192 insertions, 0 deletions
diff --git a/browser/components/pagedata/schemas/article.schema.json b/browser/components/pagedata/schemas/article.schema.json
new file mode 100644
index 0000000000..e02bb11655
--- /dev/null
+++ b/browser/components/pagedata/schemas/article.schema.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "article.schema.json",
+ "title": "Article",
+ "description": "An article for reading",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The article's name",
+ "type": "string"
+ },
+ "author": {
+ "description": "The author(s) of the article",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date the article was published in ISO-8601 date or date/time format",
+ "type": "string"
+ },
+ "readingTime": {
+ "description": "The expected time to read the article in seconds",
+ "type": "number"
+ }
+ },
+ "required": ["name"]
+}
diff --git a/browser/components/pagedata/schemas/audio.schema.json b/browser/components/pagedata/schemas/audio.schema.json
new file mode 100644
index 0000000000..db1b79b55c
--- /dev/null
+++ b/browser/components/pagedata/schemas/audio.schema.json
@@ -0,0 +1,34 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "audio.schema.json",
+ "title": "Audio",
+ "description": "An audio file",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The audio's name",
+ "type": "string"
+ },
+ "duration": {
+ "description": "The audio's duration in seconds",
+ "type": "number"
+ },
+ "artist": {
+ "description": "The artist who created the audio",
+ "type": "string"
+ },
+ "album": {
+ "description": "For music on an album the name of the album",
+ "type": "string"
+ },
+ "track": {
+ "description": "For music on an album the number of the track on the album",
+ "type": "number"
+ },
+ "genre": {
+ "description": "The genre of the audio",
+ "type": "string"
+ }
+ },
+ "required": ["name"]
+}
diff --git a/browser/components/pagedata/schemas/document.schema.json b/browser/components/pagedata/schemas/document.schema.json
new file mode 100644
index 0000000000..849010773b
--- /dev/null
+++ b/browser/components/pagedata/schemas/document.schema.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "document.schema.json",
+ "title": "Document",
+ "description": "A document of some kind, either viewable or editable",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The document's name",
+ "type": "string"
+ },
+ "mimeType": {
+ "description": "The document's mimetype",
+ "type": "string"
+ }
+ },
+ "required": ["name"]
+}
diff --git a/browser/components/pagedata/schemas/general.schema.json b/browser/components/pagedata/schemas/general.schema.json
new file mode 100644
index 0000000000..a400fd889b
--- /dev/null
+++ b/browser/components/pagedata/schemas/general.schema.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "general.schema.json",
+ "title": "General",
+ "description": "General data about a page",
+ "type": "object",
+ "properties": {
+ "url": {
+ "description": "The page's url",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date the data was collected as a timestamp",
+ "type": "number"
+ },
+ "description": {
+ "description": "A description of the page",
+ "type": "string"
+ },
+ "siteName": {
+ "description": "A friendly name for the site",
+ "type": "string"
+ },
+ "image": {
+ "description": "The url for an image representative of the page",
+ "type": "string"
+ }
+ },
+ "required": ["url", "date"]
+}
diff --git a/browser/components/pagedata/schemas/product.schema.json b/browser/components/pagedata/schemas/product.schema.json
new file mode 100644
index 0000000000..77bec76ff2
--- /dev/null
+++ b/browser/components/pagedata/schemas/product.schema.json
@@ -0,0 +1,46 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "product.schema.json",
+ "title": "Product",
+ "description": "A product that can be purchased",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The product's name",
+ "type": "string"
+ },
+ "brand": {
+ "description": "The product's brand",
+ "type": "string"
+ },
+ "price": {
+ "description": "The cost of a single unit",
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number"
+ },
+ "currency": {
+ "description": "The currency for the value",
+ "type": "string"
+ }
+ },
+ "required": ["value"]
+ },
+ "shippingCost": {
+ "description": "The cost of shipping",
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number"
+ },
+ "currency": {
+ "description": "The currency for the value",
+ "type": "string"
+ }
+ },
+ "required": ["value"]
+ }
+ },
+ "required": ["name"]
+}
diff --git a/browser/components/pagedata/schemas/video.schema.json b/browser/components/pagedata/schemas/video.schema.json
new file mode 100644
index 0000000000..1091ebfe89
--- /dev/null
+++ b/browser/components/pagedata/schemas/video.schema.json
@@ -0,0 +1,38 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "video.schema.json",
+ "title": "Video",
+ "description": "A video",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The video's name",
+ "type": "string"
+ },
+ "duration": {
+ "description": "The video's duration in seconds",
+ "type": "number"
+ },
+ "quality": {
+ "description": "A short description of the video's quality (e.g. 'HD', '720p')",
+ "type": "string"
+ },
+ "show": {
+ "description": "For an episode of a TV show the name of the TV show",
+ "type": "string"
+ },
+ "season": {
+ "description": "For an episode of a TV show the season number it appears in",
+ "type": "number"
+ },
+ "episode": {
+ "description": "For an episode of a TV show the number of the episode in the season",
+ "type": "number"
+ },
+ "genre": {
+ "description": "The genre of the video",
+ "type": "string"
+ }
+ },
+ "required": ["name"]
+}