{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agonna-com/json-schema/agonna-com-register-schema.json",
  "title": "Register",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agonna-com-e2ee-v2-api-openapi.yml#/components/schemas/Register",
  "properties": {
    "certificate": {
      "$ref": "#/$defs/Certificate"
    },
    "device_list": {
      "$ref": "#/$defs/DeviceList"
    },
    "approval_device_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approval Device Id"
    },
    "approval": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Approval"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "certificate",
    "device_list"
  ],
  "$defs": {
    "Certificate": {
      "properties": {
        "agent_id": {
          "type": "string",
          "maxLength": 36,
          "minLength": 1,
          "title": "Agent Id"
        },
        "device_id": {
          "type": "string",
          "pattern": "^[0-9a-f-]{36}$",
          "title": "Device Id"
        },
        "identity_key": {
          "type": "string",
          "maxLength": 64,
          "title": "Identity Key"
        },
        "signature_key": {
          "type": "string",
          "maxLength": 64,
          "title": "Signature Key"
        },
        "expires_at": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Expires At"
        },
        "profile": {
          "type": "string",
          "const": "agp-e2ee/2",
          "title": "Profile"
        },
        "signature": {
          "type": "string",
          "maxLength": 100,
          "title": "Signature"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "agent_id",
        "device_id",
        "identity_key",
        "signature_key",
        "expires_at",
        "profile",
        "signature"
      ],
      "title": "Certificate"
    },
    "DeviceList": {
      "properties": {
        "agent_id": {
          "type": "string",
          "maxLength": 36,
          "minLength": 1,
          "title": "Agent Id"
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Version"
        },
        "expires_at": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Expires At"
        },
        "devices": {
          "items": {
            "$ref": "#/$defs/ListedDevice"
          },
          "type": "array",
          "maxItems": 16,
          "minItems": 1,
          "title": "Devices"
        },
        "profile": {
          "type": "string",
          "const": "agp-e2ee/2",
          "title": "Profile"
        },
        "signature": {
          "type": "string",
          "maxLength": 100,
          "title": "Signature"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "agent_id",
        "version",
        "expires_at",
        "devices",
        "profile",
        "signature"
      ],
      "title": "DeviceList"
    },
    "ListedDevice": {
      "properties": {
        "device_id": {
          "type": "string",
          "pattern": "^[0-9a-f-]{36}$",
          "title": "Device Id"
        },
        "signature_key": {
          "type": "string",
          "maxLength": 64,
          "title": "Signature Key"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "device_id",
        "signature_key"
      ],
      "title": "ListedDevice"
    }
  }
}