omniarena-types 1.66.0 → 1.68.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +20 -22
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -272,38 +272,22 @@ export type UpdateProfileData = {
272
272
  };
273
273
  export type SentMessageDto = {
274
274
  id: string;
275
- recipient: {
276
- id: string;
277
- username: string;
278
- displayName: string;
279
- };
275
+ recipient: UserHeaderDto;
280
276
  title: string;
281
277
  createdAt: Date;
282
278
  read: boolean;
283
279
  };
284
280
  export type ReceivedMessageDto = {
285
281
  id: string;
286
- sender: {
287
- id: string;
288
- username: string;
289
- displayName: string;
290
- } | null;
282
+ sender: UserHeaderDto | null;
291
283
  title: string;
292
284
  createdAt: Date;
293
285
  read: boolean;
294
286
  };
295
287
  export type MessageDto = {
296
288
  id: string;
297
- sender: {
298
- id: string;
299
- username: string;
300
- displayName: string;
301
- } | null;
302
- recipient: {
303
- id: string;
304
- username: string;
305
- displayName: string;
306
- };
289
+ sender: UserHeaderDto | null;
290
+ recipient: UserHeaderDto;
307
291
  title: string;
308
292
  content: string;
309
293
  createdAt: Date;
@@ -325,10 +309,12 @@ export type PostDto = {
325
309
  dislikes: number;
326
310
  reaction: -1 | 1 | null;
327
311
  };
312
+ export type BattleMode = 'ranked' | 'casual' | 'private';
313
+ export type BattleEndReason = 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error';
328
314
  export type BattleHistoryDto = {
329
315
  id: string;
330
- mode: 'ranked' | 'casual' | 'private';
331
- endReason: 'opponent_defeated' | 'opponent_surrendered' | 'opponent_left' | 'error';
316
+ mode: BattleMode;
317
+ endReason: BattleEndReason;
332
318
  winnerId: string;
333
319
  loserId: string;
334
320
  createdAt: Date;
@@ -343,6 +329,18 @@ export type BattleHistoryPlayerDto = {
343
329
  eloBefore: number;
344
330
  eloAfter: number;
345
331
  };
332
+ export type BattleSummaryDto = {
333
+ id: string;
334
+ mode: BattleMode;
335
+ endReason: BattleEndReason;
336
+ winnerId: string;
337
+ loserId: string;
338
+ createdAt: Date;
339
+ player1Team: number[];
340
+ player2Team: number[];
341
+ player1: UserHeaderDto;
342
+ player2: UserHeaderDto;
343
+ };
346
344
  export type LeaderboardEntryDto = {
347
345
  id: string;
348
346
  username: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniarena-types",
3
- "version": "1.66.0",
3
+ "version": "1.68.0",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [