Source: src/data/user-settings/
User-scoped settings (display name, active theme, notifications). Operates on the authenticated user, not tenant-scoped.
Service
UserSettingsService
| Method | Parameters | Returns |
|---|
| getOrCreate | (userId: string) | Promise<UserSettingsRecord> |
| update | (userId: string, input: UpdateSettingsInput) | Promise<UserSettingsRecord> |
| setActiveTheme | (userId: string, themeId: string) | Promise<UserSettingsRecord> |
Repository
UserSettingsRepository
| Method | Parameters | Returns |
|---|
| getByUserId | (userId: string) | Promise<UserSettingsRecord | null> |
| upsert | (record: UserSettingsRecord) | Promise<UserSettingsRecord> |
UserSettingsRecord
| Field | Type |
|---|
| id | string |
| userId | string |
| displayName | string | undefined |
| activeThemeId | string | undefined |
| notifications | Record<string, unknown> |
| createdAt | Date |
| updatedAt | Date |
| Field | Type |
|---|
| displayName | string | undefined |
| activeThemeId | string | undefined |
| notifications | Record<string, unknown> | undefined |