{
  "namespace": "tabOmnibox",
  "types": [
    {
      "id": "tabOmnibox.SuggestionType",
      "type": "string",
      "enum": [
        "url",
        "search",
        "bookmark",
        "history",
        "calculator",
        "open_tab",
        "custom"
      ]
    },
    {
      "id": "tabOmnibox.SuggestionPhase",
      "type": "string",
      "enum": [
        "sync",
        "async",
        "final"
      ]
    },
    {
      "id": "tabOmnibox.OmniboxSuggestion",
      "type": "object",
      "properties": {
        "content": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "tabOmnibox.SuggestionType"
        },
        "url": {
          "type": "string",
          "optional": true
        },
        "relevanceScore": {
          "type": "number",
          "optional": true
        },
        "iconUrl": {
          "type": "string",
          "optional": true
        },
        "deletable": {
          "type": "boolean",
          "optional": true
        },
        "tabId": {
          "type": "integer",
          "optional": true
        },
        "isOpenTab": {
          "type": "boolean",
          "optional": true
        },
        "shouldSwapContentAndDesc": {
          "type": "boolean",
          "optional": true
        }
      },
      "ignoreAdditionalProperties": true
    },
    {
      "id": "tabOmnibox.PerformanceConfig",
      "type": "object",
      "properties": {
        "debounceMs": {
          "type": "integer",
          "optional": true,
          "minimum": 0,
          "maximum": 1000
        },
        "syncTimeoutMs": {
          "type": "integer",
          "optional": true,
          "minimum": 10,
          "maximum": 500
        },
        "asyncTimeoutMs": {
          "type": "integer",
          "optional": true,
          "minimum": 100,
          "maximum": 5000
        }
      },
      "ignoreAdditionalProperties": true
    },
    {
      "id": "tabOmnibox.SuggestionRequest",
      "type": "object",
      "properties": {
        "input": {
          "type": "string"
        },
        "maxResults": {
          "type": "integer",
          "optional": true,
          "minimum": 1,
          "maximum": 20
        },
        "includeHistory": {
          "type": "boolean",
          "optional": true
        },
        "includeBookmarks": {
          "type": "boolean",
          "optional": true
        },
        "includeSearchSuggestions": {
          "type": "boolean",
          "optional": true
        },
        "preventInlineAutocomplete": {
          "type": "boolean",
          "optional": true
        },
        "performanceConfig": {
          "$ref": "tabOmnibox.PerformanceConfig",
          "optional": true
        },
        "requestId": {
          "type": "string",
          "optional": true
        }
      },
      "ignoreAdditionalProperties": true
    },
    {
      "id": "tabOmnibox.SuggestionResponse",
      "type": "object",
      "properties": {
        "suggestions": {
          "type": "array",
          "items": {
            "$ref": "tabOmnibox.OmniboxSuggestion"
          }
        },
        "phase": {
          "$ref": "tabOmnibox.SuggestionPhase"
        },
        "hasMore": {
          "type": "boolean"
        },
        "requestId": {
          "type": "string"
        }
      },
      "ignoreAdditionalProperties": true
    },
    {
      "id": "tabOmnibox.SearchEngineInfo",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "keyword": {
          "type": "string"
        },
        "faviconUrl": {
          "type": "string"
        },
        "searchUrl": {
          "type": "string",
          "optional": true
        },
        "isPrepopulated": {
          "type": "boolean"
        }
      },
      "ignoreAdditionalProperties": true
    }
  ],
  "functions": [
    {
      "name": "getSuggestions",
      "type": "function",
      "parameters": [
        {
          "name": "request",
          "$ref": "tabOmnibox.SuggestionRequest"
        }
      ],
      "returns_async": {
        "name": "callback",
        "parameters": [
          {
            "name": "response",
            "$ref": "tabOmnibox.SuggestionResponse"
          }
        ]
      }
    },
    {
      "name": "cancelSuggestions",
      "type": "function",
      "parameters": [
        {
          "name": "requestId",
          "type": "string"
        }
      ],
      "returns_async": {
        "name": "callback",
        "optional": true,
        "parameters": [
          {
            "name": "success",
            "type": "boolean"
          }
        ]
      }
    },
    {
      "name": "deleteSuggestion",
      "type": "function",
      "parameters": [
        {
          "name": "content",
          "type": "string"
        }
      ],
      "returns_async": {
        "name": "callback",
        "optional": true,
        "parameters": [
          {
            "name": "success",
            "type": "boolean"
          }
        ]
      }
    },
    {
      "name": "getDefaultSearchEngine",
      "type": "function",
      "parameters": [],
      "returns_async": {
        "name": "callback",
        "parameters": [
          {
            "name": "searchEngineInfo",
            "$ref": "tabOmnibox.SearchEngineInfo"
          }
        ]
      }
    },
    {
      "name": "getVersion",
      "type": "function",
      "parameters": [],
      "returns_async": {
        "name": "callback",
        "parameters": [
          {
            "name": "version",
            "type": "integer"
          }
        ]
      }
    }
  ],
  "events": [
    {
      "name": "onSuggestionSelected",
      "type": "function",
      "parameters": [
        {
          "name": "suggestion",
          "$ref": "tabOmnibox.OmniboxSuggestion"
        },
        {
          "name": "inputId",
          "type": "string"
        }
      ]
    },
    {
      "name": "onSuggestionUpdate",
      "type": "function",
      "parameters": [
        {
          "name": "response",
          "$ref": "tabOmnibox.SuggestionResponse"
        }
      ]
    },
    {
      "name": "onSuggestionCancelled",
      "type": "function",
      "parameters": [
        {
          "name": "requestId",
          "type": "string"
        }
      ]
    }
  ]
}