diff --git a/src/domain/models/setting.ts b/src/domain/models/setting.ts new file mode 100644 index 0000000..4208fe9 --- /dev/null +++ b/src/domain/models/setting.ts @@ -0,0 +1,15 @@ +export interface SettingDefinition { + key: string; + label: string; + description: string; + category: "sync" | "notifications" | "general"; + type: "string" | "number" | "boolean"; + isSecret?: boolean; + defaultValue: string; +} + +export interface SettingValue { + key: string; + value: string; + updated_at: string; +} diff --git a/src/domain/repositories/settings-repository.ts b/src/domain/repositories/settings-repository.ts new file mode 100644 index 0000000..b4026b3 --- /dev/null +++ b/src/domain/repositories/settings-repository.ts @@ -0,0 +1,7 @@ +import type { SettingValue } from "../models/setting.js"; + +export interface SettingsRepository { + get(key: string): SettingValue | null; + getAll(): SettingValue[]; + set(key: string, value: string): void; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9dda1e0 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "lib": ["ES2022", "DOM"], + "strict": true, + "strictNullChecks": false, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "types": ["bun", "node"], + "allowImportingTsExtensions": true + }, + "include": ["src/**/*", "tests/**/*"], + "exclude": ["node_modules", "dist"] +} \ No newline at end of file