{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "member": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "quests": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "quest": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "release": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "title": {
            "type": "string"
          },
          "presentation": {
            "default": {},
            "type": "object",
            "properties": {
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 4000
                    },
                    "action": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "link"
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 2000
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            }
                          },
                          "required": ["kind", "url", "label"],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": ["title"]
                }
              },
              "image": {
                "type": "string",
                "maxLength": 2000
              },
              "imageAlt": {
                "type": "string",
                "maxLength": 500
              },
              "requirements": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "account"
                        },
                        "provider": {
                          "type": "string",
                          "enum": ["google", "apple", "x", "discord"]
                        }
                      },
                      "required": ["kind", "provider"],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "wallet"
                        },
                        "chain": {
                          "type": "string",
                          "enum": ["solana", "eip155", "cosmos"]
                        }
                      },
                      "required": ["kind"],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "quiz": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "prompt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": ["id", "label"]
                      }
                    }
                  },
                  "required": ["id", "prompt", "choices"]
                }
              },
              "instructions": {
                "type": "string",
                "maxLength": 4000
              },
              "video": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "poster": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "captions": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 20
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      }
                    },
                    "required": ["url", "language", "label"]
                  }
                },
                "required": ["url"]
              }
            }
          },
          "connections": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["google", "apple", "x", "discord"]
            }
          },
          "trigger": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "manual"
                  },
                  "input": {
                    "type": "string",
                    "const": "text"
                  },
                  "constraints": {
                    "type": "object",
                    "properties": {
                      "required": {
                        "default": true,
                        "type": "boolean"
                      },
                      "minLength": {
                        "default": 1,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "maxLength": {
                        "default": 10000,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["required", "minLength", "maxLength"]
                  },
                  "actor": {
                    "type": "string",
                    "enum": ["member", "staff"]
                  }
                },
                "required": ["kind", "input", "constraints"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "manual"
                  },
                  "input": {
                    "type": "string",
                    "const": "url"
                  },
                  "constraints": {
                    "type": "object",
                    "properties": {
                      "required": {
                        "default": true,
                        "type": "boolean"
                      },
                      "allowedHosts": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 253
                        }
                      }
                    },
                    "required": ["required"]
                  },
                  "actor": {
                    "type": "string",
                    "enum": ["member", "staff"]
                  }
                },
                "required": ["kind", "input", "constraints"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "manual"
                  },
                  "input": {
                    "type": "string",
                    "enum": ["photo", "quiz", "none"]
                  },
                  "actor": {
                    "type": "string",
                    "enum": ["member", "staff"]
                  }
                },
                "required": ["kind", "input"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "automatic"
                  },
                  "tracker": {
                    "type": "object",
                    "properties": {
                      "tracker": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "pattern": "^[a-zA-Z0-9_-]+$"
                      },
                      "source": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "on": {
                        "type": "string",
                        "enum": [
                          "new-record",
                          "new-observation",
                          "data-changed"
                        ]
                      },
                      "where": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "path": {
                                    "type": "string",
                                    "maxLength": 200,
                                    "pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
                                  },
                                  "equals": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 1000
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      }
                                    ]
                                  }
                                },
                                "required": ["path", "equals"]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "path": {
                                    "type": "string",
                                    "maxLength": 200,
                                    "pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
                                  },
                                  "gt": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "setting": {
                                            "type": "string",
                                            "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                          }
                                        },
                                        "required": ["setting"]
                                      }
                                    ]
                                  },
                                  "gte": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "setting": {
                                            "type": "string",
                                            "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                          }
                                        },
                                        "required": ["setting"]
                                      }
                                    ]
                                  },
                                  "lt": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "setting": {
                                            "type": "string",
                                            "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                          }
                                        },
                                        "required": ["setting"]
                                      }
                                    ]
                                  },
                                  "lte": {
                                    "anyOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "setting": {
                                            "type": "string",
                                            "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                          }
                                        },
                                        "required": ["setting"]
                                      }
                                    ]
                                  }
                                },
                                "required": ["path"]
                              }
                            ]
                          },
                          {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "path": {
                                      "type": "string",
                                      "maxLength": 200,
                                      "pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
                                    },
                                    "equals": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 1000
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["path", "equals"]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "path": {
                                      "type": "string",
                                      "maxLength": 200,
                                      "pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
                                    },
                                    "gt": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "setting": {
                                              "type": "string",
                                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                            }
                                          },
                                          "required": ["setting"]
                                        }
                                      ]
                                    },
                                    "gte": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "setting": {
                                              "type": "string",
                                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                            }
                                          },
                                          "required": ["setting"]
                                        }
                                      ]
                                    },
                                    "lt": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "setting": {
                                              "type": "string",
                                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                            }
                                          },
                                          "required": ["setting"]
                                        }
                                      ]
                                    },
                                    "lte": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "setting": {
                                              "type": "string",
                                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
                                            }
                                          },
                                          "required": ["setting"]
                                        }
                                      ]
                                    }
                                  },
                                  "required": ["path"]
                                }
                              ]
                            }
                          }
                        ]
                      },
                      "beneficiary": {
                        "type": "string",
                        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$"
                      },
                      "enrollment": {
                        "type": "string",
                        "enum": ["none", "required"]
                      },
                      "since": {
                        "type": "string",
                        "enum": ["activation", "window", "enrollment"]
                      },
                      "historical": {
                        "type": "string",
                        "enum": ["staff", "claim", "automatic"]
                      },
                      "content": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "required": ["tracker", "source", "on", "beneficiary"]
                  }
                },
                "required": ["kind"]
              }
            ]
          },
          "availability": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "available"
                  },
                  "input": {
                    "type": "string",
                    "enum": ["photo", "quiz", "none", "text", "url"]
                  }
                },
                "required": ["kind", "input"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "completed"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "locked"
                  },
                  "missing": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "completion"
                            },
                            "quest": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "title": {
                              "type": "string"
                            },
                            "scope": {
                              "type": "string",
                              "const": "ever"
                            }
                          },
                          "required": ["kind", "quest", "title", "scope"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "completion"
                            },
                            "quest": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "title": {
                              "type": "string"
                            },
                            "scope": {
                              "type": "string",
                              "const": "period"
                            },
                            "period": {
                              "type": "string",
                              "enum": ["day", "week", "month"]
                            },
                            "resetsAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "kind",
                            "quest",
                            "title",
                            "scope",
                            "period",
                            "resetsAt"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "balance"
                            },
                            "balance": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "title": {
                              "type": "string"
                            },
                            "minimum": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "current": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "kind",
                            "balance",
                            "title",
                            "minimum",
                            "current"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "group"
                            },
                            "group": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "title": {
                              "type": "string"
                            }
                          },
                          "required": ["kind", "group", "title"]
                        }
                      ]
                    }
                  }
                },
                "required": ["kind", "missing"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "blocked"
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "budget-exhausted",
                      "connection-required",
                      "wallet-required",
                      "paused",
                      "outside-window",
                      "enrollment-required"
                    ]
                  },
                  "window": {
                    "type": "string",
                    "enum": ["tracker", "quest"]
                  },
                  "resetsAt": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["kind", "reason"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "staff-required"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "automatic"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "checking"
                  },
                  "attempt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  }
                },
                "required": ["kind", "attempt"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "needs-review"
                  },
                  "attempt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  }
                },
                "required": ["kind", "attempt"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "retryable"
                  },
                  "attempt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  }
                },
                "required": ["kind", "attempt"]
              }
            ]
          },
          "completed": {
            "type": "boolean"
          },
          "completion": {
            "default": {
              "kind": "once"
            },
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "streak"
                  },
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["kind", "days"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "progress"
                  },
                  "goal": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "count"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["kind", "count"]
                  },
                  "window": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "lifetime"
                          }
                        },
                        "required": ["kind"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "calendar"
                          },
                          "period": {
                            "type": "string",
                            "enum": ["day", "week", "month"]
                          },
                          "latenessMs": {
                            "default": 604800000,
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["kind", "period", "latenessMs"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "rolling"
                          },
                          "durationMs": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["kind", "durationMs"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "repeat": {
                    "default": "once",
                    "type": "string",
                    "enum": ["once", "repeat"]
                  }
                },
                "required": ["kind", "goal", "window", "repeat"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "once"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "keyed"
                  },
                  "across": {
                    "type": "string",
                    "const": "members"
                  }
                },
                "required": ["kind"],
                "additionalProperties": false
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "best": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "today": {
                    "type": "string"
                  },
                  "todayQualified": {
                    "type": "boolean"
                  },
                  "timeZone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "nextBoundary": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "pendingTimeZone": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "timeZone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "effectiveAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["timeZone", "effectiveAt"]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "milestone": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "pending"
                          }
                        },
                        "required": ["status"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "awarded"
                          },
                          "completion": {
                            "type": "string"
                          },
                          "achievedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["status", "completion", "achievedAt"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "budget-exhausted"
                          },
                          "budget": {
                            "type": "string"
                          },
                          "achievedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["status", "budget", "achievedAt"],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "goal",
                  "current",
                  "best",
                  "today",
                  "todayQualified",
                  "timeZone",
                  "nextBoundary",
                  "pendingTimeZone",
                  "milestone"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "counter": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "start": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "end": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": ["key", "start", "end"]
                  },
                  "repeat": {
                    "type": "string",
                    "enum": ["once", "repeat"]
                  },
                  "settled": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "latest": {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              },
                              "ordinal": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "achievedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "window": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "const": "revoked"
                              },
                              "completion": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              },
                              "revokedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "ordinal",
                              "achievedAt",
                              "window",
                              "status",
                              "completion",
                              "revokedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              },
                              "ordinal": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "achievedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "window": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "const": "awarded"
                              },
                              "completion": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              }
                            },
                            "required": [
                              "id",
                              "ordinal",
                              "achievedAt",
                              "window",
                              "status",
                              "completion"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              },
                              "ordinal": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "achievedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "window": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "const": "budget-exhausted"
                              },
                              "budget": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "pattern": "^[a-zA-Z0-9_-]+$"
                              }
                            },
                            "required": [
                              "id",
                              "ordinal",
                              "achievedAt",
                              "window",
                              "status",
                              "budget"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "goal",
                  "current",
                  "window",
                  "repeat",
                  "settled",
                  "latest"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "current": {
                    "type": "number",
                    "minimum": 0
                  },
                  "target": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": ["current", "target", "reason"]
              },
              {
                "type": "null"
              }
            ]
          },
          "completionCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "visibility": {
            "default": "visible",
            "type": "string",
            "enum": ["visible", "hidden"]
          },
          "missing": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "completion"
                    },
                    "quest": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "const": "ever"
                    }
                  },
                  "required": ["kind", "quest", "title", "scope"]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "completion"
                    },
                    "quest": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "const": "period"
                    },
                    "period": {
                      "type": "string",
                      "enum": ["day", "week", "month"]
                    },
                    "resetsAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "kind",
                    "quest",
                    "title",
                    "scope",
                    "period",
                    "resetsAt"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "balance"
                    },
                    "balance": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "minimum": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "current": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": ["kind", "balance", "title", "minimum", "current"]
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "group"
                    },
                    "group": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "title": {
                      "type": "string"
                    }
                  },
                  "required": ["kind", "group", "title"]
                }
              ]
            }
          },
          "campaign": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "until": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["from", "until"]
                  },
                  "enrollment": {
                    "default": "none",
                    "type": "string",
                    "enum": ["none", "required"]
                  },
                  "enrolledAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "withdrawnAt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "withdrawalReason": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "key",
                  "title",
                  "enrollment",
                  "enrolledAt",
                  "withdrawnAt",
                  "withdrawalReason"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "window": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "until": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["from", "until"]
              },
              {
                "type": "null"
              }
            ]
          },
          "budgets": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                },
                "scope": {
                  "type": "string",
                  "enum": ["member", "project"]
                },
                "period": {
                  "type": "string",
                  "enum": ["day", "week", "month", "lifetime"]
                },
                "remaining": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "resetsAt": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["id", "scope", "period", "remaining", "resetsAt"]
            }
          },
          "retryAt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextAvailableAt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "attempt": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "release": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "quest": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "member": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "evidence": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "pattern": "^[a-zA-Z0-9_-]+$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "quiz"
                          },
                          "release": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "pattern": "^[a-zA-Z0-9_-]+$"
                          },
                          "answers": {}
                        },
                        "required": ["kind", "answers"]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "text"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 10000
                          }
                        },
                        "required": ["kind", "value"]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "url"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 2048
                          }
                        },
                        "required": ["kind", "value"]
                      }
                    ]
                  },
                  "status": {
                    "type": "string"
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retries": {
                    "type": "number"
                  },
                  "generation": {
                    "type": "number"
                  },
                  "completion": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reviewRewards": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "default": "points",
                                  "type": "string",
                                  "const": "points"
                                },
                                "balance": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100,
                                  "pattern": "^[a-zA-Z0-9_-]+$"
                                },
                                "amount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": ["kind", "balance", "amount"]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "tier"
                                },
                                "reward": {
                                  "type": "object",
                                  "properties": {
                                    "badge": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100,
                                      "pattern": "^[a-zA-Z0-9_-]+$"
                                    },
                                    "group": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100,
                                      "pattern": "^[a-zA-Z0-9_-]+$"
                                    },
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100,
                                      "pattern": "^[a-zA-Z0-9_-]+$"
                                    },
                                    "title": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "tiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 100,
                                            "pattern": "^[a-zA-Z0-9_-]+$"
                                          },
                                          "title": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          }
                                        },
                                        "required": ["id", "title"]
                                      }
                                    },
                                    "inventory": {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "const": "untracked"
                                        }
                                      },
                                      "required": ["kind"]
                                    },
                                    "fulfillment": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "staff-handover"
                                            }
                                          },
                                          "required": ["kind"],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "const": "automatic"
                                            }
                                          },
                                          "required": ["kind"],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "title",
                                    "tiers",
                                    "inventory",
                                    "fulfillment"
                                  ]
                                },
                                "tier": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100,
                                  "pattern": "^[a-zA-Z0-9_-]+$"
                                }
                              },
                              "required": ["kind", "reward", "tier"]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "integration"
                                },
                                "provider": {
                                  "type": "string",
                                  "const": "discord"
                                },
                                "action": {
                                  "type": "string",
                                  "const": "grant-role"
                                },
                                "roleId": {
                                  "type": "string",
                                  "pattern": "^[0-9]{1,20}$"
                                }
                              },
                              "required": [
                                "kind",
                                "provider",
                                "action",
                                "roleId"
                              ]
                            }
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluationRun": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "deferCount": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "deferUntil": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nextEvaluationAt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "code": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "codeSource": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "progress": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "current": {
                            "type": "number",
                            "minimum": 0
                          },
                          "target": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          }
                        },
                        "required": ["current", "target", "reason"]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requestedReview": {
                    "default": false,
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "release",
                  "quest",
                  "member",
                  "evidence",
                  "status",
                  "reason",
                  "retries",
                  "generation",
                  "completion",
                  "reviewRewards",
                  "evaluationRun",
                  "deferCount",
                  "deferUntil",
                  "nextEvaluationAt",
                  "code",
                  "progress",
                  "requestedReview",
                  "createdAt"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "quest",
          "title",
          "presentation",
          "connections",
          "trigger",
          "availability",
          "completed",
          "completion",
          "progress",
          "completionCount",
          "visibility",
          "missing",
          "campaign",
          "window",
          "budgets",
          "attempt"
        ]
      }
    },
    "attempts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "release": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "quest": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "member": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]+$"
          },
          "evidence": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "input": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "quiz"
                  },
                  "release": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-zA-Z0-9_-]+$"
                  },
                  "answers": {}
                },
                "required": ["kind", "answers"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "text"
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 10000
                  }
                },
                "required": ["kind", "value"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "url"
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": ["kind", "value"]
              }
            ]
          },
          "status": {
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retries": {
            "type": "number"
          },
          "generation": {
            "type": "number"
          },
          "completion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewRewards": {
            "default": null,
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "default": "points",
                          "type": "string",
                          "const": "points"
                        },
                        "balance": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "pattern": "^[a-zA-Z0-9_-]+$"
                        },
                        "amount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": ["kind", "balance", "amount"]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "tier"
                        },
                        "reward": {
                          "type": "object",
                          "properties": {
                            "badge": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "group": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "tiers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100,
                                    "pattern": "^[a-zA-Z0-9_-]+$"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  }
                                },
                                "required": ["id", "title"]
                              }
                            },
                            "inventory": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "untracked"
                                }
                              },
                              "required": ["kind"]
                            },
                            "fulfillment": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "staff-handover"
                                    }
                                  },
                                  "required": ["kind"],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  },
                                  "required": ["kind"],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "tiers",
                            "inventory",
                            "fulfillment"
                          ]
                        },
                        "tier": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "pattern": "^[a-zA-Z0-9_-]+$"
                        }
                      },
                      "required": ["kind", "reward", "tier"]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "integration"
                        },
                        "provider": {
                          "type": "string",
                          "const": "discord"
                        },
                        "action": {
                          "type": "string",
                          "const": "grant-role"
                        },
                        "roleId": {
                          "type": "string",
                          "pattern": "^[0-9]{1,20}$"
                        }
                      },
                      "required": ["kind", "provider", "action", "roleId"]
                    }
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "evaluationRun": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "deferCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "deferUntil": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "nextEvaluationAt": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "codeSource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "current": {
                    "type": "number",
                    "minimum": 0
                  },
                  "target": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": ["current", "target", "reason"]
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedReview": {
            "default": false,
            "type": "boolean"
          },
          "createdAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "release",
          "quest",
          "member",
          "evidence",
          "status",
          "reason",
          "retries",
          "generation",
          "completion",
          "reviewRewards",
          "evaluationRun",
          "deferCount",
          "deferUntil",
          "nextEvaluationAt",
          "code",
          "progress",
          "requestedReview",
          "createdAt"
        ]
      }
    },
    "balances": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "member": {
            "type": "string"
          },
          "balance": {
            "type": "string"
          },
          "earned": {
            "type": "number"
          },
          "held": {
            "type": "number"
          },
          "available": {
            "type": "number"
          }
        },
        "required": ["member", "balance", "earned", "held", "available"]
      }
    }
  },
  "required": ["member", "quests", "attempts", "balances"]
}
