import { GlobalOptions, APIRequestContext, FerantConfigurable } from '../../util/types'; export declare namespace user_v1 { interface Options extends GlobalOptions { version: 'v1'; } type UserAccountType = 'User' | 'Teacher' | 'Admin'; type UserBlocked = 0 | 1; interface UserIntakeDuration { duration: number; ended: number; start: number; } interface User { fid: string; email: string; given_name: string; family_name: string; account_type: UserAccountType; username: string; last_login?: string; blocked?: UserBlocked; intake_duration?: UserIntakeDuration; intake_consent?: boolean; organization_id?: string; biography?: string; email_verified?: boolean; last_ip?: string; last_password_reset?: string; } interface Static { } /** */ interface Returns$Me { /** */ user?: User & any; /** */ static: Array; } interface User$Assets { asset_final?: string[]; grouped_assets?: string[][]; big5_sorted?: string[]; } interface User$Lifeword { top_lifeword?: string; lifewords?: string[]; } interface User$Values { } interface Returns$User extends User { assets?: User$Assets; lifeword?: User$Lifeword; karma?: any[]; values?: User$Values; } interface Params$User { fid?: string; } interface Params$User$Put { fid?: string; body?: User; } /** * Class based functionality. Functions here represent user actions. */ class User { context: APIRequestContext; settings: Resource$Settings; constructor(options: GlobalOptions, ferant?: FerantConfigurable); /** * * @returns */ me(): Promise; /** * * @param data * @returns */ get(data: Params$User): Promise; /** * * @param data * @returns */ remove(data: Params$User): Promise; /** * * @param data * @returns */ update(data: Params$User$Put): Promise; } type Settings = 'notifications' | 'karma' | 'task_manager' | 'appearance'; enum SettingsAppearanceThemeEnum { light = 0, dark = 1 } enum SettingsAppearanceModeEnum { single = 0, sync = 1 } interface Returns$Settings$Load { [key: string]: any; setting?: string; daily_tasks?: number; weekly_tasks?: number; theme: SettingsAppearanceThemeEnum; mode: SettingsAppearanceModeEnum; } interface Params$Settings$Get { setting?: Settings; } interface Params$Settings$Update extends Params$Settings$Get { [key: string]: any; } /** * Class based functionality. Functions here represent user settings actions. */ class Resource$Settings { context: APIRequestContext; constructor(context: APIRequestContext); /** * Retrieve the stats for a whole year. * @param year to be retrieved * @returns list of stats */ load(): Promise; /** * Retrieve the stats for a whole year. * @param year to be retrieved * @returns list of stats */ get(data: Params$Settings$Get): Promise; /** * Retrieve the stats for a whole year. * @param year to be retrieved * @returns list of stats */ update(data: Params$Settings$Update): Promise; } }