{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "line": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "ref": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["pending", "ready", "applied", "refused"]
          },
          "member": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "existing": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "refusals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": ["code", "message"]
            }
          },
          "reverted": {
            "type": "boolean"
          }
        },
        "required": ["line", "ref", "status", "member", "existing", "refusals"]
      }
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["items", "nextCursor"]
}
