mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 04:50:54 +00:00
customer registration api integration
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
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<DropdownSetting[]>;
|
||||
findById(id: string): Promise<DropdownSetting | null>;
|
||||
findByCode(code: string): Promise<DropdownSetting | null>;
|
||||
|
||||
create(data: Partial<DropdownSetting>): Promise<DropdownSetting>;
|
||||
update(
|
||||
id: string,
|
||||
data: Partial<DropdownSetting>,
|
||||
): Promise<DropdownSetting | null>;
|
||||
softDelete(id: string): Promise<void>;
|
||||
|
||||
/* Option-level helpers */
|
||||
replaceOptions(
|
||||
settingId: string,
|
||||
options: Array<Partial<DropdownOption>>,
|
||||
): Promise<DropdownOption[]>;
|
||||
addOption(
|
||||
settingId: string,
|
||||
option: Partial<DropdownOption>,
|
||||
): Promise<DropdownOption>;
|
||||
updateOption(
|
||||
optionId: string,
|
||||
data: Partial<DropdownOption>,
|
||||
): Promise<DropdownOption | null>;
|
||||
removeOption(optionId: string): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user