summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/dns.json
blob: 415849c6de2fbbed2695afc08ca6459833a3aaff (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
[
  {
    "namespace": "manifest",
    "types": [
      {
        "$extend": "PermissionNoPrompt",
        "choices": [
          {
            "type": "string",
            "enum": ["dns"]
          }
        ]
      }
    ]
  },
  {
    "namespace": "dns",
    "description": "Asynchronous DNS API",
    "permissions": ["dns"],
    "types": [
      {
        "id": "DNSRecord",
        "type": "object",
        "description": "An object encapsulating a DNS Record.",
        "properties": {
          "canonicalName": {
            "type": "string",
            "optional": true,
            "description": "The canonical hostname for this record.  this value is empty if the record was not fetched with the 'canonical_name' flag."
          },
          "isTRR": {
            "type": "string",
            "description": "Record retreived with TRR."
          },
          "addresses": {
            "type": "array",
            "items": { "type": "string" }
          }
        }
      },
      {
        "id": "ResolveFlags",
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "allow_name_collisions",
            "bypass_cache",
            "canonical_name",
            "disable_ipv4",
            "disable_ipv6",
            "disable_trr",
            "offline",
            "priority_low",
            "priority_medium",
            "speculate"
          ]
        }
      }
    ],
    "functions": [
      {
        "name": "resolve",
        "type": "function",
        "description": "Resolves a hostname to a DNS record.",
        "async": true,
        "parameters": [
          {
            "name": "hostname",
            "type": "string"
          },
          {
            "name": "flags",
            "optional": true,
            "default": [],
            "$ref": "ResolveFlags"
          }
        ]
      }
    ]
  }
]