JavaScript / TypeScript
TypeScript
Every response type is exported with the name of its schema in the API contract (Character, HighscorePage, GuildDetail, ...), as are the option types (UmanthirOptions, RequestOptions, HighscoreListOptions, ...). Filters only accept the values the API knows:
ts
import type { Character, HighscoreListOptions } from "@umanthir/sdk";
const filters: HighscoreListOptions = { vocation: "sorcerers", category: "magiclevel" };
// { vocation: "wizards" } is a compile error.API_CONTRACT_VERSION holds the version of the API contract the types were generated from.
Next: Compatibility.