{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "id": {
                "type": "string",
                "pattern": "^[A-Fa-f\\d]{24}$"
            },
            "email": {
                "type": "string",
                "format": "email",
                "maxLength": 1024
            },
            "role": {
                "type": "string",
                "enum": [
                    "admin",
                    "edit",
                    "collaborate",
                    "view",
                    "none"
                ]
            },
            "applicationRoles": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "resourceId": {
                            "type": "string",
                            "pattern": "^[A-Fa-f\\d]{24}$"
                        },
                        "role": {
                            "type": "string",
                            "enum": [
                                "collaborate",
                                "view",
                                "none"
                            ]
                        }
                    },
                    "required": [
                        "resourceId",
                        "role"
                    ],
                    "additionalProperties": false
                },
                "maxItems": 1000
            },
            "dashboardRoles": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "resourceId": {
                            "type": "string",
                            "pattern": "^[A-Fa-f\\d]{24}$"
                        },
                        "role": {
                            "type": "string",
                            "enum": [
                                "collaborate",
                                "view",
                                "none"
                            ]
                        }
                    },
                    "required": [
                        "resourceId",
                        "role"
                    ],
                    "additionalProperties": false
                },
                "maxItems": 1000
            },
            "inviteDate": {
                "type": "string",
                "format": "date-time"
            },
            "ttl": {
                "type": "number"
            },
            "hasExpired": {
                "type": "boolean"
            }
        }
    }
}