{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dropto-run/json-schema/dropto-run-site-folders-response-schema.json",
  "title": "SiteFoldersResponse",
  "description": "Response of `GET /site-folders`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dropto-run-site-folders-api-openapi.yml#/components/schemas/SiteFoldersResponse",
  "properties": {
    "folders": {
      "description": "Every folder the account holds, by name.",
      "items": {
        "$ref": "#/$defs/SiteFolderNode"
      },
      "type": "array"
    },
    "maxDepth": {
      "description": "How deeply folders may nest. Sent for the same reason as MaxFolders: the drag\ntarget that would break this rule can be refused before the drop rather than after the request.",
      "format": "int32",
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ]
    },
    "maxFolders": {
      "description": "How many folders this account may hold in total.\n\nSent so the dashboard can grey out \"New folder\" before somebody names one and is refused. A client\nthat had to discover the limit by hitting it would have to discard what they typed.",
      "format": "int32",
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ]
    }
  },
  "required": [
    "folders",
    "maxFolders",
    "maxDepth"
  ],
  "type": "object",
  "$defs": {
    "SiteFolderNode": {
      "description": "One folder in the tree.",
      "properties": {
        "createdAt": {
          "description": "When the folder was created.",
          "format": "date-time",
          "type": "string"
        },
        "folderId": {
          "description": "ULID of the folder.",
          "type": "string"
        },
        "name": {
          "description": "What the owner calls it.",
          "type": "string"
        },
        "parentId": {
          "description": "The folder it sits inside, or null when it sits at the root.",
          "type": [
            "null",
            "string"
          ]
        },
        "siteCount": {
          "description": "Sites filed directly in this folder, not counting those in folders inside it. Deleted sites are not\ncounted — they are gone from the listing, so counting them would label an empty folder as holding\nsomething.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ]
        },
        "updatedAt": {
          "description": "When it was last renamed or moved.",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "folderId",
        "parentId",
        "name",
        "siteCount",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    }
  }
}