{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-operator-application-detail-schema.json",
  "title": "OperatorApplicationDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-candidates-api-openapi.yml#/components/schemas/OperatorApplicationDetail",
  "allOf": [
    {
      "$ref": "#/$defs/OperatorApplication"
    },
    {
      "type": "object",
      "properties": {
        "headline": {
          "type": [
            "string",
            "null"
          ],
          "description": "The applicant's headline, as submitted."
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "The applicant's location, as submitted."
        },
        "coverNote": {
          "type": [
            "string",
            "null"
          ],
          "description": "The cover note submitted with the application."
        },
        "updatedAt": {
          "type": "string",
          "description": "ISO-8601 timestamp of the last change to the application."
        },
        "resume": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "filename": {
              "type": [
                "string",
                "null"
              ],
              "description": "Uploaded file name."
            },
            "contentType": {
              "type": [
                "string",
                "null"
              ],
              "description": "MIME type of the file."
            },
            "sizeBytes": {
              "type": [
                "number",
                "null"
              ],
              "description": "Size of the file in bytes."
            }
          },
          "required": [
            "filename",
            "contentType",
            "sizeBytes"
          ],
          "description": "The resume uploaded with the application, or `null`."
        },
        "job": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The job id."
            },
            "title": {
              "type": [
                "string",
                "null"
              ],
              "description": "The job title."
            },
            "companyName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The name of the company that owns the application."
            }
          },
          "required": [
            "id",
            "title",
            "companyName"
          ],
          "description": "The job the application was made to."
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The note id."
              },
              "body": {
                "type": "string",
                "description": "The note text."
              },
              "authorName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name of the employer who wrote the note."
              },
              "companyName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The employer company the note belongs to."
              },
              "createdAt": {
                "type": "string",
                "description": "ISO-8601 timestamp of the note."
              }
            },
            "required": [
              "id",
              "body",
              "authorName",
              "companyName",
              "createdAt"
            ]
          },
          "description": "Employer notes on the application, newest first (up to 100)."
        },
        "activities": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The activity id."
              },
              "type": {
                "type": "string",
                "description": "The kind of event."
              },
              "fromStage": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stage value before a stage move."
              },
              "fromStageLabel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stage name before a stage move."
              },
              "toStage": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stage value after a stage move."
              },
              "toStageLabel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stage name after a stage move."
              },
              "createdAt": {
                "type": "string",
                "description": "ISO-8601 timestamp of the event."
              }
            },
            "required": [
              "id",
              "type",
              "fromStage",
              "fromStageLabel",
              "toStage",
              "toStageLabel",
              "createdAt"
            ]
          },
          "description": "Activity history of the application, newest first (up to 100)."
        }
      },
      "required": [
        "headline",
        "location",
        "coverNote",
        "updatedAt",
        "resume",
        "job",
        "notes",
        "activities"
      ]
    }
  ],
  "$defs": {
    "OperatorApplication": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the application."
        },
        "object": {
          "type": "string",
          "enum": [
            "application"
          ],
          "description": "String representing the object's type."
        },
        "jobId": {
          "type": "string",
          "description": "The job the application was made to."
        },
        "candidateId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The candidate who applied while signed in, or `null` for a guest application."
        },
        "isGuest": {
          "type": "boolean",
          "description": "Whether the applicant applied without a candidate account."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The applicant's name, as submitted."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The applicant's email address, as submitted."
        },
        "stage": {
          "type": "string",
          "description": "The application's pipeline stage value: a system stage (for example `review` or `hired`) or a custom stage id."
        },
        "stageLabel": {
          "type": "string",
          "description": "The stage name the employer sees in their pipeline."
        },
        "source": {
          "type": "string",
          "description": "How the application was created."
        },
        "hasResume": {
          "type": "boolean",
          "description": "Whether a resume was uploaded with the application."
        },
        "appliedAt": {
          "type": "string",
          "description": "ISO-8601 timestamp of when the application was submitted."
        }
      },
      "required": [
        "id",
        "object",
        "jobId",
        "candidateId",
        "isGuest",
        "name",
        "email",
        "stage",
        "stageLabel",
        "source",
        "hasResume",
        "appliedAt"
      ]
    }
  }
}