{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-collection-detail-schema.json",
  "title": "CollectionDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-collections-api-openapi.yml#/components/schemas/CollectionDetail",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "type": "string"
    },
    "project_id": {
      "type": "integer"
    },
    "workspace_id": {
      "type": "integer"
    },
    "role": {
      "type": "string",
      "description": "'manager' (edits its project) or 'member'"
    },
    "dashboard_count": {
      "type": "integer"
    },
    "member_count": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Managers only — a member never sees the roster"
    },
    "cover_url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The first published board's url token, for a thumbnail"
    },
    "shared_by_name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Members only: who shared it with them"
    },
    "has_refresh": {
      "type": "boolean",
      "default": false
    },
    "updated_at": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "dashboards": {
      "items": {
        "$ref": "#/$defs/CollectionBoardOut"
      },
      "type": "array"
    },
    "members": {
      "oneOf": [
        {
          "items": {
            "$ref": "#/$defs/CollectionMemberOut"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "automation_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "refresh_folder_resource_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "refresh_datasets": {
      "items": {
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object",
  "required": [
    "dashboard_count",
    "dashboards",
    "id",
    "name",
    "project_id",
    "role",
    "url",
    "workspace_id"
  ],
  "$defs": {
    "CollectionBoardOut": {
      "properties": {
        "dashboard_id": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "engine": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "position": {
          "type": "integer"
        },
        "tab_label": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_published": {
          "type": "boolean"
        },
        "updated_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "added_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "dashboard_id",
        "is_published",
        "position",
        "title",
        "url"
      ],
      "title": "CollectionBoardOut"
    },
    "CollectionMemberOut": {
      "properties": {
        "email": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "description": "'active' (has an account) or 'pending'"
        },
        "shared_by_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "shared_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "email",
        "status"
      ],
      "title": "CollectionMemberOut"
    }
  }
}