{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "test": {
      "type": "boolean"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "accounts": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": ["account", "wallet"]
          },
          "provider": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "signInEnabled": {
            "type": "boolean"
          },
          "profile": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "username": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "emailVerified": {
                "default": false,
                "type": "boolean"
              },
              "imageUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": ["emailVerified"]
          },
          "status": {
            "type": "string",
            "enum": ["connected", "needs-reconnect"]
          },
          "reason": {
            "type": "string",
            "enum": ["revoked", "expired", "missing-scope"]
          }
        },
        "required": ["kind", "provider", "subject", "signInEnabled"]
      }
    },
    "appIdentities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": ["kind", "subject"]
      }
    }
  },
  "required": ["id", "accounts"]
}
