{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/newsletter/1.0.0/schema.json",
  "title": "Newsletter",
  "description": "A newsletter with subject, recipient group, author and Content.",
  "type": "object",
  "properties": {
    "subject": {
      "title": "Subject",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "recipients": {
      "title": "Recipients",
      "type": "string",
      "enum": [
        "subscribers",
        "participants"
      ],
      "x-penny": {
        "field": "text",
        "input": "radio",
        "options": [
          {
            "value": "subscribers",
            "label": "Subscribers"
          },
          {
            "value": "participants",
            "label": "Participants"
          }
        ]
      }
    },
    "author": {
      "title": "Author",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "team-member"
      }
    },
    "content": {
      "title": "Content",
      "$ref": "https://shapes.penny.coop/content-markdown/1.0.0/schema.json",
      "x-penny": {
        "field": "content",
        "storage": "markdown"
      }
    }
  },
  "required": [
    "subject",
    "recipients",
    "author",
    "content"
  ],
  "x-penny": {
    "shape": "newsletter",
    "version": "1.0.0",
    "source": "app/types/newsletter.js",
    "sourceName": "newsletter",
    "kind": "record",
    "plural": "Newsletters",
    "icon": "Mails",
    "group": "Private",
    "defaultVisibility": "private",
    "publishable": false,
    "fieldOrder": [
      "subject",
      "recipients",
      "author",
      "content"
    ],
    "sensitive": true
  }
}
