Skip to content

Commit dc22bc7

Browse files
chore(develop): sync types to dmgincs/nestjs-api
1 parent 9430961 commit dc22bc7

5 files changed

Lines changed: 107 additions & 1 deletion

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { ActivityTiers } from '~/constants/ActivityTiers';
2+
3+
export class GetActivityTierResponseDto {
4+
/** Your current activity tier */
5+
current_tier: ActivityTiers;
6+
7+
/** Your previous activity tier */
8+
previous_tier: ActivityTiers;
9+
10+
/** Your current total XP */
11+
current_xp: number;
12+
13+
/** Total XP you need to reach your previous tier; null if your tier is the same or higher */
14+
xp_needed_previous_tier: number | null;
15+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* eslint-disable max-classes-per-file */
2+
3+
class GetAllActivityTiersTier {
4+
/** Activity tier name */
5+
name: string;
6+
7+
/** XP needed to reach this activity tier */
8+
xp_needed: number;
9+
10+
/** The color associated with this activity tier */
11+
color: string;
12+
13+
/** The benefits associated with this activity tier */
14+
benefits: string[];
15+
}
16+
17+
export class GetAllActivityTiersResponseDto {
18+
/** All activity tiers */
19+
data: GetAllActivityTiersTier[];
20+
}

src/common/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ export * from './UnlinkMinecraftRequest';
4444
export * from './UpdateDiscordRolesRequest';
4545
export * from './UpdateMobileSettingsRequest';
4646
export * from './GetHostsTopFiveResponse';
47+
export * from './GetActivityTierResponse';
48+
export * from './GetAllActivityTiersResponse';

src/constants/ActivityTiers.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
export enum ActivityTiers {
2+
INACTIVE = 'Inactive',
3+
AFK_GAMER = 'AFK Gamer',
4+
CASUAL_CHAMPION = 'Casual Champion',
5+
TRYHARD = 'Tryhard',
6+
HARDCORE_GAMER = 'Hardcore Gamer',
7+
GIGACHAD_GAMER = 'GigaChad Gamer'
8+
}
9+
10+
export const ACTIVITY_TIERS_ORDERED = [
11+
ActivityTiers.GIGACHAD_GAMER,
12+
ActivityTiers.HARDCORE_GAMER,
13+
ActivityTiers.TRYHARD,
14+
ActivityTiers.CASUAL_CHAMPION,
15+
ActivityTiers.AFK_GAMER,
16+
ActivityTiers.INACTIVE
17+
] as const;
18+
19+
export interface ActivityTierData {
20+
name: ActivityTiers;
21+
xp_needed: number;
22+
color: string;
23+
benefits: string[];
24+
}
25+
26+
export const ACTIVITY_TIERS_DATA: Record<ActivityTiers, ActivityTierData> = {
27+
[ActivityTiers.GIGACHAD_GAMER]: {
28+
name: ActivityTiers.GIGACHAD_GAMER,
29+
xp_needed: 2000,
30+
color: '#6B3074',
31+
benefits: ['Special item', 'Special color']
32+
},
33+
[ActivityTiers.HARDCORE_GAMER]: {
34+
name: ActivityTiers.HARDCORE_GAMER,
35+
xp_needed: 1000,
36+
color: '#7268A6',
37+
benefits: ['Special item', 'Special color']
38+
},
39+
[ActivityTiers.TRYHARD]: {
40+
name: ActivityTiers.TRYHARD,
41+
xp_needed: 250,
42+
color: '#86A3C3',
43+
benefits: ['L4+ positions', 'Voice channel commands (without BP)']
44+
},
45+
[ActivityTiers.CASUAL_CHAMPION]: {
46+
name: ActivityTiers.CASUAL_CHAMPION,
47+
xp_needed: 100,
48+
color: '#19B8A6',
49+
benefits: ['EHL eligibility']
50+
},
51+
[ActivityTiers.AFK_GAMER]: {
52+
name: ActivityTiers.AFK_GAMER,
53+
xp_needed: 1,
54+
color: '#D8E0BB',
55+
benefits: [
56+
'Attending events',
57+
'Access to channels',
58+
'Item system'
59+
]
60+
},
61+
[ActivityTiers.INACTIVE]: {
62+
name: ActivityTiers.INACTIVE,
63+
xp_needed: 0,
64+
color: '#B7B7B7',
65+
benefits: []
66+
}
67+
};

src/types/admin/PermissionObjectNames.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// 019 = 25 (DEC) = SELF
88
// 2 = 2 (DEC) = CREATE
99

10-
// Last inserted permission enum value = 122
10+
// Last inserted permission enum value = 124
1111
// PLEASE UPDATE THIS IF YOU ADD A PERMISSION
1212

1313
export enum PermissionObjectNames {
@@ -85,6 +85,7 @@ export enum PermissionObjectNames {
8585
RPG__ITEMS__HISTORY = 62,
8686
RPG__LEVELS = 63,
8787
RPG__REPSHOP = 64,
88+
RPG__ACTIVITY_TIERS = 123,
8889
RPG__REPSHOP__DAILY__ITEM__PRESTIGE = 110,
8990
RPG__REPSHOP__DAILY__ITEM__PREMIUM = 111,
9091
RPG__REPSHOP__DAILY__ITEM__PREFERRED = 112,
@@ -100,6 +101,7 @@ export enum PermissionObjectNames {
100101
SELF__RPG__ITEMS = 69,
101102
SELF__RPG__LEVELS = 70,
102103
SELF__RPG__PERK = 71,
104+
SELF__RPG__ACTIVITY_TIERS = 124,
103105

104106
// ADMIN
105107
ADMIN__LOGS = 80,

0 commit comments

Comments
 (0)