refactor: migrate partner repo to kysely (#15366)

This commit is contained in:
Jason Rasmussen
2025-01-17 18:49:21 -05:00
committed by GitHub
parent d5a9294eeb
commit 097183b31d
5 changed files with 276 additions and 30 deletions

View File

@@ -1,3 +1,5 @@
import { Updateable } from 'kysely';
import { Partners } from 'src/db';
import { PartnerEntity } from 'src/entities/partner.entity';
export interface PartnerIds {
@@ -14,8 +16,8 @@ export const IPartnerRepository = 'IPartnerRepository';
export interface IPartnerRepository {
getAll(userId: string): Promise<PartnerEntity[]>;
get(partner: PartnerIds): Promise<PartnerEntity | null>;
get(partner: PartnerIds): Promise<PartnerEntity | undefined>;
create(partner: PartnerIds): Promise<PartnerEntity>;
remove(entity: PartnerEntity): Promise<void>;
update(entity: Partial<PartnerEntity>): Promise<PartnerEntity>;
remove(partner: PartnerIds): Promise<void>;
update(partner: PartnerIds, entity: Updateable<Partners>): Promise<PartnerEntity>;
}