Repository navigation
Settings
The Settings module allows you to view and adjust account properties, update user emails or phone numbers, change security answers, and configure accessibility settings (such as high-contrast themes) for the student.
Let's read the current user preferences and check out their registered details:
import { Litedirecte } from "litedirecte";
const ld = new Litedirecte();
await ld.auth.login("your_username", "your_password");
// Retrieve active settings
const preferences = await ld.settings.getSettings();
console.log(`Identifier: ${preferences.identifiant}`);
console.log(`Registered Email: ${preferences.email}`);
console.log(`Mobile Phone: ${preferences.portable || "None specified"}`);
// Update user details (for example, setting a new email)
const updated = await ld.settings.updateSettings({
email: "new.student@email.com",
});
console.log(`Email updated to: ${updated.email}`);Fetches user login attributes and profile settings.
ld.settings.getSettings(): Promise<any>Saves updated contact details, credentials, or security questions.
ld.settings.updateSettings(
data: {
email?: string;
portable?: string; // French key for mobile phone
questionSecrete?: string; // French key for secret question
reponse?: string; // French key for response
nouveauMotDePasse?: string; // French key for new password
identifiant?: string; // Username identifier
},
): Promise<any>Note: If you provide
nouveauMotDePasse(new password) to change the account password, Litedirecte handles the required password confirmation payload parameters internally for you.
Note:
ld.settings.updateSettingsis never queued for offline replay — a password change must never be persisted to, or replayed from, local storage.
Enables or disables visual accessibility enhancements (e.g. high contrast or enlarged typography settings) inside EcoleDirecte.
ld.settings.updateAccessibility(
enabled: boolean,
): Promise<{ success: boolean }>import { Litedirecte } from "litedirecte";
const ld = new Litedirecte();
await ld.auth.login("your_username", "your_password");
// Turn on visual accessibility features!
const result = await ld.settings.updateAccessibility(true);
if (result.success) {
console.log("Visual accessibility preferences saved.");
}ld.settings.getSettings and ld.settings.updateSettings resolve to the raw EcoleDirecte API payload (treated as any). Litedirecte preserves the API's original key names and only normalizes values (date strings become Date, base64 fields are decoded).
getSettings() is a maintained entry: served instantly and refreshed by the poller and by ld.getAll(). It accepts { force: true } to skip the cache. See Cache & sync.
© 2026 typeof (Scolup) | Licensed under AGPL 3.0