sew-proto 0.11.6

Sew wire contracts: ids, addresses, errors, HTTP and gateway bodies, permissions, policies, audit.
Documentation
{
  "$defs": {
    "RetentionScope": {
      "description": "Which level a retention policy sets (`kind` tag).",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "The whole install (DMs use it too). A struct variant so unknown fields are refused.",
          "properties": {
            "kind": {
              "const": "install",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "One space and every channel in it.",
          "properties": {
            "id": {
              "description": "The space.",
              "pattern": "^[1-9][0-9]{0,18}$",
              "type": "string"
            },
            "kind": {
              "const": "space",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "One channel, DM or group DM.",
          "properties": {
            "id": {
              "description": "The channel.",
              "pattern": "^[1-9][0-9]{0,18}$",
              "type": "string"
            },
            "kind": {
              "const": "channel",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "type": "object"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Body of `POST /api/v1/compliance/retention/preview`: a proposal for one level.",
  "properties": {
    "deleted_purge_days": {
      "default": null,
      "description": "Install only: proposed deleted-content window.",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "effective_at": {
      "description": "When it would take effect (default now + 7 days; 24 h to 365 days ahead).",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "files_days": {
      "default": null,
      "description": "Proposed days for files.",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "messages_days": {
      "default": null,
      "description": "Proposed days for messages (`null` = forever / inherit).",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "scope": {
      "$ref": "#/$defs/RetentionScope",
      "description": "The level."
    }
  },
  "required": [
    "scope"
  ],
  "title": "PreviewRetentionRequest",
  "type": "object"
}