omniarena-nurvus-shared 0.43.0 → 0.47.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/achievements.d.ts +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/lobby.d.ts +21 -0
- package/dist/socket.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type AchievementRequirementType = 'perfect_wins' | 'skin_users' | 'mono_energy_wins';
|
|
2
|
+
export type AchievementRequirement = {
|
|
3
|
+
type: AchievementRequirementType;
|
|
4
|
+
};
|
|
5
|
+
export type AchievementTier = {
|
|
6
|
+
target: number;
|
|
7
|
+
shards: number;
|
|
8
|
+
};
|
|
9
|
+
export type AchievementDto = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
/** lucide:<frontend registry key> or asset:<image path/URL>. */
|
|
14
|
+
icon: string;
|
|
15
|
+
requirement: AchievementRequirement;
|
|
16
|
+
tiers: AchievementTier[];
|
|
17
|
+
};
|
|
18
|
+
export type UserAchievementDto = AchievementDto & {
|
|
19
|
+
progress: number;
|
|
20
|
+
/** Highest permanently unlocked/rewarded tier; zero means locked. */
|
|
21
|
+
tier: number;
|
|
22
|
+
};
|
|
23
|
+
export type AchievementSnapshotDto = {
|
|
24
|
+
achievements: UserAchievementDto[];
|
|
25
|
+
shards: number;
|
|
26
|
+
};
|
|
27
|
+
export type AchievementBadgeDto = Pick<AchievementDto, 'id' | 'name' | 'description' | 'icon'> & {
|
|
28
|
+
tier: number;
|
|
29
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/lobby.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { UserHeaderDto } from './common.js';
|
|
2
|
+
export type LobbyEmoji = '👍' | '❤️' | '😂' | '🎉' | '😮' | '😢';
|
|
3
|
+
export type LobbyReactionDto = {
|
|
4
|
+
emoji: LobbyEmoji;
|
|
5
|
+
count: number;
|
|
6
|
+
reactedByYou: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type LobbyMessageDto = {
|
|
9
|
+
id: string;
|
|
10
|
+
author: UserHeaderDto;
|
|
11
|
+
content: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
reactions: LobbyReactionDto[];
|
|
14
|
+
};
|
|
15
|
+
export type LobbyHistoryDto = {
|
|
16
|
+
messages: LobbyMessageDto[];
|
|
17
|
+
nextCursor: string | null;
|
|
18
|
+
cutoff: string;
|
|
19
|
+
emojis: LobbyEmoji[];
|
|
20
|
+
maxMessageLength: number;
|
|
21
|
+
};
|
package/dist/socket.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BattleEndReason, BattleMode } from './common.js';
|
|
2
2
|
import type { UserHeaderDto } from './common.js';
|
|
3
3
|
import type { ActionData } from './engine.js';
|
|
4
|
+
import type { LobbyMessageDto } from './lobby.js';
|
|
4
5
|
export type ChallengeDenyReason = 'declined' | 'busy' | 'offline' | 'expired' | 'withdrawn';
|
|
5
6
|
export type BotDifficulty = 'easiest' | 'easy' | 'medium' | 'hard' | 'hardest';
|
|
6
7
|
export type BattleOutcome = {
|
|
@@ -24,6 +25,10 @@ export type ClientToServerEvents = {
|
|
|
24
25
|
deny_challenge: (challengerId: string) => void;
|
|
25
26
|
};
|
|
26
27
|
export type ServerToClientEvents = {
|
|
28
|
+
/** Lobby namespace only: reaction/retention changes require a viewer-specific refresh. */
|
|
29
|
+
lobby_changed: () => void;
|
|
30
|
+
/** Lobby namespace only: a newly committed message, with initially empty reactions. */
|
|
31
|
+
lobby_message: (message: LobbyMessageDto) => void;
|
|
27
32
|
connexion_established: (inBattle: boolean, outcome?: BattleOutcome) => void;
|
|
28
33
|
connection_refused: (reason: 'practice_account_busy') => void;
|
|
29
34
|
timer_started: () => void;
|