omniarena-nurvus-shared 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/battle.d.ts CHANGED
@@ -77,6 +77,7 @@ export type SkillDto = {
77
77
  };
78
78
  export type EffectDto = {
79
79
  id: string;
80
+ isTrace?: boolean;
80
81
  skillId: string;
81
82
  userId: number;
82
83
  description: string;
package/dist/common.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type UserRole = 'user' | 'admin' | 'tester' | 'mod' | 'bot' | 'bot_easiest' | 'bot_easy' | 'bot_medium' | 'bot_hard' | 'bot_hardest' | 'skin_maker';
2
2
  export type BattleMode = 'ranked' | 'casual' | 'private';
3
- export type BattleEndReason = 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error';
3
+ export type BattleEndReason = 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error' | 'invalid_turn';
4
4
  export type UserHeaderDto = {
5
5
  id: string;
6
6
  username: string;
package/dist/rewards.d.ts CHANGED
@@ -24,6 +24,9 @@ export type RewardSnapshotDto = {
24
24
  nextResetAt: string;
25
25
  leavesPerBranch: number;
26
26
  shardsPerBranch: number;
27
+ fullShardsPerBranch?: number;
28
+ fullRewardBranchesPerDay?: number;
29
+ reducedShardsPerBranch?: number;
27
30
  bonusPerDay: number;
28
31
  };
29
32
  export type DailyRerollResponse = {
package/dist/socket.d.ts CHANGED
@@ -3,6 +3,12 @@ import type { UserHeaderDto } from './common.js';
3
3
  import type { ActionData } from './engine.js';
4
4
  export type ChallengeDenyReason = 'declined' | 'busy' | 'offline' | 'expired' | 'withdrawn';
5
5
  export type BotDifficulty = 'easiest' | 'easy' | 'medium' | 'hard' | 'hardest';
6
+ export type BattleOutcome = {
7
+ battleId: string;
8
+ winner: string;
9
+ reason: BattleEndReason;
10
+ error?: string;
11
+ };
6
12
  export type ClientToServerEvents = {
7
13
  team_changed: (members: number[]) => void;
8
14
  search: (mode: BattleMode, opponent?: string) => void;
@@ -18,7 +24,8 @@ export type ClientToServerEvents = {
18
24
  deny_challenge: (challengerId: string) => void;
19
25
  };
20
26
  export type ServerToClientEvents = {
21
- connexion_established: (inBattle: boolean) => void;
27
+ connexion_established: (inBattle: boolean, outcome?: BattleOutcome) => void;
28
+ connection_refused: (reason: 'practice_account_busy') => void;
22
29
  timer_started: () => void;
23
30
  timer_resumed: (durationLeft: number) => void;
24
31
  turn_received: () => void;
package/dist/users.d.ts CHANGED
@@ -3,6 +3,8 @@ export type RewardState = {
3
3
  leaves: number;
4
4
  bonus: number;
5
5
  branchesCompleted: number;
6
+ /** UTC-day count; absent on legacy reward JSON until its next reward/reset. */
7
+ branchesCompletedToday?: number;
6
8
  };
7
9
  export type UserDto = {
8
10
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniarena-nurvus-shared",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "type": "module",
5
5
  "description": "Shared contract types for OmniArena (nurvus slice). Type-only, zero dependencies.",
6
6
  "types": "./dist/index.d.ts",