You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
662 B

import { Filter } from '@ghostfolio/common/interfaces';
import { Scope, scopes } from '@ghostfolio/common/scopes';
import { AccessType } from '@prisma/client';
import {
IsArray,
IsDateString,
IsEnum,
IsIn,
IsOptional,
IsString,
IsUUID
} from 'class-validator';
export class CreateAccessDto {
@IsOptional()
@IsString()
alias?: string;
@IsDateString()
expiresAt: string;
@IsArray()
@IsOptional()
filters?: Filter[];
@IsOptional()
@IsUUID()
granteeUserId?: string;
@IsArray()
@IsIn(Object.values(scopes), { each: true })
@IsOptional()
scopes?: Scope[];
@IsEnum(AccessType)
@IsOptional()
type?: AccessType;
}