{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-get-workspaces-response-schema.json",
  "title": "GetWorkspacesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-workspaces-api-openapi.yml#/components/schemas/GetWorkspacesResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "workspaces": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "workspaceId": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "createdBy": {
                "type": "string",
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "userPermission": {
                "type": "string",
                "enum": [
                  "full",
                  "read-only"
                ]
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "firstName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "User's first name (null for placeholder/unregistered users)"
                    },
                    "lastName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "User's last name (null for placeholder/unregistered users)"
                    },
                    "permission": {
                      "type": "string",
                      "enum": [
                        "full",
                        "read-only"
                      ]
                    }
                  }
                },
                "description": "Array of all user permissions for this workspace"
              }
            }
          }
        },
        "count": {
          "type": "integer",
          "description": "Number of workspaces returned"
        }
      }
    }
  }
}