mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor(server): narrow auth types (#16066)
This commit is contained in:
parent
7c821dd205
commit
2d7c333c8c
25 changed files with 265 additions and 239 deletions
|
|
@ -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>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue