SHARE
TWEET

overwolf-manifest-schema

itayg Jan 5th, 2017 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.   "title": "my first schema test for overwolf apps manifest",
  3.   "$schema": "http://json-schema.org/draft-04/schema#",
  4.   "type": "object",
  5.  
  6.   /*
  7.     This is a temporary unique identifier for the schema
  8.   */
  9.   "id": "http://overwolf.com/schemas/myschema.json",
  10.   "required": [
  11.     "manifest_version",
  12.     "type",
  13.     "meta",
  14.     "data"
  15.   ],
  16.   "properties": {
  17.     "manifest_version": {
  18.       "type": "integer",
  19.       "description": "Targets the manifest version you are working on. Currently there is only one version, therefore this value is always 1",
  20.       "enum": [
  21.         1
  22.       ]
  23.     },
  24.     "type": {
  25.       "type": "string",
  26.       "description": "Declares the type of application. Can only be 'WebApp'",
  27.       "enum": [
  28.         "WebApp", "Skin", "GameEventProvider"
  29.       ]
  30.     },
  31.     "meta": {
  32.       "description": "The extension metadata",
  33.       "type": "object",
  34.       "required": [
  35.         "name",
  36.         "author",
  37.         "version",
  38.         "minimum-overwolf-version",
  39.         "description",
  40.         "icon"
  41.       ],
  42.       "properties": {
  43.           "name": {
  44.             "description": "Name of your app",
  45.             "type": "string"
  46.           },
  47.           "author": {
  48.             "description": "Who developed the app",
  49.             "type": "string"
  50.           },
  51.           "version": {
  52.             "description": "Version of your app",
  53.             "$ref": "#/definitions/version_string"
  54.           },
  55.           "minimum-overwolf-version": {
  56.             "description": "Minimum version of the Overwolf Client with which the app is compatible.",
  57.             "$ref": "#/definitions/version_string"
  58.           },
  59.           "access-name": {
  60.             "description": "A name in a Java-namespace-like format",
  61.             "type": "string"
  62.           },
  63.           "description": {
  64.             "description": "The description of your app on the Appstore tile",
  65.             "type": "string",
  66.             "maxLength": 180
  67.           },
  68.           "dock_button_title": {
  69.             "description": "Short name of your app. Provide a short title that will fit in the dock button area",
  70.             "type": "string",
  71.             "maxLength": 18
  72.           },
  73.           "icon": {
  74.             "description": "A relative path from the app folder to the icon’s png file.This is the mouse-over (multi-colored) version of the icon that will be displayed on the Overwolf dock. The icon dimensions should be 256×256 pixels.",
  75.             "type": "string"
  76.           },
  77.           "icon_gray": {
  78.             "description": "A relative path from the app folder to the icon’s png file. This is the grayscale version of the icon that will be displayed on the Overwolf dock. The icon dimensions should be 256×256 pixels.",
  79.             "type": "string"
  80.           },
  81.           "store_icon": {
  82.             "description": "A relative path from the app folder to a png file. This is the icon that will appear in the store library. The icon dimensions should be 200×200 pixels.",
  83.             "type": "string"
  84.           }
  85.       }
  86.        
  87.     },
  88.     "permissions": {
  89.       "description": "An array of permissions that the app requires.",
  90.       "type": "array",
  91.       "uniqueItems": true,
  92.       "items": {
  93.         "type": "string",
  94.         /*
  95.         use case case-insensitive pattern
  96.         */
  97.         "pattern": "(?i)(Camera|Microphone|Logging|Extensions|Streaming|DesktopStreaming|Profile|Clipboard|Hotkeys|Media|GameInfo|GameControl|FileSystem|LogitechLed|LogitechArx|OwWebview)"
  98.       }
  99.     },
  100.     "dependencies": {
  101.       "description": "An array of unique IDs of other extensions and services that this extension depends on.",
  102.       "type": "array",
  103.       "uniqueItems": true,
  104.       "items": {
  105.         "type": "string"
  106.       }
  107.     },
  108.     "data": {
  109.       "description": "Extension data",
  110.       "type": "object",
  111.       "properties": {
  112.         "windows": {
  113.           "description": "A map from window names to window settings.",
  114.           "type": "object",
  115.           "patternProperties": {
  116.             ".*": {
  117.               "$ref": "#/definitions/extension_window_data"
  118.             }
  119.           }
  120.         },
  121.         "start_window": {
  122.           "description": "The name of the window (from the “windows” list) initially loaded when the app starts.",
  123.           "type": "string"
  124.         },
  125.         "externally_connectable": {
  126.           "description": "A definition of external URLs the web app should be able to access",
  127.           "$ref": "#/definitions/extension_externally_connectable"
  128.         },
  129.         "protocol_override_domains": {
  130.           "description": "Overwolf apps run under a custom url protocol and domain (overwolf-extension://[extension-id]). This means that protocol-relative urls will try to load from a the overwolf-extension protocol. Unless you want this to happen, you can use protocol_override_domains to override the relative protocol with a preferred one",
  131.           "type": "object"
  132.         },
  133.         "force_browser": {
  134.           "description": "Causes links in the app to be opened using the user’s default browser or Overwolf’s browser. Takes ‘user’ and ‘overwolf’ (case insensitive).",
  135.           "type": "string",
  136.            /*
  137.             use case case-insensitive pattern
  138.           */
  139.           "pattern": "(?i)(user|overwold)"
  140.         },
  141.         "plugins": {
  142.           "description": "A list of file references to plugins that are provided with the web app. The references should be relative paths from the app folder.",
  143.           "type": "array",
  144.           "items": {
  145.             "type": "string"
  146.           }
  147.         },
  148.         "channel-id": {
  149.           "description": "A unique identifier (you will probably need to make sure the id is unique with Overwolf) that is used to communicate with your in-game plugin that is injected into the game",
  150.           "type": "string"
  151.         },
  152.         "game_events": {
  153.           "description": "A list of game ids for which game events are required.",
  154.           "type": "array",
  155.           "uniqueItems": true,
  156.           "items": {
  157.             "type": "integer"
  158.           }
  159.         },
  160.         "extra-objects": {
  161.           "description": "Allows the access of custom plugin dlls",
  162.           "type": "object",
  163.           "patternProperties": {
  164.             ".*": {
  165.               "$ref": "#/definitions/extra_object"
  166.             }
  167.           }
  168.         },
  169.         "hotkeys": {
  170.           "description": "The map between the hotkey feature name and it’s settings.",
  171.           "type": "object",
  172.           "patternProperties": {
  173.             ".*": {
  174.               "$ref": "#/definitions/hotkey"
  175.             }
  176.           }
  177.         },
  178.         "content_scripts": {
  179.           "description": "A list of content scripts to be loaded for specific windows. For instance, for this json, when loading the index window, myscript.js will be loaded and when encountring https://google.com, mystyles.css and myscript2.js will be loaded",
  180.           "type": "array",
  181.           "items": {
  182.             "$ref": "#/definitions/content_script"
  183.           }
  184.         },
  185.         "launch_events": {
  186.           "description": "A list of events causing the app to launch. It is enough that one of the events will occur to launch the app.",
  187.           "type": "array",
  188.           "items": {
  189.             "$ref": "#/definitions/launch_event_settings"
  190.           }
  191.         },
  192.         "user_agent": {
  193.           "description": "A custom user agent for the app to use when creating http requests. Note that using ‘navigator.userAgent’ will not return the custom user agent, but the default one.",
  194.           "type": "string"
  195.         }
  196.       }
  197.     }
  198.   },
  199.   "definitions": {
  200.     "glob_pattern": {
  201.       "type": "string",
  202.       "format": "glob-pattern"
  203.     },
  204.     "icon": {
  205.       "$ref": "#/definitions/uri"
  206.     },
  207.     "match_pattern": {
  208.       "type": "string",
  209.       "format": "match-pattern",
  210.       "pattern": "^((\\*|http|https|file|ftp|chrome-extension):\\/\\/(\\*|\\*\\.[^\\/\\*]+|[^\\/\\*]+)?(\\/.*))|<all_urls>$"
  211.     },
  212.     "mime_type": {
  213.       "type": "string",
  214.       "format": "mime-type",
  215.       "pattern": "^(?:application|audio|image|message|model|multipart|text|video)\\/[-+.\\w]+$"
  216.     },
  217.     "page": {
  218.       "$ref": "#/definitions/uri"
  219.     },
  220.     "permissions": {
  221.       "type": "array",
  222.       "uniqueItems": true,
  223.       "items": {
  224.         "type": "string",
  225.         "format": "permission"
  226.       }
  227.     },
  228.     "scripts": {
  229.       "type": "array",
  230.       "minItems": 1,
  231.       "uniqueItems": true,
  232.       "items": {
  233.         "$ref": "#/definitions/uri"
  234.       }
  235.     },
  236.     "uri": {
  237.       "type": "string",
  238.       "format": "uri"
  239.     },
  240.     "version_string": {
  241.       "type": "string",
  242.       "pattern": "^(?:\\d{1,5}\\.){0,3}\\d{1,5}$"
  243.     },
  244.     "size": {
  245.       "type": "object",
  246.       "properties": {
  247.         "width": {
  248.           "description": "Defines the width in pixels.",
  249.           "type": "integer"
  250.         },
  251.         "height": {
  252.           "description": "Defines the height in pixels.",
  253.           "type": "integer"
  254.         }
  255.       }
  256.     },
  257.     "point": {
  258.       "type": "object",
  259.       "properties": {
  260.         "top": {
  261.           "description": "Defines the position in the Y axis from the top in pixels.",
  262.           "type": "integer"
  263.         },
  264.         "left": {
  265.           "description": "Defines the position in the X axis from the left in pixels.",
  266.           "type": "integer"
  267.         }
  268.       }
  269.     },
  270.     "extension_window_data": {
  271.       "type": "object",
  272.       "required": [
  273.         "file"
  274.       ],
  275.       "properties": {
  276.         "file": {
  277.           "description": "Points to the file to be loaded inside the window.",
  278.           "type": "string"
  279.         },
  280.         "show_in_taskbar": {
  281.           "description": "Define if the window is displayed in the Windows taskbar and alt-tab window selection menu.",
  282.           "type": "boolean"
  283.         },
  284.         "transparent": {
  285.           "description": "Indicates whether the window will be transparent and borderless. If set to false a standard Overwolf window will be created",
  286.           "type": "boolean"
  287.         },
  288.         "resizable": {
  289.           "description": "Indicates whether the window can be resized.",
  290.           "type": "boolean"
  291.         },
  292.         "show_minimize": {
  293.           "description": "Indicates whether to show the window minimize button. Only relevant when not in transparent mode.",
  294.           "type": "boolean"
  295.         },
  296.         "clickthrough": {
  297.           "description": "Indicates whether the window will not receive clicks in-game, instead, the clicks will be passed on to the game.",
  298.           "type": "boolean"
  299.         },
  300.         "disable_rightclick": {
  301.           "description": "When set to true, disable right clicks entirely for this window.",
  302.           "type": "boolean"
  303.         },
  304.         "forcecapture": {
  305.           "description": "Indicates whether this window should always be included in recordings, overriding any other setting.",
  306.           "type": "boolean"
  307.         },
  308.         "show_only_on_stream": {
  309.           "description": "Indicates whether this window is visible only in streams (not visible to the streamer), overriding any other setting.",
  310.           "type": "boolean"
  311.         },
  312.         "ignore_keyboard_events": {
  313.           "description": "Indicates whether the window will not receive keyboard events. Instead, the keyboard events will be passed on to the game.",
  314.           "type": "boolean"
  315.         },
  316.         "in_game_only": {
  317.           "description": "Indicates whether the window will be visible only in game and not on the desktop.",
  318.           "type": "boolean"
  319.         },
  320.         "desktop_only": {
  321.           "description": "Indicates whether the window will be visible only on the desktop and not while in game.",
  322.           "type": "boolean"
  323.         },
  324.         "disable_restore_animation": {
  325.           "description": "Indicates whether the window will animate on minimize/restore while in game.",
  326.           "type": "boolean"
  327.         },
  328.         "grab_keyboard_focus": {
  329.           "description": "Indicates whether the window will grab the keyboard focus automatically when it opens, or leave the keyboard focus untouched.",
  330.           "type": "boolean"
  331.         },
  332.         "size": {
  333.           "description": "Defines the size of the window in pixels.",
  334.           "$ref": "#/definitions/size"
  335.         },
  336.         "min_size": {
  337.           "description": "Defines the minimum size of the window in pixels.",
  338.           "$ref": "#/definitions/size"
  339.         },
  340.         "max_size": {
  341.           "description": "Defines the maximum size of the window in pixels.",
  342.           "$ref": "#/definitions/size"
  343.         },
  344.         "start_position": {
  345.           "description": "The default start position of the window in pixels from the top left corner.",
  346.           "$ref": "#/definitions/point"
  347.         },
  348.         "topmost": {
  349.           "description": "Indicates whether the window will be on top of other Overwolf windows. Handle with care as topmost windows can negatively impact user experience.",
  350.           "type": "boolean"
  351.         },
  352.         "block_top_window_navigation": {
  353.           "description": "Refrain from page-take-over by links",
  354.           "type": "boolean"
  355.         }
  356.       }
  357.     },
  358.     "extension_externally_connectable": {
  359.       "type": "object",
  360.       "properties": {
  361.         "matches": {
  362.           "description": "Array of web page URL patterns to match with an external server URL. Use star (*) in place of subdomain to allow access to all subdomains.",
  363.           "type": "array"
  364.         }
  365.       }
  366.     },
  367.     "hotkey": {
  368.       "type": "object",
  369.       "required": [
  370.         "title"
  371.       ],
  372.       "properties": {
  373.         "title": {
  374.           "description": "Name of the hotkey as it will appear in the Hotkey tab in the settings.",
  375.           "type": "string"
  376.         },
  377.         "default": {
  378.           "description": "The default key combination.",
  379.           "type": "string"
  380.         },
  381.         "action-type": {
  382.           "description": "Defines the behavior of the hotkey.",
  383.           "type": "string",
  384.           "enum": [
  385.             "toggle",
  386.             "custom"
  387.           ]
  388.         },
  389.         "passthrough": {
  390.           "description": "Defines the behavior of the hotkey.",
  391.           "type": "boolean"
  392.         }
  393.       }
  394.     },
  395.     "content_script": {
  396.       "type": "object",
  397.       "properties": {
  398.         "windows": {
  399.           "description": "The list of windows for which to apply this content script.",
  400.           "type": "string"
  401.         },
  402.         "matches": {
  403.           "description": "The list of urls for which to apply this content script.",
  404.           "type": "string"
  405.         },
  406.         "css": {
  407.           "description": "The list of css files to be applied in this content script..",
  408.           "type": "string"
  409.         },
  410.         "js": {
  411.           "description": "The list of js files to be applied in this content script.",
  412.           "type": "string"
  413.         }
  414.       }
  415.     },
  416.     "launch_event_settings": {
  417.       "type": "object",
  418.       "properties": {
  419.         "event": {
  420.           "description": "The type name of the event.",
  421.           "type": "string",
  422.           "enum": [
  423.             "GameLaunch"
  424.           ]
  425.         },
  426.         "event_data": {
  427.           "description": "The event data.",
  428.           "$ref": "#/definitions/launch_event"
  429.         },
  430.         "start_minimized": {
  431.           "description": "  The app’s main window will start minimized.",
  432.           "type": "boolean"
  433.         }
  434.       }
  435.     },
  436.     "launch_event": {
  437.       "type": "object",
  438.      
  439.         "properties": {
  440.           "game_ids": {
  441.             "description": "The list of game class IDs for which the app will launch.",
  442.             "type": "array",
  443.             "items": {
  444.               "type": "integer"
  445.             }
  446.           },
  447.           "wait_for_stable_framerate": {
  448.             "description": "The app won’t start until the game’s framerate will stabilize around or above the stated framerate.",
  449.             "type": "integer"
  450.           }
  451.        
  452.         }
  453.     },
  454.     "extra_object": {
  455.       "type": "object",
  456.       "properties": {
  457.         "file": {
  458.           "type": "string"
  459.         },
  460.         "class": {
  461.           "type": "string"
  462.         }
  463.       }
  464.     }
  465.   }
  466. }
RAW Paste Data
Top