Dev-only backend for the Fishing minigame admin dashboard.

Every method here requires a developer account — the routes check the caller against the developer list and return 403 otherwise, so these are not merely "admin" in the guild-owner sense.

Endpoints live under /admin/minigames/fishing/*. The minigames segment is deliberate: Fishing is the first minigame, not the only one, so a second game slots in beside it rather than replacing it.

Constructors

Methods

  • Grant (positive delta) or revoke (negative delta) coins.

    A revoke clamps at zero. A negative balance silently blocks every future purchase with no explanation the player can act on, and support would have to undo it by hand.

    Parameters

    • __namedParameters: {
          auth: string;
          delta: number;
          guildId: string;
          reason?: string;
          userId: string;
      }
      • auth: string
      • delta: number
      • guildId: string
      • Optionalreason?: string
      • userId: string

    Returns Promise<WebResponse<FishingCoinAdjustment>>

  • Lift enforcement from a player.

    This is the "undo" for a false positive, and it is separate from updateAbuseFlag: marking a flag reviewed says a human looked at the RECORD, and does not touch the live state that is still throttling the player. Both are usually wanted together.

    Audited with the previous level, since the state is gone afterwards by definition. cleared is false when there was nothing to lift, which is a no-op rather than an error.

    Parameters

    • __namedParameters: {
          auth: string;
          reason?: string;
          userId: string;
      }
      • auth: string
      • Optionalreason?: string
      • userId: string

    Returns Promise<WebResponse<FishingEnforcementCleared>>

  • Subtract what a range of flush batches awarded, clamped at zero.

    This is not an undo — deltas are not invertible once superseded (earn 500, buy a 500-coin rod, undo, and the balance goes negative while they keep the rod). It reads what those batches actually applied and reverses that much.

    Dry-run unless apply is true. Each subtraction is idempotent per player per range, so a retried apply cannot double-charge.

    Parameters

    • __namedParameters: {
          apply?: boolean;
          auth: string;
          fromBatchId: string;
          reason?: string;
          toBatchId: string;
      }
      • Optionalapply?: boolean
      • auth: string
      • fromBatchId: string
      • Optionalreason?: string
      • toBatchId: string

    Returns Promise<WebResponse<FishingCompensation>>

  • Abuse review queue.

    A queue of things for a HUMAN to look at, never a list of confirmed cheats. Detection runs against an economy with no live data, so its false positives are disproportionately legitimate heavy players — the most engaged users in the feature. Nothing here bans, and there is deliberately no bulk action: confirmed abuse is actioned through resetTarget, adjustPlayerCoins or setKill, each of which writes an audit row.

    Defaults to PENDING flags, ordered most-severe-first.

    Parameters

    Returns Promise<WebResponse<FishingAbuseQueue>>

  • A player's current enforcement, and how long is left on it.

    Enforcement is live state rather than a record: throttle lengthens their cast cooldown and silentNoop makes casts do nothing. It is set by the integrity sweep and expires on its own, so expiresInSeconds is the half that decides whether to intervene - "throttled" without "for another 40 minutes" is not actionable.

    allow means no enforcement, and expiresInSeconds is null then. There is no ban level.

    Parameters

    • __namedParameters: {
          auth: string;
          userId: string;
      }
      • auth: string
      • userId: string

    Returns Promise<WebResponse<FishingEnforcementState>>

  • Reset a player's server stats, their global progression, a guild's dock, or a guild's economy.

    claimedSets and claimedMilestones are preserved unless alsoClearClaims is set. They record what a player was already paid for — clearing them makes every milestone and collection pay out a second time as the counters climb back, so "please reset me" becomes a faucet. Setting the flag is audited as its own action. A dock reset likewise preserves prestige.

    Parameters

    • __namedParameters: {
          alsoClearClaims?: boolean;
          auth: string;
          guildId?: string;
          reason?: string;
          scope: FishingResetScope;
          userId?: string;
      }
      • OptionalalsoClearClaims?: boolean
      • auth: string
      • OptionalguildId?: string
      • Optionalreason?: string
      • scope: FishingResetScope
      • OptionaluserId?: string

    Returns Promise<WebResponse<FishingResetResult>>

  • Set a dial, or pass value: null to reset it to its seeded default.

    Out-of-range values are rejected with a 400, not clamped — an operator who typed 500 should learn it did not take rather than quietly getting 3.

    Parameters

    • __namedParameters: {
          auth: string;
          dial: FishingDialName;
          reason?: string;
          value: null | number;
      }
      • auth: string
      • dial: FishingDialName
      • Optionalreason?: string
      • value: null | number

    Returns Promise<WebResponse<FishingDialResult>>

  • Throw or clear a kill switch.

    scope is either a subsystem (cast, sell, boss, …) or a single target (guild:<id> / user:<id>). A kill stops INGESTION only — the flush keeps draining, so throwing a switch mid incident does not destroy a window of every active player's progress.

    Parameters

    • __namedParameters: {
          auth: string;
          on: boolean;
          reason?: string;
          scope: string & {} | FishingKillScope;
      }
      • auth: string
      • on: boolean
      • Optionalreason?: string
      • scope: string & {} | FishingKillScope

    Returns Promise<WebResponse<FishingKillResult>>

  • Set the percentage dial.

    0 is the fleet-wide kill switch — the fastest way to stop fishing everywhere without a deploy. It stops ingestion only; the flush keeps draining so nobody's unflushed progress is lost.

    Parameters

    • __namedParameters: {
          auth: string;
          percent: number;
      }
      • auth: string
      • percent: number

    Returns Promise<WebResponse<FishingRollout>>

  • Mark a flag reviewed, or reopen one.

    Pass reviewed: false to reopen — a reviewer who dismisses the wrong row otherwise has no way back, because the queue's day-grained dedupe key stops the same condition re-raising it.

    Reviewing is also what makes retention work: reviewed flags age out after 30 days, unreviewed ones after 90.

    Parameters

    • __namedParameters: {
          auth: string;
          flagId: string;
          reason?: string;
          reviewed?: boolean;
      }
      • auth: string
      • flagId: string
      • Optionalreason?: string
      • Optionalreviewed?: boolean

    Returns Promise<WebResponse<FishingAbuseFlag>>

  • Create or update one content row (upsert — one verb, not two).

    For dateDerived tables the change does not apply today: effectiveFrom in the response is the next 00:00 UTC. Daily demand, the shop rotation and the quest board are a date-seeded shuffle over the content list, so editing it mid-day would reshuffle a day players already acted on.

    Type Parameters

    Parameters

    • __namedParameters: {
          auth: string;
          data: Record<string, unknown>;
          id: string | number;
          reason?: string;
          table: FishingContentTable;
      }

    Returns Promise<WebResponse<FishingContentWrite<T>>>