sew-proto 0.11.6

Sew wire contracts: ids, addresses, errors, HTTP and gateway bodies, permissions, policies, audit.
Documentation
{
  "$defs": {
    "ChannelMeeting": {
      "description": "`meeting` on a meeting channel's JSON: the meeting it belongs to.",
      "properties": {
        "id": {
          "description": "The meeting id.",
          "pattern": "^[1-9][0-9]{0,18}$",
          "type": "string"
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "ChannelType": {
      "description": "Channel type.",
      "oneOf": [
        {
          "const": "text",
          "description": "A text channel.",
          "type": "string"
        },
        {
          "const": "voice",
          "description": "A voice channel.",
          "type": "string"
        },
        {
          "const": "announcement",
          "description": "An announcement channel: `@everyone` posts only in threads by default.",
          "type": "string"
        },
        {
          "const": "dm",
          "description": "A 1:1 DM (no space, slug or name; always private).",
          "type": "string"
        },
        {
          "const": "group_dm",
          "description": "A group DM of up to 9 people.",
          "type": "string"
        }
      ]
    },
    "RecordingRule": {
      "description": "The rule a voice room records under, as its settings and their sources resolve it.",
      "oneOf": [
        {
          "const": "none",
          "description": "People press Record.",
          "type": "string"
        },
        {
          "const": "auto",
          "description": "The room records from its first join.",
          "type": "string"
        },
        {
          "const": "required",
          "description": "The room records every call with two or more people.",
          "type": "string"
        }
      ]
    },
    "Visibility": {
      "description": "Channel visibility.",
      "oneOf": [
        {
          "const": "public",
          "description": "Every space member can see and join it.",
          "type": "string"
        },
        {
          "const": "private",
          "description": "Members only.",
          "type": "string"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A channel, DM or group DM.",
  "properties": {
    "archived_at": {
      "description": "When the channel was archived.",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "assistant_reader_ids": {
      "description": "Assistants that read this DM or group DM through their pinned person. Empty (and absent) for\nspace channels.",
      "items": {
        "description": "A Sew id: a decimal string of a 64-bit time-sortable id (1 to 9223372036854775807).",
        "pattern": "^[1-9][0-9]{0,18}$",
        "type": "string"
      },
      "type": "array"
    },
    "category_id": {
      "description": "Its category.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": [
        "string",
        "null"
      ]
    },
    "closing": {
      "description": "A voice room K2 is closing: joins and moves into it are refused\n(`409 conflict` `channel_closing`) and it is archived when its last person leaves.\nAbsent when `false`; never set on an archived channel.",
      "type": "boolean"
    },
    "created_at": {
      "description": "When the channel was created.",
      "format": "date-time",
      "type": "string"
    },
    "created_by": {
      "description": "Who created the channel. Optional on the wire so older payloads still parse; the\nserver always sends it.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": [
        "string",
        "null"
      ]
    },
    "dm_member_ids": {
      "description": "The DM's members; empty for space channels.",
      "items": {
        "description": "A Sew id: a decimal string of a 64-bit time-sortable id (1 to 9223372036854775807).",
        "pattern": "^[1-9][0-9]{0,18}$",
        "type": "string"
      },
      "type": "array"
    },
    "file_retention_days": {
      "description": "Effective file retention in days. Absent = forever.",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "has_guests": {
      "default": false,
      "description": "Whether any member of the channel or DM is a guest. Old payloads read as `false`.",
      "type": "boolean"
    },
    "head_seq": {
      "description": "Head of the channel change log.",
      "format": "uint64",
      "minimum": 0,
      "type": "integer"
    },
    "id": {
      "description": "The channel id.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": "string"
    },
    "last_message_id": {
      "description": "The newest message.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": [
        "string",
        "null"
      ]
    },
    "meeting": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChannelMeeting"
        },
        {
          "type": "null"
        }
      ],
      "description": "A meeting channel's meeting; absent on every other channel."
    },
    "member_count": {
      "default": 0,
      "description": "Joined members. Old payloads without it read as 0.",
      "format": "uint32",
      "minimum": 0,
      "type": "integer"
    },
    "members_can_leave": {
      "description": "Since 0.10.0: in a governed Space (App- or server-governed), the members of this\nprivate channel may leave it (`POST /channels/{id}/leave`), which they otherwise cannot.\nSet over mgmt only. Absent when `false` (and from older servers).",
      "type": "boolean"
    },
    "my_perms": {
      "description": "The viewer's effective permissions here.",
      "pattern": "^(0|[1-9][0-9]{0,19})$",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "The name; absent for 1:1 DMs and for group DMs nobody has named (clients then show\nthe members of `dm_member_ids`).",
      "type": [
        "string",
        "null"
      ]
    },
    "position": {
      "description": "Sort position in its category.",
      "format": "uint32",
      "minimum": 0,
      "type": "integer"
    },
    "purpose": {
      "description": "The purpose.",
      "type": [
        "string",
        "null"
      ]
    },
    "recording_audio_days": {
      "description": "The channel's default audio keep days for recordings; absent = the org\ndefault.",
      "format": "uint16",
      "maximum": 65535,
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "recording_auto": {
      "description": "Voice channels: a recording starts on the first join. Absent = off.",
      "type": "boolean"
    },
    "recording_require_consent": {
      "description": "Voice channels: declining the recording notice means not joining;\nabsent = the org policy `recording.require_consent_to_join`.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "recording_required": {
      "description": "Voice channels: the channel's own \"record every call with more than one person\";\nabsent = it inherits (its Space, its governing App and the org policy may still require\nit; `false` never removes their rule).",
      "type": [
        "boolean",
        "null"
      ]
    },
    "recording_rule": {
      "$ref": "#/$defs/RecordingRule",
      "description": "Voice channels, DMs and group DMs: the rule the room records under, every source\napplied: `auto` (a recording starts on the first join), `required` (every call with\nmore than one person is recorded) or `none` (people press Record). Absent = `none`."
    },
    "retention_days": {
      "description": "Effective message retention in days (holds ignored). Absent = forever.",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "slow_mode_s": {
      "default": 0,
      "description": "Slow mode in seconds, 0 = off. Always sent; old payloads read as 0.",
      "format": "uint32",
      "minimum": 0,
      "type": "integer"
    },
    "slug": {
      "description": "The slug; absent for DMs.",
      "pattern": "^[a-z0-9][a-z0-9-]{0,79}$",
      "type": [
        "string",
        "null"
      ]
    },
    "space_id": {
      "description": "Its space; absent for DMs.",
      "pattern": "^[1-9][0-9]{0,18}$",
      "type": [
        "string",
        "null"
      ]
    },
    "synced": {
      "description": "Whether overwrites follow the category.",
      "type": "boolean"
    },
    "topic": {
      "description": "The topic.",
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "$ref": "#/$defs/ChannelType",
      "description": "The channel type."
    },
    "user_limit": {
      "description": "Voice channels: at most this many people in the call, 0 = no per-channel limit.\nAbsent (0) for other types.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": "integer"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "description": "Public or private; DMs are private."
    }
  },
  "required": [
    "id",
    "type",
    "visibility",
    "position",
    "synced",
    "head_seq",
    "dm_member_ids",
    "created_at"
  ],
  "title": "Channel",
  "type": "object"
}