{
  "$schema": "../../schemas/types.schema.json",
  "namespace": "smtp",
  "version": "1.0.0-draft.1",
  "types": [
    {
      "name": "smtp.Mail",
      "kind": "handle",
      "purpose": "Execution-owned mail; not serializable and exposes only these defined operations.",
      "methods": {
        "send": {
          "parameters": [
            {
              "name": "recipients",
              "type": "smtp.Recipients",
              "required": true
            }
          ],
          "returns": "core.void",
          "purpose": "none; queue the message.",
          "statementOnly": true
        }
      }
    },
    {
      "name": "smtp.Recipients",
      "kind": "array",
      "purpose": "Nonempty mail recipient list.",
      "items": "smtp.Recipient",
      "minimumItems": 1
    },
    {
      "name": "smtp.Recipient",
      "kind": "object",
      "purpose": "Mail recipient and delivery scope.",
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scope",
          "email"
        ],
        "properties": {
          "scope": {
            "enum": [
              "to",
              "cc",
              "bcc"
            ]
          },
          "email": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    {
      "name": "smtp.Features",
      "kind": "object",
      "purpose": "Documented mail feature data passed to the configured Service.",
      "schema": {
        "type": "object",
        "additionalProperties": true
      }
    }
  ]
}
