@insignia-education/api-sdk-js 0.15.99 → 0.15.101
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 +2 -0
- package/src/api/v1/Users.js +7 -0
package/package.json
CHANGED
package/src/api/v1/Courses.js
CHANGED
|
@@ -58,6 +58,8 @@ export default class Courses {
|
|
|
58
58
|
syncAttendances: (id) => this.#client.post(`${base}/${id}/sync-attendances`),
|
|
59
59
|
/** Sessions already generated for this date. */
|
|
60
60
|
sessions: (id) => this.#client.get(`${base}/${id}/sessions`),
|
|
61
|
+
/** Enrolled students (UserCourse rows, teacher rows excluded) assigned to this date. */
|
|
62
|
+
students: (id) => this.#client.get(`${base}/${id}/students`),
|
|
61
63
|
/** Create a Zoom meeting for one of this date's generated sessions. */
|
|
62
64
|
generateZoomMeeting: (id, sessionId) => this.#client.post(`${base}/${id}/sessions/${sessionId}/zoom-meeting`),
|
|
63
65
|
/** Create a Zoom meeting for every session in this date that doesn't have one yet. */
|
package/src/api/v1/Users.js
CHANGED
|
@@ -53,6 +53,13 @@ export default class Users {
|
|
|
53
53
|
rebuildCertificate: (courseId) => client.post(`${base}/${courseId}/certificate/rebuild`),
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
/** Sellers-and-above: the courses this user is assigned as teacher for (user_courses.teacher = 1). */
|
|
58
|
+
teachingCourses(userId) {
|
|
59
|
+
const client = this.#client;
|
|
60
|
+
return { get: () => client.get(`/users/${userId}/teaching-courses`) };
|
|
61
|
+
}
|
|
62
|
+
|
|
56
63
|
courseNotes(userId) { return this.#nested(userId, 'course-notes'); }
|
|
57
64
|
|
|
58
65
|
/** get() accepts optional { courseId, withTrashed } filters — withTrashed also returns soft-deleted attempts. */
|