import { type KitBlueprint, type KitOwnerIdKind, type KitTrustedAuthority } from './core.js'; /** An event-driven quest advance: bump matching QuestProgress rows on a model event. */ export interface QuestAdvanceSpec { /** Automation name (unique per app), e.g. `'advance-on-craft'`. */ name: string; /** Only progress rows of this quest advance. */ questId: string; /** The gameplay event that advances the quest (e.g. `consume_stack` invoked). */ onEvent: 'function_invoked' | 'property_changed' | 'container_created'; functionName?: string; containerTypeName?: string; propertyKey?: string; /** * `property_changed` only: which writes advance the quest. Kit progress * properties are written by functions (`advance_quest`, the daily reset), * not by client `setProperty` calls, so watching one needs `'function'` or * `'any'` — the default `'direct'` would never match. */ writeSource?: 'direct' | 'function' | 'any'; debounceMs?: number; /** Progress added per event. Defaults to 1. */ amount?: number; /** Progress rows advanced per event. Defaults to 8. */ maxTargets?: number; } /** Options for {@link questsBlueprint}. */ export interface QuestsBlueprintOptions { /** Prefix for the type/function names. Defaults to none. */ typePrefix?: string; /** * Who may advance quest progress. Defaults to `'server'`; use * `'automation'` when driving progress purely through `advanceOn` event * automations. Never plain players — they would complete their own quests. */ advanceAuthority?: KitTrustedAuthority; /** * The wallet currency property that `claim_reward` pays `reward_gold` * into. Defaults to `'gold'` (compose with the economy blueprint's * wallet). */ currencyProperty?: string; /** Cron for the daily reset automation. Defaults to `'0 0 * * *'` (UTC midnight). */ dailyResetCron?: string; /** Event automations that advance quests from gameplay functions. */ advanceOn?: QuestAdvanceSpec[]; /** Owner-mirror typing (see the kit convention). Defaults to `'int'`. */ ownerIdKind?: KitOwnerIdKind; } /** Names derived by {@link questsBlueprint} for a given prefix. */ export interface QuestsNames { defType: string; progressType: string; advanceFn: string; claimFn: string; resetFn: string; dailyResetAutomation: string; } /** Compute the type/function names a quests blueprint (and its runtime helper) uses. */ export declare function questsNames(typePrefix?: string): QuestsNames; /** * Blueprint for **quests**: an admin `QuestDef` catalog (objective count + * reward spec + daily flag) and per-player `QuestProgress` rows. Progress * advances through trusted calls or event automations on your gameplay * functions; `claim_reward` marks the progress claimed AND grants the item * and currency rewards through `container_ref` params in ONE transaction * (composing with the inventory stack and economy wallet types); a **cron * automation** resets daily quests at midnight. * * Runtime counterpart: `client.kit(appId).quests`. */ export declare function questsBlueprint(options?: QuestsBlueprintOptions): KitBlueprint; //# sourceMappingURL=quests.d.ts.map