Bug 1941046 - Part 4: Send a callback request for impression and clicks of MARS Top...
[gecko.git] / toolkit / components / shopping / schemas / analysis_response.schema.json
blobcb84f9981e721c005c763456b51c107b1cbbfcb4
2   "$schema": "http://json-schema.org/draft-07/schema#",
3   "$id": "chrome://global/content/shopping/analysis_response.schema.json",
4   "title": "Product",
5   "description": "A product analysis result",
6   "type": "object",
7   "properties": {
8     "product_id": {
9       "description": "Product identifier (ASIN / SKU).",
10       "anyOf": [
11         {
12           "type": "string"
13         },
14         {
15           "type": "null"
16         }
17       ],
18       "examples": ["B07W59LRL9", "5200904.p", "1752657021"]
19     },
20     "grade": {
21       "description": "Reliability grade for the product's reviews.",
22       "anyOf": [
23         {
24           "type": "string"
25         },
26         {
27           "type": "null"
28         }
29       ],
30       "examples": ["A", "B", "C", "D", "F"]
31     },
32     "adjusted_rating": {
33       "description": "Product rating adjusted to exclude untrusted reviews.",
34       "anyOf": [
35         {
36           "type": "number"
37         },
38         {
39           "type": "null"
40         }
41       ],
42       "examples": [4.7, null]
43     },
44     "needs_analysis": {
45       "description": "Boolean indicating if the analysis is stale.",
46       "type": "boolean"
47     },
48     "page_not_supported": {
49       "description": "Boolean indicating if current product page is supported or not.",
50       "type": "boolean"
51     },
52     "not_enough_reviews": {
53       "description": "Boolean indicating if the product has enough reviews to analyze.",
54       "type": "boolean"
55     },
56     "last_analysis_time": {
57       "description": "Integer indicating last analysis time since 1970-01-01 00:00:00 +0000",
58       "type": "number"
59     },
60     "deleted_product": {
61       "description": "Boolean indicating if product is marked as deleted by website in Fakespot database",
62       "type": "boolean"
63     },
64     "deleted_product_reported": {
65       "description": "Boolean indicating if product marked as deleted has already been reported as in stock by a user",
66       "type": "boolean"
67     },
68     "highlights": {
69       "description": "Object containing highlights for Amazon product.",
70       "type": "object",
71       "properties": {
72         "quality": {
73           "description": "Highlights related to quality.",
74           "type": "object",
75           "$ref": "#/$defs/highlights"
76         },
77         "price": {
78           "description": "Highlights related to price.",
79           "type": "object",
80           "$ref": "#/$defs/highlights"
81         },
82         "shipping": {
83           "description": "Highlights related to shipping.",
84           "type": "object",
85           "$ref": "#/$defs/highlights"
86         },
87         "packaging/appearance": {
88           "description": "Highlights related to packaging or appearance.",
89           "type": "object",
90           "$ref": "#/$defs/highlights"
91         },
92         "competitiveness": {
93           "description": "Highlights related to competitiveness.",
94           "type": "object",
95           "$ref": "#/$defs/highlights"
96         }
97       }
98     }
99   },
100   "$defs": {
101     "highlights": {
102       "description": "Possibly empty array of highlights.",
103       "type": "array",
104       "items": {
105         "type": "string"
106       }
107     }
108   }