{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "chain": {
                "type": "string",
                "enum": ["solana", "eip155", "cosmos"]
              },
              "address": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "kind": {
                "type": "string",
                "const": "wallet"
              },
              "revision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "linked": {
                "type": "boolean"
              },
              "canRelink": {
                "type": "boolean"
              },
              "linkedAt": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scope": {
                "type": "string",
                "const": "project"
              },
              "project": {
                "type": "string"
              }
            },
            "required": [
              "chain",
              "address",
              "kind",
              "revision",
              "linked",
              "canRelink",
              "linkedAt",
              "scope",
              "project"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "oauth"
              },
              "provider": {
                "type": "string",
                "enum": ["x", "discord"]
              },
              "issuer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "revision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "linked": {
                "type": "boolean"
              },
              "canRelink": {
                "type": "boolean"
              },
              "linkedAt": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scope": {
                "type": "string",
                "const": "organization-environment"
              }
            },
            "required": [
              "kind",
              "provider",
              "issuer",
              "subject",
              "revision",
              "linked",
              "canRelink",
              "linkedAt",
              "scope"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["items", "nextCursor"]
}
