{
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": ".appsemblerc.yaml",
  "description": "A .appsemblerc.yaml file may be used to configure either an app or a block.",
  "type": "object",
  "additionalProperties": false,

  "properties": {
    "name": {
      "description": "The name of a block. By default the name in package.json is used.",
      "type": "string",
      "pattern": "^@([\\da-z](?:(?!.*--)[\\da-z-]*[\\da-z])?)/([\\da-z](?:(?!.*--)[\\da-z-]*[\\da-z])?)$"
    },
    "description": {
      "description": "A short description of the block. By default the description in package.json is used.",
      "maxLength": 160
    },
    "version": {
      "description": "A semantic version of the block representation of the block version. By default the version in package.json is used."
    },
    "longDescription": {
      "description": "The long description of the block. Markdown is supported. By default the content of README.md is used.",
      "type": "string"
    },
    "layout": {
      "description": "The type of layout to be used for the block.",
      "enum": ["float", "grow", "hidden", "static", null],
      "default": "static"
    },
    "output": {
      "description": "Where to read build output from.",
      "type": "string",
      "default": "dist"
    },
    "webpack": {
      "description": "The path to the webpack configuration file relative to the block project directory. By default a file named webpack.config.js is used, with a fallback to the webpack configuration from @appsemble/webpack-config.",
      "type": "string"
    },
    "events": {
      "type": "object",
      "description": "An object describing the names of the events the block can listen and emit to. By default this is extracted from the block’s TypeScript module augmentations.",
      "additionalProperties": false,
      "properties": {
        "listen": {
          "description": "The events the block listens on.",
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              }
            }
          }
        },
        "emit": {
          "description": "The events the block may emit.",
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "actions": {
      "description": "An object which describes the actions a block can trigger. This will be used to validate app definitions. By default this is extracted from the block’s TypeScript module augmentations.",
      "type": "object",
      "additionalProperties": true
    },
    "parameters": {
      "description": "A JSON schema which describes the block parameters. By default this is extracted from the block’s TypeScript module augmentations."
    },
    "iconBackground": {
      "description": "The background color to use for maskable icons.",
      "type": "string",
      "pattern": "^#[a-zA-Z\\d]{6}$"
    },
    "context": {
      "type": "object",
      "description": "A context which can be specified using the --context command line parameter.",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "remote": {
            "description": "If remote is specified, this will override --remote passed by the command line.",
            "type": "string",
            "format": "uri",
            "default": "https://appsemble.app"
          },
          "organization": {
            "description": "If organization is specified, this will override --organization passed by the command line when creating an app.",
            "type": "string",
            "pattern": "^([\\da-z](?:(?!.*--)[\\da-z-]*[\\da-z])?)$",
            "minLength": 1,
            "maxLength": 30
          },
          "icon": {
            "description": "A path to the app icon to use",
            "type": "string",
            "default": "icon.png"
          },
          "iconBackground": {
            "description": "The background color to use for maskable icons.",
            "type": "string",
            "pattern": "^#[a-zA-Z\\d]{6}$"
          },
          "maskableIcon": {
            "description": "A path to the maskable app icon to use",
            "type": "string",
            "default": "maskable-icon.png"
          },
          "id": {
            "description": "If id is specified, this will override --id passed by the command line when updating an app.",
            "type": "integer",
            "minimum": 1
          },
          "visibility": {
            "description": "Determine the app visibility of the app in the Appsemble app store.\n\nThis doesn’t affect whether or not the app can be accessed on its own domain.\n\n- **public**: The app is publicly listed in the Appsemble app store.,\n- **unlisted**: The app store page can be accessed, but the app isn’t listed publicly in the Appsemble app store.\n- **private**: The app is only visible to people who are part of the organization.",
            "default": "unlisted",
            "enum": ["public", "unlisted", "private"]
          },
          "showAppDefinition": {
            "description": "Whether or not people who have access to the app may see the app definition.",
            "type": "boolean"
          },
          "template": {
            "description": "If template is specified, this will override --template passed on the command line.",
            "type": "boolean",
            "default": false
          },
          "sentryDsn": {
            "type": "string",
            "format": "uri",
            "description": "A custom Sentry DSN to use for the app."
          },
          "sentryEnvironment": {
            "type": "string",
            "description": "A custom Sentry environment to use for the app."
          }
        }
      }
    }
  }
}