{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-audit-log-entry-detail-schema.json",
  "title": "AuditLogEntryDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-audit-logs-api-openapi.yml#/components/schemas/AuditLogEntryDetail",
  "allOf": [
    {
      "$ref": "#/$defs/AuditLogEntry"
    },
    {
      "type": "object",
      "properties": {
        "userAgent": {
          "type": [
            "string",
            "null"
          ],
          "description": "Browser or client that made the change, or `null` when unknown."
        },
        "before": {
          "type": [
            "string",
            "null"
          ],
          "description": "The changed fields before the change, as a JSON string, or `null` (for example on create). Secrets are replaced with `[REDACTED]`; a value over 4 KB is cut short and ends with `…[truncated]`."
        },
        "after": {
          "type": [
            "string",
            "null"
          ],
          "description": "The changed fields after the change, as a JSON string, or `null` (for example on delete). Same redaction and size rules as `before`."
        }
      },
      "required": [
        "userAgent",
        "before",
        "after"
      ]
    }
  ],
  "$defs": {
    "AuditLogEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the entry."
        },
        "object": {
          "type": "string",
          "enum": [
            "audit_log"
          ],
          "description": "String representing the object's type. Objects of the same type share the same value."
        },
        "createdAt": {
          "type": "string",
          "description": "When the change was made. ISO 8601 datetime."
        },
        "actorType": {
          "type": "string",
          "enum": [
            "user_session",
            "api_key",
            "oauth_token",
            "board_user",
            "system",
            "companion"
          ],
          "description": "Who made the change: `user_session` (a team member in the dashboard), `api_key` (an API key), `oauth_token` (an app or agent connected with OAuth), `board_user` (a job seeker or employer on your board), `system` (Cavuno on your behalf) or `companion` (Cavuno Companion, acting for a team member with their permission)."
        },
        "actorLabel": {
          "type": "string",
          "description": "Who made the change, as shown on the Audit log page: a member’s name or email, an API key’s name, or an app’s name."
        },
        "action": {
          "type": "string",
          "description": "What was done, as a stable machine-readable name such as `jobs.create` or `settings.update`."
        },
        "summary": {
          "type": "string",
          "description": "The action in plain English, such as \"Created a job\"."
        },
        "resourceType": {
          "type": "string",
          "description": "The kind of record that changed, such as `job`, `company` or `settings`."
        },
        "resourceId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ID of the record that changed, or `null` when the change has no single record."
        },
        "ipAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "IP address the change was made from, or `null` when unknown."
        }
      },
      "required": [
        "id",
        "object",
        "createdAt",
        "actorType",
        "actorLabel",
        "action",
        "summary",
        "resourceType",
        "resourceId",
        "ipAddress"
      ]
    }
  }
}