24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import 'reflect-metadata';
|
|
import { OnGatewayConnection } from '@nestjs/websockets';
|
|
import { Server, Socket } from 'socket.io';
|
|
import { PrismaService } from '../prisma/prisma.service';
|
|
import { ParticipantRole } from '@prisma/client';
|
|
import { Reflector } from '@nestjs/core';
|
|
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
import { Cache } from 'cache-manager';
|
|
export declare const ROLES_KEY = "roles";
|
|
export declare const Roles: (...roles: ParticipantRole[]) => import("@nestjs/common").CustomDecorator<string>;
|
|
export declare class TourRoleGuard implements CanActivate {
|
|
private reflector;
|
|
private prisma;
|
|
private cacheManager;
|
|
constructor(reflector: Reflector, prisma: PrismaService, cacheManager: Cache);
|
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
}
|
|
export declare class CommentGateway implements OnGatewayConnection {
|
|
server: Server;
|
|
handleConnection(client: Socket): void;
|
|
handleJoinTour(client: Socket, tourId: string): void;
|
|
notifyNewComment(tourId: string, data: any): void;
|
|
}
|