@insignia-education/api-sdk-js 0.15.109 → 0.15.111
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/package.json +1 -1
- package/src/api/v1/Courses.js +4 -0
- package/src/api/v1/Teacher.js +2 -0
package/package.json
CHANGED
package/src/api/v1/Courses.js
CHANGED
|
@@ -56,6 +56,10 @@ export default class Courses {
|
|
|
56
56
|
create: (data) => this.#client.put(base, data),
|
|
57
57
|
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
58
58
|
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
59
|
+
/** Soft-deleted dates for this course, most recently deleted first — the "Deleted" tab, for undoing a mistaken delete(). */
|
|
60
|
+
trashed: () => this.#client.get(`${base}/trashed`),
|
|
61
|
+
/** Undoes delete() — brings a soft-deleted date back into the normal list. */
|
|
62
|
+
restore: (id) => this.#client.post(`${base}/${id}/restore`),
|
|
59
63
|
/** Create (or reuse) a Telegram group for this date. */
|
|
60
64
|
createTelegramGroup: (id) => this.#client.post(`${base}/${id}/telegram-group`),
|
|
61
65
|
/** Re-copy this date's telegram_link/telegram_id onto every UserCourse assigned to it. */
|
package/src/api/v1/Teacher.js
CHANGED
|
@@ -54,6 +54,8 @@ export default class Teacher {
|
|
|
54
54
|
courseDates: () => this.#client.get(`${base}/course-dates`),
|
|
55
55
|
/** All sessions for one CourseDate, each with a `students` roster ({id, name, present}). */
|
|
56
56
|
courseDateSessions: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/sessions`),
|
|
57
|
+
/** Enrolled roster ({id, name, email}) for one CourseDate, read straight off enrollment — shows up even before any session has been synced. Read-only: does not move students between dates. */
|
|
58
|
+
courseDateStudents: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/students`),
|
|
57
59
|
/** { url, pending } — the zip archive of this group's course materials, or pending:true while it's (re)building. */
|
|
58
60
|
courseDateContentDownload: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/content-download`),
|
|
59
61
|
/** Ungraded quiz submissions from one CourseDate's own students. */
|