@insignia-education/api-sdk-js 0.15.118 → 0.15.120

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.118",
3
+ "version": "0.15.120",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -50,7 +50,7 @@ export default class Teacher {
50
50
  return {
51
51
  /** Own scheduled sessions for a given date (YYYY-MM-DD), each with a `students` roster ({id, name, present}). */
52
52
  sessions: (date) => this.#client.get(`${base}/sessions`, { date }),
53
- /** Every CourseDate this teacher is assigned to. */
53
+ /** Every CourseDate this teacher is assigned to, each with a `students_count` (enrolled non-teacher rows). Groups nobody is enrolled in are included, with `students_count: 0`. */
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`),
@@ -242,13 +242,15 @@ export default class Users {
242
242
  /** GDPR access/portability request (Art. 15/20) — self-service or sales-and-above. Runs synchronously and returns the DataRequest with `pdf_url`/`json_url` already populated. */
243
243
  exportData(userId) { return this.#client.post(`/users/${userId}/data-export`); }
244
244
 
245
- /** Notifications are created by internal services, not over the API — `resend()` is the one exception (sales-and-above). */
245
+ /** Notifications are created by internal services, not over the API — `resend()` and `send()` (both sales-and-above) are the exceptions. */
246
246
  notifications(userId) {
247
247
  const base = `/users/${userId}/notifications`;
248
248
  const client = this.#client;
249
249
  return {
250
250
  get: () => client.get(base),
251
251
  resend: (id) => client.post(`${base}/${id}/resend`),
252
+ /** Composes and sends (or schedules) a one-off message to this user. data: { subject, content, channels, include_signature?, scheduled_at? }. */
253
+ send: (data) => client.post(`${base}/send`, data),
252
254
  };
253
255
  }
254
256