{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/capgo-app/json-schema/capgo-app-device-envelope-schema.json",
  "title": "DeviceEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/capgo-app-devices-api-openapi.yml#/components/schemas/DeviceEnvelope",
  "$ref": "#/$defs/Device",
  "$defs": {
    "Device": {
      "type": "object",
      "properties": {
        "device_id": {
          "type": "string"
        },
        "custom_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": [
            "integer",
            "null"
          ]
        },
        "version_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "channel": {
          "type": [
            "string",
            "null"
          ]
        },
        "app_id": {
          "type": "string"
        },
        "platform": {
          "type": "string",
          "enum": [
            "ios",
            "android",
            "electron"
          ]
        },
        "plugin_version": {
          "type": [
            "string",
            "null"
          ]
        },
        "os_version": {
          "type": [
            "string",
            "null"
          ]
        },
        "version_build": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_prod": {
          "type": "boolean"
        },
        "is_emulator": {
          "type": "boolean"
        },
        "key_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "device_id",
        "app_id",
        "platform"
      ]
    }
  }
}