import { FirebotUser } from "./user-db"; type CurrencyAdjustType = "set" | "adjust"; type Currency = { id: string; name: string; active: boolean; limit: number; transfer: "Allow" | "Disallow"; interval: number; payout: number; /** Offline payout */ offline: number; /** Maps user role IDs to the amount of bonus payout they receive. */ bonus: Record; }; export type CurrencyDB = { adjustCurrencyForUser: ( username: string, currencyId: string, value: number, adjustType?: CurrencyAdjustType ) => Promise; addCurrencyToOnlineUsers: ( currencyId: string, value: string, ignoreDisposable?: boolean, adjustType?: CurrencyAdjustType ) => Promise; getUserCurrencyAmount: ( username: string, currencyId: string ) => Promise; purgeCurrencyById: (currencyId: string) => void; refreshCurrencyCache: () => void; getCurrencies: () => Array; getCurrencyById: (currencyId: string) => Currency | undefined; getCurrencyByName: (currencyName: string) => Currency | undefined; addCurrencyToUserGroupOnlineUsers: ( roleIds: Array, currencyId: string, value: string, ignoreDisposable?: boolean, adjustType?: CurrencyAdjustType ) => Promise; isViewerDBOn: () => boolean; getTopCurrencyHolders: ( currencyId: string, count: number ) => Promise>; getTopCurrencyPosition: ( currencyId: string, position?: number ) => Promise; };