{
     "name": "draw.io",
     "description": "draw.io add-on for Jira",
     "key": "com.mxgraph.jira.plugins.drawio",
     "baseUrl": "https://jira.draw.io",
     "enableLicensing": true,
     "apiMigrations": {
         "gdpr": true
     },
     "vendor": {
         "name": "JGraph Ltd.",
         "url": "https://www.jgraph.com"
     },
     "authentication": 
     {
         "type": "none"
     },
     "version": "1.3.12",
     "scopes": 
     [
     	"READ",
     	"WRITE",
     	"DELETE"
	 ],
     "modules": 
     {
      "generalPages": 
      [
      	{
			"url":"/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
			"key":"drawioEditor",
			"name":
			{
				"value":"draw.io Editor"
			},
			"location":"hidden"
		},
		{
			"url":"/connect/jira/fullScreenViewer-1-3-3.html?issueId=${issue.id}",
			"key":"drawioFullScreenViewer",
			"name":
			{
				"value":"draw.io Full Screen Viewer"
			},
			"location":"hidden"
		},
		{
			"url": "/connect/jira/embed.html?issueId=${issue.id}",
			"key": "embedDiagram",
			"name": {
			    "value": "Embed draw.io diagram"
			},
			"location":"hidden"
	    }
      ],
	  "webItems": [
	    {
	      "location": "operations-attachments",
	      "weight": 50,
	      "key": "drawioEditorBlank",
	      "url": "/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
	      "name": {
	        "value": "Add draw.io diagram"
	      },
	      "target": 
	      {
			"type":"dialog",
			"options": 
			{
				"width":"100%",
				"height":"100%",
				"chrome":false
			}
		  }
	    },
	    {
	      "location": "operations-attachments",
	      "weight": 50,
	      "key": "linkDiagram",
	      "url": "/connect/jira/embed.html?issueId=${issue.id}",
	      "name": {
	        "value": "Embed draw.io diagram"
	      },
	      "target": 
	      {
			"type":"dialog",
			"options": 
			{
				"width":"70%",
				"height":"70%",
				"chrome":true
			}
		  }
	    }, 
	    {
       	   "key": "drawioEditorDialog",
	        "name": 
	        {
	            "value": "draw.io Editor"
	        },
	        "url": "/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
	        "location": "none",
	        "context": "addon"
	    },
	    {
			"key": "drawioSearch",
			"location": "system.top.navigation.bar",
			"name": {
				"value": "draw.io Diagrams"
			},
			"url": "/connect/jira/search.html",
	      	"target": 
		    {
				"type":"dialog",
				"options": 
				{
					"width":"100%",
					"height":"100%",
					"chrome":true
				}
			},
			"icon": 
			{
				"width": 16,
				"height": 16,
				"url": "/images/drawlogo48.png"
			}
		}
	  ],
	  "webPanels": 
	  [
      {
        "url": "/connect/jira/viewerPanel-1-3-12.html?issueId=${issue.id}",
        "location": "atl.jira.view.issue.left.context",
        "layout": 
        {
          "width": "300px"
        },
        "weight": 200,
        "key": "drawioViewerPanel",
        "name": 
        {
          "value": "draw.io Diagrams"
        }
      }
    ],
    "jiraEntityProperties": [
      {
        "keyConfigurations": [
          {
            "extractions": [
              {
                "objectName": "name",
                "type": "text",
                "alias": "diagramName"
              },
              {
                "objectName": "txtContent",
                "type": "text",
                "alias": "diagramTextContent"
              },
              {
                "objectName": "updated",
                "type": "date",
                "alias": "diagramUpdatedDate"
              },
              {
                "objectName": "hasDiagram",
                "type": "number",
                "alias": "hasDiagram"
              }
            ],
            "propertyKey": "drawio-metadata"
          }
        ],
        "entityType": "issue",
        "name": {
          "value": "draw.io Diagrams Index"
        },
        "key": "drawio-entity-property"
      }
    ],
    "jiraIssueContents": [
      {
        "icon": {
          "width": 24,
          "height": 24,
          "url": "/images/drawlogo48.png"
        },
        "target": {
          "type": "web_panel",
          "url": "/connect/jira/viewerPanel-1-3-12.html?issueId=${issue.id}"
        },
        "tooltip": {
          "value": "Show draw.io Diagrams Panel"
        },
        "name": {
          "value": "draw.io Diagrams"
        },
        "key": "drawioViewerPanelNew"
      }
    ],
    "jiraIssueGlances": [
      {
        "icon": {
          "width": 24,
          "height": 24,
          "url": "/images/drawlogo48.png"
        },
        "content": {
          "type": "label",
          "label": {
            "value": "draw.io Diagrams"
          }
        },
        "target": {
          "type": "web_panel",
          "url": "/connect/jira/viewerPanel-1-3-12.html?issueId=${issue.id}&glance=1"
        },
        "name": {
          "value": "draw.io Diagrams"
        },
        "key": "drawioViewerGlance",
        "conditions": [
            {
                "condition": "entity_property_exists",
                "params": {
                    "entity": "issue",
                    "propertyKey": "drawio-metadata"
                }
            }
        ]
      }
    ]
	}
 }