@oxyfoo/gamelife-types 2.2.9 → 2.2.11

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.
@@ -12,6 +12,7 @@ import { ReportType } from '../../Data/App/Reports.js';
12
12
  import { DailyQuestData } from '../../Data/User/DailyQuest.js';
13
13
  import { AvatarObject } from '../../Data/User/Inventory.js';
14
14
  import { Rarities } from '../../Global/Rarities.js';
15
+ import { LeaderboardPeriodType, LeaderboardUpdateData } from './Request_Types.js';
15
16
  export interface ClientRequestHandshake {
16
17
  action: 'handshake';
17
18
  appVersion: string;
@@ -172,6 +173,7 @@ export interface ClientRequestSaveActivities {
172
173
  xp: number;
173
174
  stats: StatsXP;
174
175
  token: number;
176
+ leaderboardUpdates?: LeaderboardUpdateData[];
175
177
  callbackID?: string;
176
178
  }
177
179
  export interface ClientRequestGetAchievements {
@@ -339,6 +341,7 @@ export interface ClientRequestUnblockFriend {
339
341
  }
340
342
  export interface ClientRequestGetLeaderboard {
341
343
  action: 'get-leaderboard';
344
+ periodType?: LeaderboardPeriodType;
342
345
  callbackID?: string;
343
346
  }
344
347
  export interface ClientRequestGetShop {
@@ -13,10 +13,11 @@ import { DailyQuestData } from '../../Data/User/DailyQuest.js';
13
13
  import { MissionItem } from '../../Data/User/Missions.js';
14
14
  import { Friend, UserOnline } from '../../Data/User/Multiplayer.js';
15
15
  import { NotificationInApp, NotificationInAppDataType } from '../../Class/NotificationsInApp.js';
16
- import { LeaderboardPlayer, ShopChestStats } from './Request_Types.js';
16
+ import { LeaderboardPeriodType, LeaderboardPlayer, ShopChestStats } from './Request_Types.js';
17
17
  export interface ServerRequestHandshake {
18
18
  status: 'handshake';
19
- result: 'ok' | 'maintenance' | 'update' | 'update-optional' | 'downdate' | 'error';
19
+ result: 'ok' | 'update' | 'update-optional' | 'downdate' | 'error';
20
+ maintenance: boolean;
20
21
  serverVersion?: string;
21
22
  callbackID?: string;
22
23
  }
@@ -395,7 +396,8 @@ export interface ServerRequestGetLeaderboard {
395
396
  result: 'error' | {
396
397
  players: LeaderboardPlayer[];
397
398
  self: LeaderboardPlayer | null;
398
- weekStart: number;
399
+ periodType: LeaderboardPeriodType;
400
+ periodStart: number;
399
401
  };
400
402
  callbackID?: string;
401
403
  }
@@ -4,12 +4,22 @@ export type ConnectionState = 'idle' | 'connecting' | 'connected' | 'disconnecte
4
4
  export type ServerStatus = 'offline' | 'ok' | 'free' | 'waitMailConfirmation' | 'newDevice' | 'remDevice' | 'maintenance' | 'update' | 'downdate' | 'limitDevice' | 'error';
5
5
  export type LoginStatus = 'ok' | 'free' | 'waitMailConfirmation' | 'newDevice' | 'remDevice' | 'limitDevice' | 'error';
6
6
  export type SigninStatus = 'ok' | 'pseudoUsed' | 'pseudoIncorrect' | 'limitAccount' | 'error';
7
+ export type LeaderboardPeriodType = 'weekly' | 'monthly' | 'yearly';
8
+ export interface LeaderboardUpdateData {
9
+ periodType: LeaderboardPeriodType;
10
+ periodStart: number;
11
+ xp: number;
12
+ activities: number;
13
+ time: number;
14
+ }
7
15
  export interface LeaderboardPlayer {
8
16
  rank: number;
9
17
  accountID: number;
10
18
  username: string;
11
19
  title: number;
12
- weeklyXP: number;
20
+ totalXP: number;
21
+ totalActivities: number;
22
+ totalTime: number;
13
23
  avatar: {
14
24
  Skin: AvatarName;
15
25
  SkinColor: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyfoo/gamelife-types",
3
- "version": "2.2.9",
3
+ "version": "2.2.11",
4
4
  "description": "GameLife Types - TypeScript types for the GameLife project.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",