@shaxpir/duiduidui-models 1.9.12 → 1.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ import { CompactDate } from "@shaxpir/shaxpir-common";
2
+ /**
3
+ * Activity data for a single day, used in activity calendars.
4
+ */
5
+ export interface DayActivity {
6
+ date: CompactDate;
7
+ reviews: number;
8
+ minutes: number;
9
+ }
10
+ /**
11
+ * Distribution of cards across proficiency grades.
12
+ * - A: Mastered (theta >= 0.8)
13
+ * - B: Good (0.6 <= theta < 0.8)
14
+ * - C: Learning (0.4 <= theta < 0.6)
15
+ * - D: Poor (0.2 <= theta < 0.4)
16
+ * - F: Not learned (theta < 0.2)
17
+ */
18
+ export interface GradeDistribution {
19
+ A: number;
20
+ B: number;
21
+ C: number;
22
+ D: number;
23
+ F: number;
24
+ }
25
+ /**
26
+ * Stats for a friend, returned by the GET /api/friends/:user_id/stats endpoint.
27
+ * Used to display a friend's learning progress in the FriendStatsModal.
28
+ */
29
+ export interface FriendStats {
30
+ skill_level: number;
31
+ skill_level_lower_bound: number;
32
+ skill_level_upper_bound: number;
33
+ cognitive_load: number;
34
+ total_reviews: number;
35
+ weekly_reviews: number;
36
+ current_streak: number;
37
+ longest_streak: number;
38
+ grade_distribution: GradeDistribution;
39
+ activity_data: DayActivity[];
40
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ export * from './Content';
7
7
  export * from './ContentKind';
8
8
  export * from './Device';
9
9
  export * from './Flag';
10
+ export * from './FriendStats';
10
11
  export * from './GeoLocation';
11
12
  export * from './Hanzi';
12
13
  export * from './Manifest';
@@ -24,6 +24,7 @@ __exportStar(require("./Content"), exports);
24
24
  __exportStar(require("./ContentKind"), exports);
25
25
  __exportStar(require("./Device"), exports);
26
26
  __exportStar(require("./Flag"), exports);
27
+ __exportStar(require("./FriendStats"), exports);
27
28
  __exportStar(require("./GeoLocation"), exports);
28
29
  __exportStar(require("./Hanzi"), exports);
29
30
  __exportStar(require("./Manifest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaxpir/duiduidui-models",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/shaxpir/duiduidui-models"