import { APIKeyEntity } from 'src/entities/api-key.entity'; export const IKeyRepository = 'IKeyRepository'; export interface IKeyRepository { create(dto: Partial): Promise; update(userId: string, id: string, dto: Partial): Promise; delete(userId: string, id: string): Promise; /** * Includes the hashed `key` for verification * @param id */ getKey(hashedToken: string): Promise; getById(userId: string, id: string): Promise; getByUserId(userId: string): Promise; }