Spaces:
Runtime error
Runtime error
| import { ApiProperty } from '@nestjs/swagger'; | |
| import { GroupId, GroupInfo, GroupParticipant } from './groups.dto'; | |
| /** | |
| * Happens when you join or are added to a group. | |
| */ | |
| export class GroupV2JoinEvent { | |
| ({ | |
| description: 'Unix timestamp', | |
| example: 1666943582, | |
| }) | |
| timestamp: number; | |
| group: GroupInfo; | |
| _data: any; | |
| } | |
| /** | |
| * Happens when you leave or are removed from a group. | |
| */ | |
| export class GroupV2LeaveEvent { | |
| ({ | |
| description: 'Unix timestamp', | |
| example: 1666943582, | |
| }) | |
| timestamp: number; | |
| group: GroupId; | |
| _data: any; | |
| } | |
| export class GroupV2UpdateEvent { | |
| ({ | |
| description: 'Unix timestamp', | |
| example: 1666943582, | |
| }) | |
| timestamp: number; | |
| group: Partial<GroupInfo>; | |
| _data: any; | |
| } | |
| export enum GroupParticipantType { | |
| JOIN = 'join', | |
| LEAVE = 'leave', | |
| PROMOTE = 'promote', | |
| DEMOTE = 'demote', | |
| } | |
| export class GroupV2ParticipantsEvent { | |
| group: GroupId; | |
| ({ | |
| description: 'Type of the event', | |
| }) | |
| type: GroupParticipantType; | |
| ({ | |
| description: 'Unix timestamp', | |
| example: 1666943582, | |
| }) | |
| timestamp: number; | |
| participants: GroupParticipant[]; | |
| _data: any; | |
| } | |