ddd refactor: api-keys repo

This commit is contained in:
Ramnique Singh 2025-08-15 12:57:19 +05:30
parent ab81fa3c46
commit 0d50777b93
4 changed files with 14 additions and 5 deletions

View file

@ -31,6 +31,12 @@ export interface IApiKeysRepository {
*/
delete(projectId: string, id: string): Promise<boolean>;
/**
* Deletes all API keys for a given project.
* @param projectId - The ID of the project.
*/
deleteAll(projectId: string): Promise<void>;
/**
* Checks if an API key is valid for a project and consumes it (e.g., for rate limiting or one-time use).
* @param projectId - The ID of the project.