import "core-js/stable/atob"; import { Item, Monster } from "kolmafia"; export interface Rank { name: string; degree: number; id: number; } export declare class Clan { readonly id: number; readonly name: string; private static _join; private static _withStash; /** * Join a clan * * @param clanIdOrName Clan id or name * @returns Instance of joined clan */ static join(clanIdOrName: string | number): Clan; /** * Execute callback as a member of a clan and then restore prior membership * * @param clanIdOrName Clan id or name * @param callback Actions to carry out while member of specified can * @returns Return value from callback */ static with(clanIdOrName: string | number, callback: (clan: Clan) => T): T; /** * Execute callback with items from a clan stash * and then restore those items to the stash * * During the execution of the callback, player will not be in the stash clan * * @param clanIdOrName Clan id or name */ static withStash(clanIdOrName: string | number, items: Item[], callback: (borrowedItems: Item[]) => T): T; static withStash(clanIdOrName: string | number, items: Map, callback: (borrowedItems: Map) => T): T; /** * Get the player's current clan * * @returns Player's clan */ static get(): Clan; /** * Get list of clans to which the player is whitelisted * * @returns List of clans */ static getWhitelisted(): Clan[]; private constructor(); private _check; /** * Join clan * * @returns Joined clan */ join(): Clan; /** * Check that this clan is the player's current clan * * @returns Whether this is the current clan */ check(): boolean; /** * Determine the monster that is currently in the current clan's fax machine if any * * @returns The current fax monster */ getCurrentFax(): Monster | null; /** * List available ranks (name, degree and id) from the current clan * * @returns List of ranks */ getRanks(): Rank[]; /** * Add a player to the current clan's whitelist. * If the player is already in the whitelist this will change their rank or title. * * @param player Player id or name * @param rankName Rank to give the player. If not provided they will be given the lowest rank * @param title Title to give the player. If not provided, will be blank * @returns Success */ addPlayerToWhitelist(player: string | number, rankName?: string, title?: string): boolean; /** * Remove a player from the current clan's whitelist * * @param player Player id or name * @returns Success */ removePlayerFromWhitelist(player: string | number): boolean; /** * Return the amount of meat in the current clan's coffer * * @returns Amount of meat */ getMeatInCoffer(): number; /** * Add the given amount of meat to the current clan's coffer. * * @param amount Amount of meat to put in coffer * @returns Success */ putMeatInCoffer(amount: number): boolean; /** * Take items from the stash * * This function will also take equivalent foldables if the original item cannot be found * * @param items Items to take * @returns Items successfully taken */ take(items: Item[]): Item[]; take(items: Map): Map; /** * Put items in the stash * * @param items Items to put in the stash * @returns Items successfully put in the stash */ put(items: Item[]): Item[]; put(items: Map): Map; /** * Return the monster that is currently in the current clan's fax machine if any */ withStash(items: Item[], callback: (borrowedItems: Item[]) => T): T; withStash(items: Map, callback: (borrowedItems: Map) => T): T; }