Skip to content

Commit 4ccc73d

Browse files
chore(develop): sync types to dmgincs/nestjs-api
1 parent ff6ec01 commit 4ccc73d

File tree

7 files changed

+73
-17
lines changed

7 files changed

+73
-17
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export * from './mainsite/itemsystem/items/index';
1919
export * from './mainsite/level/index';
2020
export * from './mainsite/notification/index';
2121
export * from './mainsite/perks/index';
22+
export * from './mainsite/quest/index';
2223
export * from './mainsite/repshop/index';
2324
export * from './profile/index';
2425
export * from './reports/index';
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// eslint-disable-next-line max-classes-per-file
2+
import { QuestMetadata } from '~/types/mainsite/QuestMetadata';
3+
import { QuestType } from '~/types/mainsite/QuestType';
4+
5+
class MemberQuestDto {
6+
/** Quest title */
7+
title: string;
8+
9+
/** Quest type */
10+
type: QuestType;
11+
12+
/** Message to send when a quest is completed */
13+
completion_message: string;
14+
15+
/** Quest description */
16+
description: string;
17+
}
18+
19+
export class MemberQuestsResponseDto {
20+
/** Member Id */
21+
member_id: number;
22+
23+
/** Start date of the member quest */
24+
start_date: string;
25+
26+
/** Completion date of the member quest. Can be null */
27+
completion_date: string | null;
28+
29+
/** Contains target and current values of the member quest */
30+
metadata: QuestMetadata;
31+
32+
/** The linked quest */
33+
quest: MemberQuestDto;
34+
}

src/mainsite/quest/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './MemberQuestsResponse';

src/types/Notification.ts

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ export enum NotificationPlatforms {
55
}
66

77
export enum NotificationApplications {
8-
INACTIVITY = 1,
9-
DAILY_EVENT_OVERVIEW = 2,
10-
EVENT_CHANGES = 4,
11-
EVENT_REMINDER = 8,
12-
AWAY_CHANGES = 16,
13-
ATTACK_ITEM = 32,
14-
ITEM_DROPS = 64,
15-
MEMBER_DUES = 128,
16-
MEMBER_GRADUATION = 256,
17-
ANNOUNCEMENT = 512,
18-
DIVISION_UPDATES = 1024,
19-
STRIKES = 2048,
20-
AWARDS = 4096,
21-
REP_CAP_NOTIFICATION = 8192,
22-
BATTLEPASS_GIFT = 16384,
23-
ITEM_NO_LONGER_HIDDEN = 32768
8+
INACTIVITY = 1 << 0,
9+
DAILY_EVENT_OVERVIEW = 1 << 1,
10+
EVENT_CHANGES = 1 << 2,
11+
EVENT_REMINDER = 1 << 3,
12+
AWAY_CHANGES = 1 << 4,
13+
ATTACK_ITEM = 1 << 5,
14+
ITEM_DROPS = 1 << 6,
15+
MEMBER_DUES = 1 << 7,
16+
MEMBER_GRADUATION = 1 << 8,
17+
ANNOUNCEMENT = 1 << 9,
18+
DIVISION_UPDATES = 1 << 10,
19+
STRIKES = 1 << 11,
20+
AWARDS = 1 << 12,
21+
REP_CAP_NOTIFICATION = 1 << 13,
22+
BATTLEPASS_GIFT = 1 << 14,
23+
ITEM_NO_LONGER_HIDDEN = 1 << 15,
24+
MEMBER_QUEST = 1 << 16
2425
}
2526

2627
export const NotificationApplicationsInfo: { [key in NotificationApplications]: { description: string; platforms: NotificationPlatforms } } = {
@@ -87,5 +88,9 @@ export const NotificationApplicationsInfo: { [key in NotificationApplications]:
8788
[NotificationApplications.BATTLEPASS_GIFT]: {
8889
description: 'Battlepass Gift Notifications.',
8990
platforms: NotificationPlatforms.DISCORD | NotificationPlatforms.MOBILE | NotificationPlatforms.WEBAPP
91+
},
92+
[NotificationApplications.MEMBER_QUEST]: {
93+
description: 'Member Quests Notifications.',
94+
platforms: NotificationPlatforms.DISCORD | NotificationPlatforms.MOBILE | NotificationPlatforms.WEBAPP
9095
}
9196
};

src/types/admin/PermissionObjectNames.ts

Lines changed: 2 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 = 126
10+
// Last inserted permission enum value = 127
1111
// PLEASE UPDATE THIS IF YOU ADD A PERMISSION
1212

1313
export enum PermissionObjectNames {
@@ -106,6 +106,7 @@ export enum PermissionObjectNames {
106106
SELF__RPG__LEVELS = 70,
107107
SELF__RPG__PERK = 71,
108108
SELF__RPG__ACTIVITY_TIERS = 124,
109+
SELF__RPG__QUESTS = 127,
109110

110111
// ADMIN
111112
ADMIN__LOGS = 80,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface QuestMetadata {
2+
current: number;
3+
target: number;
4+
}

src/types/mainsite/QuestType.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export enum QuestType {
2+
EQUIP_ITEM = 'equip_item',
3+
AUCTION_ITEM = 'auction_item',
4+
BUY_ITEM = 'buy_item',
5+
CRAFT_ITEM = 'craft_item',
6+
REROLL_PERK = 'reroll_perk',
7+
ACHIEVE_RANK = 'achieve_rank',
8+
HOST_EVENT = 'host_event',
9+
ATTEND_EVENT = 'attend_event'
10+
}

0 commit comments

Comments
 (0)