@shaxpir/duiduidui-models 1.5.8 → 1.5.9
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.
|
@@ -32,7 +32,12 @@ export interface StarredCondition extends BaseCondition {
|
|
|
32
32
|
type: 'starred';
|
|
33
33
|
value: boolean;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export interface DifficultyCondition extends BaseCondition {
|
|
36
|
+
type: 'difficulty';
|
|
37
|
+
min?: number;
|
|
38
|
+
max?: number;
|
|
39
|
+
}
|
|
40
|
+
export type AnyCondition = TagCondition | GradeCondition | ThetaCondition | TemporalCondition | CountCondition | StarredCondition | DifficultyCondition;
|
|
36
41
|
export interface ConditionFilters {
|
|
37
42
|
all?: AnyCondition[];
|
|
38
43
|
any?: AnyCondition[];
|
|
@@ -61,4 +66,10 @@ export declare const Condition: {
|
|
|
61
66
|
wellPracticed: (minReviews?: number) => CountCondition;
|
|
62
67
|
starred: () => StarredCondition;
|
|
63
68
|
notStarred: () => StarredCondition;
|
|
69
|
+
difficulty: (min?: number, max?: number) => DifficultyCondition;
|
|
70
|
+
beginner: () => DifficultyCondition;
|
|
71
|
+
elementary: () => DifficultyCondition;
|
|
72
|
+
intermediate: () => DifficultyCondition;
|
|
73
|
+
advanced: () => DifficultyCondition;
|
|
74
|
+
expert: () => DifficultyCondition;
|
|
64
75
|
};
|
package/dist/models/Condition.js
CHANGED
|
@@ -30,5 +30,12 @@ exports.Condition = {
|
|
|
30
30
|
wellPracticed: (minReviews = 10) => ({ type: 'count', field: 'review_count', operator: '>', value: minReviews }),
|
|
31
31
|
// Starred condition
|
|
32
32
|
starred: () => ({ type: 'starred', value: true }),
|
|
33
|
-
notStarred: () => ({ type: 'starred', value: false })
|
|
33
|
+
notStarred: () => ({ type: 'starred', value: false }),
|
|
34
|
+
// Difficulty conditions
|
|
35
|
+
difficulty: (min, max) => ({ type: 'difficulty', min, max }),
|
|
36
|
+
beginner: () => ({ type: 'difficulty', max: 100 }), // Very easy content
|
|
37
|
+
elementary: () => ({ type: 'difficulty', min: 100, max: 500 }), // Easy
|
|
38
|
+
intermediate: () => ({ type: 'difficulty', min: 500, max: 1500 }), // Medium
|
|
39
|
+
advanced: () => ({ type: 'difficulty', min: 1500, max: 3000 }), // Hard
|
|
40
|
+
expert: () => ({ type: 'difficulty', min: 3000 }) // Very hard
|
|
34
41
|
};
|