import { PaginatedResponse } from "@edr/types"; import { ListDropdownSettingsQueryDto } from "../dto/list-dropdown-settings-query.dto"; import { DropdownOption } from "../entities/dropdown-option.entity"; import { DropdownSetting } from "../entities/dropdown-setting.entity"; /** * Contract every DropdownSettings repository must satisfy. Lets services * depend on the abstraction and lets tests swap in an in-memory fake. */ export const DROPDOWN_SETTINGS_REPOSITORY = Symbol( "DROPDOWN_SETTINGS_REPOSITORY", ); export interface IDropdownSettingsRepository { findAll(): Promise; findPaged( query: ListDropdownSettingsQueryDto, ): Promise>; findById(id: string): Promise; findByCode(code: string): Promise; create(data: Partial): Promise; update( id: string, data: Partial, ): Promise; softDelete(id: string): Promise; /* Option-level helpers */ replaceOptions( settingId: string, options: Array>, ): Promise; addOption( settingId: string, option: Partial, ): Promise; updateOption( optionId: string, data: Partial, ): Promise; removeOption(optionId: string): Promise; }