-
Notifications
You must be signed in to change notification settings - Fork 0
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 { getSettings, updateSettings } from "linkdirecte";
// Retrieve active settings
const preferences = await 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 updateSettings({
email: "new.student@email.com",
});
console.log(`Email updated to: ${updated.email}`);Fetches user login attributes and profile settings.
function getSettings(): Promise<AccountSettings>Saves updated contact details, credentials, or security questions.
function 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<AccountSettings>Note: If you provide
nouveauMotDePasse(new password) to change the account password, Linkdirecte handles the required password confirmation payload parameters internally for you.
Enables or disables visual accessibility enhancements (e.g. high contrast or enlarged typography settings) inside EcoleDirecte.
function updateAccessibility(
enabled: boolean,
): Promise<{ success: boolean }>import { updateAccessibility } from "linkdirecte";
// Turn on visual accessibility features!
const result = await updateAccessibility(true);
if (result.success) {
console.log("Visual accessibility preferences saved.");
}The properties of AccountSettings are returned as raw EcoleDirecte API keys (no translation is performed by the SDK):
| Property | Type | Description |
|---|---|---|
id |
number |
Unique ID of the login profile. |
identifiant |
string |
Account username. |
email |
string |
Registered contact email address. |
portable |
string |
Registered mobile telephone number. |
questionSecrete |
string |
The active security challenge question. |
reponse |
string |
Response for the security question. |
accessToken |
string |
Secure session access token. |
possibleQuestions |
string[] |
Pre-defined questions available to choose from for your security question. |
© 2026 typeof (Scolup) | Licensed under AGPL 3.0