{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "shortId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "frameworkType": {
      "type": "string",
      "enum": [
        "GDPR",
        "TCF",
        "US"
      ]
    },
    "files": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "vars",
              "styles",
              "view",
              "template"
            ]
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^(?!\\.{1,2}$)[^/\\\\\\x00]+$"
          },
          "content": {
            "type": "string",
            "maxLength": 2000000
          }
        },
        "required": [
          "kind",
          "filename",
          "content"
        ],
        "additionalProperties": false
      }
    },
    "scope": {
      "type": "string",
      "enum": [
        "org",
        "project",
        "app"
      ]
    },
    "scopeId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[A-Za-z0-9_-]+$"
    }
  },
  "required": [
    "name",
    "frameworkType",
    "files"
  ],
  "additionalProperties": false
}
