{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-activity-entry-schema.json",
  "title": "ActivityEntry",
  "description": "One entry of the activity journal.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-auth-api-openapi.yml#/components/schemas/ActivityEntry",
  "type": "object",
  "required": [
    "id",
    "kind",
    "occurred_at"
  ],
  "properties": {
    "detail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short qualifier: the provider for OAuth events, `password` or `2fa`\nfor a failed sign-in."
    },
    "device": {
      "type": [
        "string",
        "null"
      ],
      "description": "Coarse \"browser / OS\" label of the device, when known. No IP address\nis ever stored or returned."
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Entry identifier."
    },
    "kind": {
      "$ref": "#/$defs/SecurityEventKind",
      "description": "What happened."
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "description": "When it happened."
    }
  },
  "$defs": {
    "SecurityEventKind": {
      "type": "string",
      "description": "What happened. The wire form is the `snake_case` name, which is also what\nthe `auth.security_event.kind` CHECK constraint accepts.",
      "enum": [
        "sign_in",
        "passkey_sign_in",
        "passkey_added",
        "passkey_removed",
        "sign_in_failed",
        "totp_enabled",
        "totp_disabled",
        "backup_codes_regenerated",
        "backup_code_used",
        "password_reset",
        "oauth_linked",
        "oauth_unlinked",
        "api_key_created",
        "api_key_revoked",
        "data_export_requested",
        "account_deletion_requested",
        "account_deletion_cancelled"
      ]
    }
  }
}