import { APIKeyEntity } from '@app/infra'; export const IKeyRepository = 'IKeyRepository'; export interface IKeyRepository { create(dto: Partial): Promise; update(userId: string, id: number, dto: Partial): Promise; delete(userId: string, id: number): Promise; /** * Includes the hashed `key` for verification * @param id */ getKey(id: number): Promise; getById(userId: string, id: number): Promise; getByUserId(userId: string): Promise; }