@playcademy/sdk 0.7.3-beta.3 → 0.7.3-beta.5
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/dist/internal.d.ts +25 -4
- package/dist/internal.js +3 -3
- package/package.json +1 -1
package/dist/internal.d.ts
CHANGED
|
@@ -557,6 +557,19 @@ interface TimebackStudentHistoryPoint {
|
|
|
557
557
|
masteredUnits: number;
|
|
558
558
|
}
|
|
559
559
|
type CourseCompletionStatus = 'none' | 'complete' | 'incomplete';
|
|
560
|
+
interface TimebackStudentEnrollmentSummary {
|
|
561
|
+
enrollmentId: string;
|
|
562
|
+
status: 'active' | 'tobedeleted';
|
|
563
|
+
beginDate: string | null;
|
|
564
|
+
endDate: string | null;
|
|
565
|
+
analyticsUnavailable: boolean;
|
|
566
|
+
totalXp: number;
|
|
567
|
+
todayXp: number;
|
|
568
|
+
activeTimeSeconds: number;
|
|
569
|
+
masteredUnits: number;
|
|
570
|
+
pctCompleteApp?: number;
|
|
571
|
+
history: TimebackStudentHistoryPoint[];
|
|
572
|
+
}
|
|
560
573
|
interface TimebackStudentCourseOverview {
|
|
561
574
|
courseId: string;
|
|
562
575
|
title: string;
|
|
@@ -573,6 +586,8 @@ interface TimebackStudentCourseOverview {
|
|
|
573
586
|
completionStatus: CourseCompletionStatus;
|
|
574
587
|
history: TimebackStudentHistoryPoint[];
|
|
575
588
|
inactive?: boolean;
|
|
589
|
+
/** All enrollment records for this course, sorted active-first then by most recent. */
|
|
590
|
+
enrollments?: TimebackStudentEnrollmentSummary[];
|
|
576
591
|
}
|
|
577
592
|
type TimebackRecentActivityKind = 'activity' | 'activity-in-progress' | 'time-spent' | 'remediation-xp' | 'remediation-time' | 'remediation-mastery' | 'course-completed' | 'course-resumed';
|
|
578
593
|
interface TimebackRecentActivity {
|
|
@@ -636,27 +651,33 @@ interface AdjustTimebackMasteryRequest {
|
|
|
636
651
|
/** See {@link GrantTimebackXpRequest.useCurrentTime}. */
|
|
637
652
|
useCurrentTime?: boolean;
|
|
638
653
|
}
|
|
639
|
-
interface
|
|
654
|
+
interface EnrollStudentRequest {
|
|
640
655
|
gameId: string;
|
|
641
656
|
courseId: string;
|
|
642
657
|
studentId: string;
|
|
643
|
-
action: 'complete' | 'resume';
|
|
644
658
|
}
|
|
645
|
-
interface
|
|
659
|
+
interface ReactivateEnrollmentRequest {
|
|
646
660
|
gameId: string;
|
|
647
661
|
courseId: string;
|
|
648
662
|
studentId: string;
|
|
663
|
+
enrollmentId: string;
|
|
649
664
|
}
|
|
650
665
|
interface UnenrollStudentRequest {
|
|
651
666
|
gameId: string;
|
|
652
667
|
courseId: string;
|
|
653
668
|
studentId: string;
|
|
654
669
|
}
|
|
670
|
+
interface SearchStudentPastEnrollment {
|
|
671
|
+
enrollmentId: string;
|
|
672
|
+
beginDate: string | null;
|
|
673
|
+
endDate: string | null;
|
|
674
|
+
}
|
|
655
675
|
interface SearchStudentResult {
|
|
656
676
|
studentId: string;
|
|
657
677
|
name: string;
|
|
658
678
|
email: string | null;
|
|
659
679
|
alreadyEnrolled: boolean;
|
|
680
|
+
pastEnrollments?: SearchStudentPastEnrollment[];
|
|
660
681
|
}
|
|
661
682
|
interface SearchStudentsResponse {
|
|
662
683
|
students: SearchStudentResult[];
|
|
@@ -7699,10 +7720,10 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
|
|
|
7699
7720
|
grantXp: (request: GrantTimebackXpRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7700
7721
|
adjustTime: (request: AdjustTimebackTimeRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7701
7722
|
adjustMastery: (request: AdjustTimebackMasteryRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7702
|
-
toggleCompletion: (request: ToggleCourseCompletionRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7703
7723
|
searchStudents: (gameId: string, courseId: string, query: string) => Promise<SearchStudentsResponse>;
|
|
7704
7724
|
enrollStudent: (request: EnrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7705
7725
|
unenrollStudent: (request: UnenrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7726
|
+
reactivateEnrollment: (request: ReactivateEnrollmentRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7706
7727
|
};
|
|
7707
7728
|
assessments: {
|
|
7708
7729
|
list: (gameId: string, courseId: string) => Promise<AssessmentSummary[]>;
|
package/dist/internal.js
CHANGED
|
@@ -3172,9 +3172,6 @@ function createTimebackNamespace2(client) {
|
|
|
3172
3172
|
adjustMastery: (request) => client["request"]("/timeback/adjust-mastery", "POST", {
|
|
3173
3173
|
body: request
|
|
3174
3174
|
}),
|
|
3175
|
-
toggleCompletion: (request) => client["request"]("/timeback/toggle-completion", "POST", {
|
|
3176
|
-
body: request
|
|
3177
|
-
}),
|
|
3178
3175
|
searchStudents: (gameId, courseId, query) => {
|
|
3179
3176
|
const params = new URLSearchParams({ q: query });
|
|
3180
3177
|
return client["request"](`/timeback/search-students/${gameId}/${courseId}?${params}`, "GET");
|
|
@@ -3184,6 +3181,9 @@ function createTimebackNamespace2(client) {
|
|
|
3184
3181
|
}),
|
|
3185
3182
|
unenrollStudent: (request) => client["request"]("/timeback/unenroll-student", "POST", {
|
|
3186
3183
|
body: request
|
|
3184
|
+
}),
|
|
3185
|
+
reactivateEnrollment: (request) => client["request"]("/timeback/reactivate-enrollment", "POST", {
|
|
3186
|
+
body: request
|
|
3187
3187
|
})
|
|
3188
3188
|
},
|
|
3189
3189
|
assessments: {
|