mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server): rename domain repositories -> interfaces (#8147)
rename domain repositories
This commit is contained in:
parent
44ed1f0919
commit
b588a87d4a
155 changed files with 385 additions and 390 deletions
16
server/src/interfaces/api-key.interface.ts
Normal file
16
server/src/interfaces/api-key.interface.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { APIKeyEntity } from 'src/entities/api-key.entity';
|
||||
|
||||
export const IKeyRepository = 'IKeyRepository';
|
||||
|
||||
export interface IKeyRepository {
|
||||
create(dto: Partial<APIKeyEntity>): Promise<APIKeyEntity>;
|
||||
update(userId: string, id: string, dto: Partial<APIKeyEntity>): Promise<APIKeyEntity>;
|
||||
delete(userId: string, id: string): Promise<void>;
|
||||
/**
|
||||
* Includes the hashed `key` for verification
|
||||
* @param id
|
||||
*/
|
||||
getKey(hashedToken: string): Promise<APIKeyEntity | null>;
|
||||
getById(userId: string, id: string): Promise<APIKeyEntity | null>;
|
||||
getByUserId(userId: string): Promise<APIKeyEntity[]>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue