{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/elgato-stream-deck-plugin.json",
  "$comment": "Used as reference: https://docs.elgato.com/sdk/plugins/manifest",
  "additionalProperties": true,
  "title": "Elgato Stream Deck Manifest",
  "description": "Manifest files for plugins built for the Elgato Stream Deck SDK",
  "type": "object",
  "properties": {
    "Author": {
      "description": "The author of the plugin. This string is displayed to the user in the Stream Deck store.",
      "type": "string"
    },
    "CodePath": {
      "type": "string",
      "description": "The relative path to the HTML/binary file containing the plugin code."
    },
    "Description": {
      "type": "string",
      "description": "Provides a general description of what the plugin does. This string is displayed to the user in the Stream Deck store."
    },
    "Icon": {
      "type": "string",
      "description": "The relative path to an image without the extension. This image is displayed in the Stream Deck marketplace. SVGs are preferred. If not, the PNG image should be 288 x 288 px, and you should provide @1x and @2x (288 x 288 px & 576 x 576 px respectively). The Stream Deck application takes care of loading the appropriate version of the image."
    },
    "Name": {
      "type": "string",
      "description": "The name of the plugin. This string is displayed to the user in the Stream Deck store."
    },
    "Version": {
      "type": "string",
      "description": "Plugin's semantic version (1.0.0)."
    },
    "SDKVersion": {
      "type": "number",
      "minimum": 1,
      "description": "The current SDK version is 2."
    },
    "OS": {
      "type": "array",
      "description": "The list of operating systems & versions supported by the plugin.",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "Platform": {
            "enum": ["mac", "windows"]
          },
          "MinimumVersion": {
            "type": "string",
            "description": "The minimum version of the operating system that the plugin requires. Example: For Windows 10, you can use `10`. For macOS 10.11, you can use `10.11`.",
            "examples": ["10", "10.11"],
            "pattern": "^\\d+(\\.\\d+)*$"
          }
        },
        "required": ["Platform", "MinimumVersion"]
      }
    },
    "Software": {
      "type": "object",
      "description": "Indicates which version of the Stream Deck application is required to install the plugin.",
      "properties": {
        "MinimumVersion": {
          "type": "string",
          "description": "The minimum version of the operating system that the plugin requires. For Windows 10, you can use “10”. For macOS 10.11, you can use “10.11”.",
          "pattern": "^\\d+(\\.\\d+)*$"
        }
      }
    },
    "Category": {
      "type": "string",
      "description": "The name of the custom category in which the actions should be listed. This string is visible to the user in the actions list. If you don't provide a category, the actions will appear inside a \"Custom\" category."
    },
    "CategoryIcon": {
      "type": "string",
      "description": "The relative path to a PNG image without the .png extension. This image is used in the actions list. The PNG image should be a 28pt x 28pt image. You should provide @1x and @2x versions of the image. The Stream Deck application takes care of loading the appropriate version of the image."
    },
    "CodePathMac": {
      "type": "string",
      "description": "Override CodePath for macOS."
    },
    "CodePathWin": {
      "type": "string",
      "description": "Override CodePath for Windows."
    },
    "Profiles": {
      "type": "array",
      "description": "Specifies an array of profiles. A plugin can have one or more profiles proposed to the user on installation. This lets you create full screen plugins.",
      "items": {
        "type": "object",
        "required": ["Name", "DeviceType"],
        "properties": {
          "Name": {
            "type": "string",
            "description": "The filename of the profile."
          },
          "DeviceType": {
            "description": "Type of device.",
            "type": "integer",
            "minimum": 0,
            "maximum": 7
          },
          "Readonly": {
            "type": "boolean",
            "default": false,
            "description": "Boolean to mark the profile as read-only."
          },
          "DontAutoSwitchWhenInstalled": {
            "type": "boolean",
            "default": false,
            "description": "Boolean to prevent Stream Deck from automatically switching to this profile when installed."
          }
        }
      }
    },
    "PropertyInspectorPath": {
      "type": "string",
      "description": "The relative path to the Property Inspector HTML file if your plugin wants to display some custom settings in the Property Inspector. If missing, the plugin will have an empty Property Inspector."
    },
    "DefaultWindowSize": {
      "type": "array",
      "description": "Specify the default window size when a Javascript plugin or Property Inspector opens a window using window.open(). The default value is [500, 650].",
      "items": {
        "type": "number"
      },
      "minItems": 2,
      "maxItems": 2
    },
    "URL": {
      "type": "string",
      "description": "A site to provide more information about the plugin."
    },
    "ApplicationsToMonitor": {
      "type": "object",
      "description": "List of application identifiers to monitor (applications launched or terminated). See the `applicationDidLaunch` and `applicationDidTerminate` events.",
      "properties": {
        "mac": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "windows": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Actions": {
      "description": "Specifies an array of actions. A plugin can indeed have one or multiple actions. For example, the “Game Capture” plugin has six actions: Scene, Record, Screenshot, Flashback Recording, Stream, Live Commentary.",
      "type": "array",
      "items": {
        "type": "object",
        "required": ["UUID", "Name", "States"],
        "oneOf": [
          {
            "required": ["Icon"],
            "properties": {
              "Icon": {
                "type": "string",
                "description": "The relative path to a PNG image without the .png extension. This image is displayed in the actions list. The PNG image should be a 20pt x 20pt image. You should provide @1x and @2x versions of the image. The Stream Deck application takes care of loading the appropriate version of the image. This icon is not required for actions not visible in the actions list (`VisibleInActionsList` set to false)."
              }
            }
          },
          {
            "required": ["VisibleInActionsList"],
            "properties": {
              "VisibleInActionsList": {
                "const": false,
                "description": "Boolean to hide the action in the actions list. This can be used for a plugin that only works with a specific profile."
              }
            }
          }
        ],
        "properties": {
          "UUID": {
            "type": "string",
            "pattern": "^[a-z0-9\\-.]",
            "description": "The unique identifier of the action. It must be a uniform type identifier (UTI) that contains only lowercase alphanumeric characters (a-z, 0-9), hyphen (-), and period (.). The string must be in reverse-DNS format. For example, if your domain is `elgato.com` and you create a plugin named `Hello` with the action `My Action`, you could assign the string `com.elgato.hello.myaction` as your action's Unique Identifier."
          },
          "Name": {
            "type": "string",
            "description": "The name of the action. This string is visible to the user in the actions list."
          },
          "Icon": {
            "type": "string",
            "description": "The relative path to a PNG image without the .png extension. This image is displayed in the actions list. The PNG image should be a 20pt x 20pt image. You should provide @1x and @2x versions of the image. The Stream Deck application takes care of loading the appropriate version of the image. This icon is not required for actions not visible in the actions list (`VisibleInActionsList` set to false)."
          },
          "States": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["Image"],
              "properties": {
                "Image": {
                  "type": "string",
                  "description": "The default image for the state. When a user sets a custom image on the primary state, Stream Deck will automatically set the secondary state to a darker version of the same icon."
                },
                "MultiActionImage": {
                  "type": "string",
                  "description": "This can be used if you want to provide a different image for the state when the action is displayed in a Multi-Action."
                },
                "Name": {
                  "type": "string",
                  "description": "Displayed in the dropdown menu in the Multi-action. For example, the Game Capture Record action has Start and Stop. If the name is not provided, the state will not appear in the Multi-Action."
                },
                "Title": {
                  "type": "string",
                  "description": "Default title."
                },
                "ShowTitle": {
                  "type": "string",
                  "description": "Boolean to show or hide the title"
                },
                "TitleColor": {
                  "type": "string",
                  "description": "Default title color."
                },
                "FontFamily": {
                  "type": "string",
                  "enum": [
                    "Arial",
                    "Arial Black",
                    "Comic Sans MS",
                    "Courier",
                    "Courier New",
                    "Georgia",
                    "Impact",
                    "Microsoft Sans Serif",
                    "Symbol",
                    "Tahoma",
                    "Times New Roman",
                    "Trebuchet MS",
                    "Verdana",
                    "Webdings",
                    "Wingdings"
                  ],
                  "description": "Default font family for the title."
                },
                "TitleAlignment": {
                  "type": "string",
                  "enum": ["top", "bottom", "middle"],
                  "description": "Default title vertical alignment."
                },
                "FontStyle": {
                  "type": "string",
                  "enum": ["Regular", "Bold", "Italic", "Bold Italic"],
                  "description": "Default font style for the title. Note that some fonts might not support all values."
                },
                "FontSize": {
                  "type": "string",
                  "description": "Default font size for the title."
                },
                "FontUnderline": {
                  "type": "boolean",
                  "default": false,
                  "description": "Boolean to have an underline under the title."
                }
              }
            }
          },
          "PropertyInspectorPath": {
            "type": "string",
            "description": "This can override PropertyInspectorPath member from the plugin if you wish to have a different PropertyInspectorPath based on the action. The relative path to the Property Inspector HTML file if your plugin wants to display some custom settings in the Property Inspector."
          },
          "SupportedInMultiActions": {
            "type": "boolean",
            "default": true,
            "description": "Boolean to prevent the action from being used in a Multi Action."
          },
          "Tooltip": {
            "type": "string",
            "description": "The string is displayed as a tooltip when the user leaves the mouse over your action in the actions list."
          },
          "DisableCaching": {
            "type": "boolean",
            "default": false,
            "description": "Boolean to disable image caching."
          },
          "DisableAutomaticStates": {
            "type": "boolean",
            "default": false,
            "description": "Determines whether the state of the action should automatically toggle when the user presses the action; only applies to actions that have two states defined."
          },
          "VisibleInActionsList": {
            "type": "boolean",
            "default": true,
            "description": "Boolean to hide the action in the actions list. This can be used for a plugin that only works with a specific profile."
          },
          "UserTitleEnabled": {
            "type": "boolean",
            "default": true,
            "description": "Boolean to disable the title field for users in the property inspector."
          },
          "Controllers": {
            "type": "array",
            "description": "Specifies an array of controllers.",
            "items": {
              "type": "string",
              "enum": ["Keypad", "Encoder"]
            },
            "default": ["Keypad"]
          },
          "Encoder": {
            "type": "object",
            "description": "Used to describe and configure the dial and display segment on Stream Deck +.",
            "properties": {
              "background": {
                "type": "string",
                "description": "The default background image for the encoders touch display slot."
              },
              "Icon": {
                "type": "string",
                "description": "The default icon found in the property inspector, dial stack image, and the layout. If no icon is set Stream Deck will use the action list icon."
              },
              "layout": {
                "type": "string",
                "description": "A string containing the name of a built-in layout or the partial path to a JSON file with a custom layout definition. You can dynamically change the layout with with setFeedbackLayout event. The default layout is the Icon Layout ($X1)."
              },
              "StackColor": {
                "type": "string",
                "description": "The color that will be used in the dial stack as background color."
              },
              "TriggerDescription": {
                "type": "object",
                "description": "Used to describe encoder actions in the property inspector.",
                "properties": {
                  "Rotate": {
                    "description": "Describe the rotation.",
                    "type": "string"
                  },
                  "Push": {
                    "description": "Describe the encoder push.",
                    "type": "string"
                  },
                  "Touch": {
                    "description": "Describe the touch.",
                    "type": "string"
                  },
                  "LongTouch": {
                    "description": "Describe the long touch.",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "required": [
    "Actions",
    "CodePath",
    "Description",
    "Icon",
    "Name",
    "Version",
    "SDKVersion",
    "OS",
    "Software"
  ]
}
