{
  "namespace": "tabOrganize",
  "events": [
    {
      "name": "onOrganizeRequest",
      "type": "function",
      "parameters": [
        {
          "name": "request",
          "type": "object",
          "properties": {
            "action": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "tabs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "title": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "originalIndex": {
                    "type": "integer"
                  }
                }
              }
            },
            "is_reorganize": {
              "type": "boolean"
            },
            "previous_groups": {
              "type": "array",
              "optional": true,
              "items": {
                "type": "object",
                "properties": {
                  "group_name": {
                    "type": "string"
                  },
                  "tabs": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "types": [
    {
      "id": "tabOrganize.OrganizeResult",
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "tabs": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "error": {
          "type": "string",
          "optional": true
        }
      }
    }
  ],
  "functions": [
    {
      "name": "handleExtensionOrganizeResult",
      "type": "function",
      "parameters": [
        {
          "name": "result",
          "$ref": "tabOrganize.OrganizeResult"
        }
      ],
      "returns_async": {
        "name": "callback",
        "optional": true,
        "parameters": [
          {
            "name": "success",
            "type": "boolean"
          }
        ]
      }
    }
  ]
}