refactor(server): narrow auth types (#16066)

This commit is contained in:
Jason Rasmussen 2025-02-12 15:23:08 -05:00 committed by GitHub
parent 7c821dd205
commit 2d7c333c8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 265 additions and 239 deletions

View file

@ -1,10 +1,8 @@
import { UserEntity } from 'src/entities/user.entity';
import {
DatabaseExtension,
ExifOrientation,
ImageFormat,
JobName,
Permission,
QueueName,
TranscodeTarget,
VideoCodec,
@ -16,13 +14,6 @@ import { SessionRepository } from 'src/repositories/session.repository';
export type DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
export type AuthApiKey = {
id: string;
key: string;
user: UserEntity;
permissions: Permission[];
};
export type RepositoryInterface<T extends object> = Pick<T, keyof T>;
type IActivityRepository = RepositoryInterface<ActivityRepository>;