forked from Tadrisino/MathApp_frontend
fixed
This commit is contained in:
@@ -117,6 +117,16 @@ export interface Hearts {
|
||||
isUnlimited: boolean;
|
||||
}
|
||||
|
||||
export interface Character {
|
||||
characterId: string;
|
||||
slug: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
unlockXp: number;
|
||||
unlocked: boolean;
|
||||
selected: boolean;
|
||||
}
|
||||
|
||||
export interface AskResponse {
|
||||
conversationId: string;
|
||||
messageId: string;
|
||||
@@ -299,9 +309,16 @@ export function createClient(options: ClientOptions = {}) {
|
||||
raw<{ currentStreak: number; longestStreak: number; activeDays: string[] }>(
|
||||
'GET', '/user/streak/calendar',
|
||||
),
|
||||
leaderboard: (period: 'weekly' | 'monthly' = 'weekly') =>
|
||||
leaderboard: (period: 'weekly' | 'all_time' = 'weekly') =>
|
||||
raw<{ period: string; entries: unknown[] }>('GET', `/leaderboard?period=${period}`),
|
||||
|
||||
/** کاتالوگِ کاراکترهای گیمیفیکیشن — مثلِ ماسکاتهای Duolingo، بازشدن بر اساسِ XP. */
|
||||
characters: {
|
||||
list: () => raw<{ characters: Character[] }>('GET', '/characters').then((r) => r.characters),
|
||||
select: (characterId: string) =>
|
||||
raw<{ characterId: string; selected: boolean }>('POST', '/characters/select', { characterId }),
|
||||
},
|
||||
|
||||
/* ── صفحهی درس و سوال ─────────────────────────────────────────────── */
|
||||
lesson: {
|
||||
intro: (lessonId: number) => raw<LessonIntro>('GET', `/lessons/${lessonId}/intro`),
|
||||
|
||||
Reference in New Issue
Block a user