sew-proto 0.11.6

Sew wire contracts: ids, addresses, errors, HTTP and gateway bodies, permissions, policies, audit.
Documentation
{
  "$defs": {
    "ChannelNotifyPrefs": {
      "description": "A member's prefs for one channel or DM.",
      "properties": {
        "channel_id": {
          "description": "The channel.",
          "pattern": "^[1-9][0-9]{0,18}$",
          "type": "string"
        },
        "effective_level": {
          "$ref": "#/$defs/NotifyLevel",
          "description": "The level in effect for this member here."
        },
        "level": {
          "anyOf": [
            {
              "$ref": "#/$defs/NotifyLevel"
            },
            {
              "type": "null"
            }
          ],
          "description": "The channel's own level; `null` = inherit."
        },
        "muted": {
          "description": "Muted now.",
          "type": "boolean"
        },
        "muted_until": {
          "description": "When the mute ends; absent = until unmuted (or not muted).",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "channel_id",
        "effective_level",
        "muted"
      ],
      "type": "object"
    },
    "NotifyLevel": {
      "description": "A notification level (`*.level` codes 1–3).",
      "oneOf": [
        {
          "const": "all",
          "description": "Every message.",
          "type": "string"
        },
        {
          "const": "mentions",
          "description": "Mentions, DMs, keywords and followed threads.",
          "type": "string"
        },
        {
          "const": "none",
          "description": "Nothing (reminders still arrive).",
          "type": "string"
        }
      ]
    },
    "SpaceNotifyPrefs": {
      "description": "A member's level for one space.",
      "properties": {
        "effective_level": {
          "$ref": "#/$defs/NotifyLevel",
          "description": "What the space's channels fall back to for this member."
        },
        "level": {
          "anyOf": [
            {
              "$ref": "#/$defs/NotifyLevel"
            },
            {
              "type": "null"
            }
          ],
          "description": "The space's level; `null` = inherit."
        },
        "space_id": {
          "description": "The space.",
          "pattern": "^[1-9][0-9]{0,18}$",
          "type": "string"
        }
      },
      "required": [
        "space_id",
        "effective_level"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Response of `GET /api/v1/me/notify/prefs`: explicit rows only, for channels and spaces the\ncaller can see.",
  "properties": {
    "channels": {
      "description": "Channels and DMs with a level or a mute.",
      "items": {
        "$ref": "#/$defs/ChannelNotifyPrefs"
      },
      "type": "array"
    },
    "spaces": {
      "description": "Spaces with a level.",
      "items": {
        "$ref": "#/$defs/SpaceNotifyPrefs"
      },
      "type": "array"
    }
  },
  "required": [
    "channels",
    "spaces"
  ],
  "title": "NotifyPrefsList",
  "type": "object"
}