{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-revoked-service-client-key-response-schema.json",
  "title": "RevokedServiceClientKeyResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-admin-api-openapi.yml#/components/schemas/RevokedServiceClientKeyResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "type": "boolean",
      "const": true
    },
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "key",
        "revokedExchangedKeyIds"
      ],
      "properties": {
        "key": {
          "$ref": "#/$defs/ServiceClientKey"
        },
        "revokedExchangedKeyIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        }
      }
    }
  },
  "$defs": {
    "EcPublicJwk": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kty",
        "crv",
        "x",
        "y"
      ],
      "properties": {
        "kty": {
          "type": "string",
          "const": "EC"
        },
        "crv": {
          "type": "string",
          "const": "P-256"
        },
        "x": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{43}$"
        },
        "y": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{43}$"
        }
      }
    },
    "ServiceClientKey": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "principalUserId",
        "kid",
        "name",
        "publicKeyJwk",
        "registeredByUserId",
        "createdAt",
        "expiresAt",
        "revokedAt",
        "revokedByUserId",
        "lastUsedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "principalUserId": {
          "type": "string",
          "format": "uuid"
        },
        "kid": {
          "type": "string",
          "description": "RFC 7638 JWK thumbprint (SHA-256, base64url)"
        },
        "name": {
          "type": "string"
        },
        "publicKeyJwk": {
          "$ref": "#/$defs/EcPublicJwk"
        },
        "registeredByUserId": {
          "type": "string",
          "format": "uuid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "revokedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "revokedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "lastUsedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  }
}