timeback 0.1.4 → 0.1.6
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.
- package/README.md +38 -0
- package/dist/cli.js +28348 -7814
- package/package.json +8 -14
- package/schema.json +523 -133
- package/dist/cli/src/config.d.ts +0 -8
- package/dist/types/src/config.d.ts +0 -106
- package/dist/types/src/index.d.ts +0 -5
- package/dist/types/src/primitives.d.ts +0 -53
package/dist/cli/src/config.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config types for timeback.config.ts files.
|
|
3
|
-
*
|
|
4
|
-
* Re-exported from `@timeback/types` so users can import `timeback/config`
|
|
5
|
-
* for editor IntelliSense in TS config files. SDK users can also use
|
|
6
|
-
* `@timeback/sdk/config` which exports the same types.
|
|
7
|
-
*/
|
|
8
|
-
export type { CourseConfig, CourseDefaults, CourseGoals, CourseIds, CourseMetadata, CourseMetrics, CourseType, PublishStatus, TimebackConfig, } from '@timeback/types';
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timeback Config Types
|
|
3
|
-
*
|
|
4
|
-
* Types for timeback.config.ts files.
|
|
5
|
-
*/
|
|
6
|
-
import type { TimebackGrade, TimebackSubject } from './primitives';
|
|
7
|
-
/**
|
|
8
|
-
* Environment-specific course IDs.
|
|
9
|
-
* Populated by `timeback sync` for each environment.
|
|
10
|
-
*/
|
|
11
|
-
export interface CourseIds {
|
|
12
|
-
staging?: string;
|
|
13
|
-
production?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Course classification type.
|
|
17
|
-
*/
|
|
18
|
-
export type CourseType = 'base' | 'hole-filling' | 'optional';
|
|
19
|
-
/**
|
|
20
|
-
* Course publication status.
|
|
21
|
-
*/
|
|
22
|
-
export type PublishStatus = 'draft' | 'testing' | 'published' | 'deactivated';
|
|
23
|
-
/**
|
|
24
|
-
* Daily learning goals for a course.
|
|
25
|
-
*/
|
|
26
|
-
export interface CourseGoals {
|
|
27
|
-
/** Target XP to earn per day */
|
|
28
|
-
dailyXp?: number;
|
|
29
|
-
/** Target lessons to complete per day */
|
|
30
|
-
dailyLessons?: number;
|
|
31
|
-
/** Target active learning minutes per day */
|
|
32
|
-
dailyActiveMinutes?: number;
|
|
33
|
-
/** Target accuracy percentage (0-100) */
|
|
34
|
-
dailyAccuracy?: number;
|
|
35
|
-
/** Target units to master per day */
|
|
36
|
-
dailyMasteredUnits?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Aggregate metrics for a course.
|
|
40
|
-
*/
|
|
41
|
-
export interface CourseMetrics {
|
|
42
|
-
/** Total XP available in the course */
|
|
43
|
-
totalXp?: number;
|
|
44
|
-
/** Total number of lessons/activities */
|
|
45
|
-
totalLessons?: number;
|
|
46
|
-
/** Total grade levels covered */
|
|
47
|
-
totalGrades?: number;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Course metadata (matches API metadata object).
|
|
51
|
-
*/
|
|
52
|
-
export interface CourseMetadata {
|
|
53
|
-
/** Course classification (base, hole-filling, optional) */
|
|
54
|
-
courseType?: CourseType;
|
|
55
|
-
/** Whether this is supplemental to a base course */
|
|
56
|
-
isSupplemental?: boolean;
|
|
57
|
-
/** Whether this is a custom course for an individual student */
|
|
58
|
-
isCustom?: boolean;
|
|
59
|
-
/** Publication status */
|
|
60
|
-
publishStatus?: PublishStatus;
|
|
61
|
-
/** Contact email for course issues */
|
|
62
|
-
contactEmail?: string;
|
|
63
|
-
/** Primary application identifier */
|
|
64
|
-
primaryApp?: string;
|
|
65
|
-
/** Daily learning goals */
|
|
66
|
-
goals?: CourseGoals;
|
|
67
|
-
/** Aggregate metrics */
|
|
68
|
-
metrics?: CourseMetrics;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Default properties that apply to all courses unless overridden.
|
|
72
|
-
* Set these at the root level to avoid repetition.
|
|
73
|
-
*/
|
|
74
|
-
export interface CourseDefaults {
|
|
75
|
-
/** Course code (e.g., "MATH101") */
|
|
76
|
-
courseCode?: string;
|
|
77
|
-
/** Course level (e.g., "AP", "Honors") */
|
|
78
|
-
level?: string;
|
|
79
|
-
/** Course metadata */
|
|
80
|
-
metadata?: CourseMetadata;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Configuration for a single course in a Timeback app.
|
|
84
|
-
*/
|
|
85
|
-
export interface CourseConfig extends CourseDefaults {
|
|
86
|
-
/** Subject area (e.g., 'Math', 'Reading') */
|
|
87
|
-
subject: TimebackSubject;
|
|
88
|
-
/** Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP) */
|
|
89
|
-
grade: TimebackGrade;
|
|
90
|
-
/** Timeback course IDs per environment (populated after sync) */
|
|
91
|
-
ids?: CourseIds | null;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Root configuration for a Timeback app.
|
|
95
|
-
* Define this in your timeback.config.ts file.
|
|
96
|
-
*/
|
|
97
|
-
export interface TimebackConfig {
|
|
98
|
-
/** Display name for your app */
|
|
99
|
-
name: string;
|
|
100
|
-
/** Default properties applied to all courses */
|
|
101
|
-
defaults?: CourseDefaults;
|
|
102
|
-
/** Courses available in this app */
|
|
103
|
-
courses: CourseConfig[];
|
|
104
|
-
/** Caliper sensor URLs for event filtering */
|
|
105
|
-
sensors?: string[];
|
|
106
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timeback Shared Primitives
|
|
3
|
-
*
|
|
4
|
-
* Core types used across multiple Timeback protocols.
|
|
5
|
-
*
|
|
6
|
-
* Organization:
|
|
7
|
-
* - Shared types (this file): Used by multiple protocols (Caliper, OneRoster, etc.)
|
|
8
|
-
* - Protocol-specific types: Live in their respective protocols/X/primitives.ts files
|
|
9
|
-
*
|
|
10
|
-
* What belongs here:
|
|
11
|
-
* - TimebackSubject - Used in OneRoster courses AND Caliper events
|
|
12
|
-
* - TimebackGrade - Used across OneRoster, Caliper, and QTI
|
|
13
|
-
* - IMSErrorResponse - IMS Global standard used by multiple 1EdTech protocols
|
|
14
|
-
*
|
|
15
|
-
* What doesn't belong here:
|
|
16
|
-
* - OneRoster-specific: protocols/oneroster/primitives.ts
|
|
17
|
-
* - QTI-specific: protocols/qti/primitives.ts
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Valid Timeback subject values.
|
|
21
|
-
* Used in OneRoster courses and Caliper events.
|
|
22
|
-
*/
|
|
23
|
-
export type TimebackSubject = 'Reading' | 'Language' | 'Vocabulary' | 'Social Studies' | 'Writing' | 'Science' | 'FastMath' | 'Math' | 'None' | 'Other';
|
|
24
|
-
/**
|
|
25
|
-
* Grade levels per Timeback OneRoster GradeEnum (numeric).
|
|
26
|
-
* -1 = Pre-K, 0 = Kindergarten, 1-12 = Grades 1-12, 13 = AP
|
|
27
|
-
*
|
|
28
|
-
* Use for input types where numbers are accepted.
|
|
29
|
-
*/
|
|
30
|
-
export type TimebackGrade = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
|
|
31
|
-
/**
|
|
32
|
-
* Grade levels as strings (API response format).
|
|
33
|
-
* The database stores grades as text, so API responses return strings.
|
|
34
|
-
*
|
|
35
|
-
* Use for response types.
|
|
36
|
-
*/
|
|
37
|
-
export type TimebackGradeString = '-1' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13';
|
|
38
|
-
/**
|
|
39
|
-
* IMS Global error response format.
|
|
40
|
-
* Used across OneRoster, Caliper, and other 1EdTech protocols.
|
|
41
|
-
*/
|
|
42
|
-
export interface IMSErrorResponse {
|
|
43
|
-
imsx_codeMajor: 'failure' | 'success';
|
|
44
|
-
imsx_severity: 'error' | 'warning' | 'status';
|
|
45
|
-
imsx_description: string;
|
|
46
|
-
imsx_CodeMinor?: {
|
|
47
|
-
imsx_codeMinorField: Array<{
|
|
48
|
-
imsx_codeMinorFieldName: string;
|
|
49
|
-
imsx_codeMinorFieldValue: string;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
imsx_error_details?: Array<Record<string, string>>;
|
|
53
|
-
}
|