Skip to content

Commit d329479

Browse files
chore(develop): sync types to dmgincs/nestjs-api
1 parent 67fa1c8 commit d329479

5 files changed

Lines changed: 179 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export enum EventScheduleStatus {
2+
RUNNING = 'running',
3+
PAUSED = 'paused'
4+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { EventRequestedRsvpType } from '~/constants/EventRequestedRsvpType';
2+
import { EventRegions, EventRsvpTypes, EventTypes } from '~/constants/Events';
3+
4+
export class CreateEventScheduleRequestDto {
5+
6+
/** The title of the new event */
7+
title: string;
8+
9+
/** The type of the event */
10+
type: EventTypes;
11+
12+
/** The game of the event */
13+
game: string;
14+
15+
/** The region in which the event will be hosted */
16+
region: EventRegions;
17+
18+
/** The start time of the event */
19+
start_date: string;
20+
21+
/** A cron expression that the event schedule creates events for */
22+
cron_schedule: string;
23+
24+
/** The length of the event in hours */
25+
length: number;
26+
27+
/** The HTML description of the event */
28+
description: string;
29+
30+
featured?: boolean;
31+
32+
/** Whether the event is a flex event, meaning anyone can join whenever they want */
33+
is_flex: boolean;
34+
35+
/** Whether the event is a 21+ event, meaning only members who are above the age of 21 can join */
36+
is_over21: boolean;
37+
38+
/** Whether an event is private (limited to the requested rsvps) or not */
39+
40+
is_private?: boolean;
41+
42+
/** The member ID of the host */
43+
host_id: number;
44+
45+
/** The ID of the image used as the event banner */
46+
47+
image_id?: number;
48+
49+
/** A list of all RSVPd members */
50+
rsvps: {
51+
member_id: number;
52+
rsvpType: EventRsvpTypes;
53+
}[];
54+
55+
/** The group/member(s) to request rsvps from */
56+
57+
requested_rsvps?: { requested_entity_id: string; type: EventRequestedRsvpType }[];
58+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { EventRequestedRsvpType } from '~/constants/EventRequestedRsvpType';
2+
import { EventRegions, EventTypes } from '~/constants/Events';
3+
4+
export class EditEventScheduleRequestDto {
5+
6+
/** The title of the event */
7+
title?: string;
8+
9+
/** The type of the event */
10+
type?: EventTypes;
11+
12+
/** The game of the event */
13+
game?: string;
14+
15+
/** The region in which the event will be hosted */
16+
region?: EventRegions;
17+
18+
/** The start time of the event */
19+
start_date?: string;
20+
21+
/** The length of the event in hours */
22+
length?: number;
23+
24+
/** The HTML description of the event */
25+
description?: string;
26+
27+
/** Whether the event is a flex event, meaning anyone can join whenever they want */
28+
is_flex?: boolean;
29+
30+
/** Whether the event is a 21+ event, meaning only members who are above the age of 21 can join */
31+
is_over21?: boolean;
32+
33+
featured?: boolean;
34+
35+
/** The member ID of the host */
36+
host_id?: number;
37+
38+
/** The ID of the image used as the event banner */
39+
image_id?: number;
40+
41+
/** Whether an event is private (limited to the requested rsvps) or not */
42+
is_private?: boolean;
43+
44+
/** The group/member(s) to request rsvps from */
45+
46+
requested_rsvps?: { requested_entity_id: string; type: EventRequestedRsvpType }[];
47+
48+
/** A cron expression that the event schedule creates events for */
49+
cron_schedule?: string;
50+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { EventRequestedRsvpType } from '~/constants/EventRequestedRsvpType';
2+
import { EventRegions, EventTypes } from '~/constants/Events';
3+
import { EventScheduleStatus } from '~/constants/EventScheduleStatus';
4+
5+
export class GetEventScheduleResponseDto {
6+
/** The ID of the event */
7+
event_schedule_id: number;
8+
9+
/** The title of the event */
10+
title: string;
11+
12+
/** The member ID of the host */
13+
host_id: number | null;
14+
15+
/** The type of the event */
16+
type: EventTypes;
17+
18+
/** The status of the event schedule */
19+
status: EventScheduleStatus;
20+
21+
/** The region in which the event will be hosted */
22+
region: EventRegions;
23+
24+
/** The game of the event */
25+
game: string;
26+
27+
/** The start time of the event */
28+
start_date: Date;
29+
30+
/** The end time of the event */
31+
end_date: Date;
32+
33+
/** The HTML description of the event */
34+
description: string;
35+
36+
/** Whether the event is cancelled */
37+
cancelled: boolean;
38+
39+
/** Whether the event is featured */
40+
featured: boolean;
41+
42+
/** Whether the event is a flex event */
43+
is_flex: boolean;
44+
45+
/** Whether the event is 21+ */
46+
is_over21: boolean;
47+
48+
/** The ID of the member whom posted the event */
49+
posted_by: number;
50+
51+
/** The time at which the event was posted */
52+
posted_at: Date;
53+
54+
/** The url to the event banner */
55+
image_path: string | null;
56+
57+
/** Whether the event is private or not */
58+
is_private: boolean;
59+
60+
/** The group/member(s) rsvps have been requested from */
61+
requested_rsvps?: { requested_entity_id: string; type: EventRequestedRsvpType }[];
62+
63+
/** A cron expression that the event schedule creates events for */
64+
cron_schedule: string;
65+
}

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 = 118
10+
// Last inserted permission enum value = 119
1111
// PLEASE UPDATE THIS IF YOU ADD A PERMISSION
1212

1313
export enum PermissionObjectNames {
@@ -71,6 +71,7 @@ export enum PermissionObjectNames {
7171
EMT__LOG__TRAINING = 53,
7272
EMT__LOG__TWITCH = 54,
7373
EMT__LOGS = 55,
74+
EMT__EVENT__SCHEDULE = 119,
7475
EMT__LOG__DIVISION_BONDING = 120,
7576

7677
// RPG = CRAFTING/ITEM/LEVEL/PERK/STEAL SYSTEM

0 commit comments

Comments
 (0)