{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://github.com/dguo/pawblock/blob/master/storage-schema.json",
    "description": "Schema for PawBlock's browser storage state",
    "type": "object",
    "properties": {
        "on": {
            "description": "Whether or not the rules should be applied",
            "type": "boolean"
        },
        "rules": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "domain": {
                        "type": "string"
                    },
                    "path": {
                        "type": "string"
                    }
                },
                "additionalProperties": false
            },
            "_uniqueItems": true
        },
        "storageVersion": {
            "description": "To make schema changes easier in the future",
            "type": "string"
        },
        "allowedTabId": {
            "description": "The tab that should not enforce a block",
            "type": "integer"
        },
        "blockType": {
            "description": "The strictness of the block page",
            "type": "string",
            "enum": [
                "hard",
                "soft"
            ]
        },
        "softBlockDelay": {
            "description": "The number of seconds that the user must wait before continuing",
            "type": "integer",
            "minimum": 0
        },
        "reenableMinutes": {
            "description": "Number of minutes to wait before automatically turning PawBlock back on after turning it off",
            "type": [
                "integer",
                "null"
            ],
            "minimum": 1
        }
    },
    "additionalProperties": false
}