Files
Checkmate/server/src/domain/proxies/proxy.repository.interface.ts
T

15 lines
615 B
TypeScript
Raw Normal View History

2026-08-20 10:49:12 -07:00
import { Proxy } from "@/domain/proxies/proxy.type.js";
export interface IProxiesRepository {
// create
create(proxyData: Partial<Proxy>): Promise<Proxy>;
// read
2026-08-25 11:02:37 -07:00
findAll(): Promise<Proxy[]>;
2026-08-20 10:49:12 -07:00
findById(proxyId: string, teamId: string): Promise<Proxy>;
2026-08-21 11:06:42 -07:00
findByIdOrNull(proxyId: string, teamId?: string): Promise<Proxy | null>;
2026-08-20 10:49:12 -07:00
findByTeamId(teamId: string): Promise<Proxy[]>;
// update
2026-08-20 13:57:24 -07:00
updateById(proxyId: string, teamId: string, patch: Partial<Proxy>, options?: { unsetPassword?: boolean; unsetUsername?: boolean }): Promise<Proxy>;
2026-08-20 10:49:12 -07:00
// delete
deleteById(proxyId: string, teamId: string): Promise<Proxy>;
}