@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insignia-education/api-sdk-js",
3
- "version": "0.15.99",
3
+ "version": "0.15.101",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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. */
@@ -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. */