sew-proto 0.11.6

Sew wire contracts: ids, addresses, errors, HTTP and gateway bodies, permissions, policies, audit.
Documentation
{
  "$defs": {
    "DraftUpload": {
      "description": "A pending upload held by a draft or a scheduled message.",
      "properties": {
        "content_type": {
          "description": "The stored (or declared) content type.",
          "type": "string"
        },
        "expires_at": {
          "description": "When the pending upload expires.",
          "format": "date-time",
          "type": "string"
        },
        "filename": {
          "description": "The file name.",
          "type": "string"
        },
        "size": {
          "description": "Bytes.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "upload_id": {
          "description": "The upload id (the attachment id once sent).",
          "pattern": "^[1-9][0-9]{0,18}$",
          "type": "string"
        }
      },
      "required": [
        "upload_id",
        "filename",
        "size",
        "content_type",
        "expires_at"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "The caller's unsent text in a channel or thread, synced across devices.",
  "properties": {
    "also_send_to_channel": {
      "description": "A reply draft that also goes to the channel.",
      "type": "boolean"
    },
    "body": {
      "description": "The body (may be empty when uploads are attached).",
      "type": "string"
    },
    "channel_id": {
      "description": "The channel.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": "string"
    },
    "created_at": {
      "description": "First save.",
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "description": "The draft id (kept across saves).",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": "string"
    },
    "rev": {
      "description": "Server-ordered revision, 1 on the first save.",
      "format": "uint32",
      "minimum": 0,
      "type": "integer"
    },
    "thread_root_id": {
      "description": "The thread, for a reply draft.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": [
        "string",
        "null"
      ]
    },
    "updated_at": {
      "description": "Last save.",
      "format": "date-time",
      "type": "string"
    },
    "uploads": {
      "description": "Pending uploads that are still live.",
      "items": {
        "$ref": "#/$defs/DraftUpload"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "channel_id",
    "body",
    "uploads",
    "also_send_to_channel",
    "rev",
    "created_at",
    "updated_at"
  ],
  "title": "Draft",
  "type": "object"
}