mirror of
https://github.com/immich-app/immich.git
synced 2026-02-02 00:53:47 -05:00
* refactor: jobs and processors * refactor: storage migration processor * fix: tests * fix: code warning * chore: ignore coverage from infra * fix: sync move asset logic between job core and asset core * refactor: move error handling inside of catch * refactor(server): job core into dedicated service calls * refactor: smart info * fix: tests * chore: smart info tests * refactor: use asset repository * refactor: thumbnail processor * chore: coverage reqs
18 lines
649 B
TypeScript
18 lines
649 B
TypeScript
import { APIKeyEntity } from '@app/infra/db/entities';
|
|
|
|
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>;
|
|
deleteAll(userId: 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[]>;
|
|
}
|