{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/schemas/node-record-v1.json",
  "title": "Tarvos Node Record v1",
  "type": "object",
  "required": [
    "$schema",
    "schemaVersion",
    "canonicalUrl",
    "slug",
    "name",
    "summary",
    "description",
    "readiness",
    "status",
    "nodeTypes",
    "providers",
    "credentials",
    "capabilities",
    "install",
    "version",
    "license",
    "updatedAt"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "schemaVersion": {
      "const": 1
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "slug": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "readiness": {
      "enum": [
        "documented",
        "installable",
        "validated",
        "stable"
      ]
    },
    "status": {
      "enum": [
        "alpha",
        "beta",
        "stable",
        "deprecated"
      ]
    },
    "nodeTypes": {
      "type": "array",
      "minItems": 1,
      "items": {
        "enum": [
          "action",
          "trigger"
        ]
      }
    },
    "providers": {
      "type": "array"
    },
    "credentials": {
      "type": "array"
    },
    "configuration": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "key",
          "description",
          "required"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "key": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "constraints": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "capabilities": {
      "type": "array",
      "minItems": 1
    },
    "repositoryUrl": {
      "type": "string",
      "format": "uri"
    },
    "guides": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "description",
          "url",
          "audience"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "audience": {
            "enum": [
              "reference",
              "standard",
              "beginner"
            ]
          }
        }
      }
    },
    "install": {
      "type": "object",
      "required": [
        "source",
        "status"
      ],
      "properties": {
        "source": {
          "const": "github"
        },
        "status": {
          "enum": [
            "pending",
            "available"
          ]
        },
        "command": {
          "type": "string"
        },
        "packageName": {
          "type": "string"
        }
      }
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "license": {
      "type": "string",
      "minLength": 1
    },
    "updatedAt": {
      "type": "string",
      "format": "date"
    }
  }
}