[
  {
    "namespace": "ippActivator",
    "description": "IPP Activator API",
    "functions": [
      {
        "name": "showMessage",
        "type": "function",
        "description": "Show a localized message using the browser notification box. Optionally target a specific tab by id.",
        "async": true,
        "parameters": [
          {
            "name": "message",
            "description": "Object with a Fluent l10n ID.",
            "type": "object",
            "properties": {
              "l10nId": { "type": "string" }
            }
          },
          {
            "name": "tabId",
            "type": "integer",
            "optional": true,
            "description": "Target tab id. Defaults to active tab."
          }
        ]
      },
      {
        "name": "hideMessage",
        "type": "function",
        "description": "Hide the IPP notification for the given tab (or active tab by default). No-op if not present.",
        "async": true,
        "parameters": [
          {
            "name": "tabId",
            "type": "integer",
            "optional": true,
            "description": "Target tab id. Defaults to active tab."
          }
        ]
      },
      {
        "name": "getNotifiedDomains",
        "type": "function",
        "description": "Return the list of base domains for which a notification was already shown.",
        "async": true,
        "parameters": []
      },
      {
        "name": "addNotifiedDomain",
        "type": "function",
        "description": "Add a base domain to the suppression list (no-op if present).",
        "async": true,
        "parameters": [{ "name": "domain", "type": "string" }]
      },
      {
        "name": "isIPPActive",
        "type": "function",
        "description": "Return whether IPP connection is active.",
        "async": true,
        "parameters": []
      },
      {
        "name": "getRegion",
        "type": "function",
        "description": "Return the user's home region as an ISO 3166-1 alpha-2 code (uppercase), or null if unknown.",
        "async": true,
        "parameters": []
      },
      {
        "name": "getDynamicTabBreakages",
        "type": "function",
        "description": "Return dynamic tab breakages (pref: extensions.ippactivator.dynamicTabBreakages).",
        "async": true,
        "parameters": []
      },
      {
        "name": "getDynamicWebRequestBreakages",
        "type": "function",
        "description": "Return dynamic webRequest breakages (pref: extensions.ippactivator.dynamicWebRequestBreakages).",
        "async": true,
        "parameters": []
      },
      {
        "name": "getTabBreakagesUrl",
        "type": "function",
        "description": "Return the URL to fetch the base tab breakages from (pref: extensions.ippactivator.tabBreakagesUrl). Empty string means use the built-in file.",
        "async": true,
        "parameters": []
      },
      {
        "name": "getWebRequestBreakagesUrl",
        "type": "function",
        "description": "Return the URL to fetch the base webRequest breakages from (pref: extensions.ippactivator.webrequestBreakagesUrl). Empty string means use the built-in file.",
        "async": true,
        "parameters": []
      },
      {
        "name": "getBaseDomainFromURL",
        "type": "function",
        "description": "Return both the eTLD+1 (baseDomain) and full host for the given URL.",
        "async": true,
        "parameters": [
          {
            "name": "url",
            "type": "string",
            "description": "The URL to analyze."
          }
        ]
      },
      {
        "name": "hasExclusion",
        "type": "function",
        "description": "Return true if this URL has ipp-vpn permission set to DENY.",
        "async": true,
        "parameters": [
          {
            "name": "url",
            "type": "string",
            "description": "The URL to analyze."
          }
        ]
      }
    ],
    "events": [
      {
        "name": "onIPPActivated",
        "type": "function",
        "description": "Fired when IPProtectionService dispatches 'IPProtectionService:Started'. The listener receives the current active state.",
        "parameters": [
          {
            "name": "listener",
            "type": "function",
            "parameters": [
              {
                "name": "active",
                "type": "boolean",
                "description": "Whether the IPP connection is currently active."
              }
            ]
          }
        ]
      },
      {
        "name": "onDynamicTabBreakagesUpdated",
        "type": "function",
        "description": "Fired when dynamicTabBreakages preference changes.",
        "parameters": [
          {
            "name": "listener",
            "type": "function"
          }
        ]
      },
      {
        "name": "onDynamicWebRequestBreakagesUpdated",
        "type": "function",
        "description": "Fired when dynamicWebRequestBreakages preference changes.",
        "parameters": [
          {
            "name": "listener",
            "type": "function"
          }
        ]
      },
      {
        "name": "onIPPExceptionsChanged",
        "type": "function",
        "description": "Fired when the ipp-vpn permission changes.",
        "parameters": [
          {
            "name": "listener",
            "type": "function"
          }
        ]
      },
      {
        "name": "onRegionChanged",
        "type": "function",
        "description": "Fired when the user's home region changes (observer on 'browser-region-updated'). The listener receives the new region.",
        "parameters": [
          {
            "name": "listener",
            "type": "function",
            "parameters": [
              {
                "name": "region",
                "type": "string",
                "optional": true,
                "description": "The new home region as an ISO 3166-1 alpha-2 code (uppercase), or null if unknown."
              }
            ]
          }
        ]
      }
    ]
  }
]
