{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-maybe-paginated-list-response-project-entity-schema.json",
  "title": "MaybePaginatedListResponse[ProjectEntity]",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-projects-api-openapi.yml#/components/schemas/MaybePaginatedListResponse_ProjectEntity_",
  "anyOf": [
    {
      "$ref": "#/$defs/PaginatedItems_ProjectEntity_"
    },
    {
      "items": {
        "$ref": "#/$defs/ProjectEntity"
      },
      "type": "array"
    }
  ],
  "$defs": {
    "PaginatedItems_ProjectEntity_": {
      "properties": {
        "items": {
          "items": {
            "$ref": "#/$defs/ProjectEntity"
          },
          "type": "array",
          "title": "Items"
        },
        "total_count": {
          "type": "integer",
          "title": "Total Count"
        },
        "next_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Next Token"
        },
        "prev_token": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prev Token"
        }
      },
      "type": "object",
      "required": [
        "items",
        "total_count"
      ],
      "title": "PaginatedItems[ProjectEntity]"
    },
    "ProjectConfiguration": {
      "properties": {
        "retention": {
          "anyOf": [
            {
              "$ref": "#/$defs/RetentionPolicy"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project retention policy"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "title": "ProjectConfiguration"
    },
    "ProjectEntity": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "ID of the entity"
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Project readable name"
        },
        "account_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Account Id",
          "description": "Account id that owns the project; null for legacy projects"
        },
        "status": {
          "$ref": "#/$defs/ProjectStatus",
          "description": "Project status"
        },
        "configuration": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProjectConfiguration"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project configuration"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At",
          "description": "Datetime when the project was created"
        },
        "archived_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Archived At",
          "description": "Datetime when the project was archived"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "status",
        "created_at"
      ],
      "title": "ProjectEntity",
      "description": "Project response model."
    },
    "ProjectStatus": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "title": "ProjectStatus",
      "description": "Enum for project status values."
    },
    "RetentionPolicy": {
      "properties": {
        "files": {
          "anyOf": [
            {
              "type": "string",
              "format": "duration"
            },
            {
              "type": "null"
            }
          ],
          "title": "Files",
          "description": "File retention days"
        },
        "result_artifacts": {
          "anyOf": [
            {
              "type": "string",
              "format": "duration"
            },
            {
              "type": "null"
            }
          ],
          "title": "Result Artifacts",
          "description": "Data retention days for artifacts that are created from parse or extract jobs as well as the jobs themselves"
        }
      },
      "type": "object",
      "title": "RetentionPolicy"
    }
  }
}