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