From ca53f4a4c8cb44cb48ed1fca19c4b06571614edf Mon Sep 17 00:00:00 2001 From: nigiri <168690269+0xnigir1@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:02:59 -0300 Subject: [PATCH] fix: add missing method to interface --- .../src/interfaces/roundRepository.interface.ts | 13 +++++++++++++ .../src/repositories/kysely/round.repository.ts | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/repository/src/interfaces/roundRepository.interface.ts b/packages/repository/src/interfaces/roundRepository.interface.ts index cff5a9b..5e7b1b3 100644 --- a/packages/repository/src/interfaces/roundRepository.interface.ts +++ b/packages/repository/src/interfaces/roundRepository.interface.ts @@ -38,6 +38,19 @@ export interface IRoundReadRepository { strategyAddress: Address, ): Promise; + /** + * Retrieves a round by a specific role and role value. + * @param chainId The chain ID of the round. + * @param roleName The name of the role to filter by. + * @param roleValue The value of the role to filter by. + * @returns A promise that resolves to a Round object if found, or undefined if not found. + */ + getRoundByRole( + chainId: ChainId, + roleName: RoundRoleNames, + roleValue: string, + ): Promise; + /** * Retrieves the match token address for a specific round. * @param chainId The chain ID of the round. diff --git a/packages/repository/src/repositories/kysely/round.repository.ts b/packages/repository/src/repositories/kysely/round.repository.ts index 89daa11..decc0b0 100644 --- a/packages/repository/src/repositories/kysely/round.repository.ts +++ b/packages/repository/src/repositories/kysely/round.repository.ts @@ -61,7 +61,7 @@ export class KyselyRoundRepository implements IRoundRepository { /* @inheritdoc */ async getRoundByRole( chainId: ChainId, - roleName: "admin" | "manager", + roleName: RoundRoleNames, roleValue: string, ): Promise { return this.db @@ -160,6 +160,7 @@ export class KyselyRoundRepository implements IRoundRepository { .execute(); } + /* @inheritdoc */ async deleteManyRoundRolesByRoleAndAddress( chainId: ChainId, roundId: string,