summaryrefslogtreecommitdiff
path: root/lib/JWebmail/Model/Driver/QMailAuthuser/schema.json
blob: 5d5247ab29f579e73fecd49c7b3dfac210dfc48b (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
{
  "$schema": "http://json-schema.org/schema#",
  "definitions": {
    "count": {
      "type": "object",
      "properties": {
        "new": {"type": "integer", "minimum": 0},
        "size": {"type": "integer", "minimum": 0},
        "count": {"type": "integer", "minimum": 0},
        "unread": {"type": "integer", "minimum": 0}
      },
      "required": ["count"],
      "additionalProperties": false
    },
    "folders": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mail_addrs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "address": {"type": "string"}
        },
        "required": ["address"]
      },
      "minItems": 1
    },
    "mail_head": {
      "type": "object",
      "properties": {
        "new": {"type": "boolean"},
        "mid": {"type": "string"},
        "content_type": {"type": "string"},
        "size": {"type": "integer", "minimum": 0},
        "date_send": {"type": "string"},
        "date_received": {"type": "string"},
        "cc": {"$ref": "#/definitions/mail_addrs"},
        "bcc": {"$ref": "#/definitions/mail_addrs"},
        "to": {"$ref": "#/definitions/mail_addrs"},
        "from": {"$ref": "#/definitions/mail_addrs"},
        "subject": {"type": "string"}
      },
      "required": ["mid"]
    },
    "list": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/mail_head"
      }
    },
    "mail": {
      "$ref": "#/definitions/mail_head",
      "properties": {
        "body": {
          "anyOf": [
            {"type": "string"},
            {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "val": {"type": "string"},
                  "type": {"type": "string"}
                }
              }
            }
          ]
        }
      },
      "required": ["body"]
    }
  }
}