@insignia-education/api-sdk-js 0.19.1 → 0.20.0
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/Admin.js +13 -0
- package/src/api/v1/Files.js +4 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -10,6 +10,19 @@ export default class Admin {
|
|
|
10
10
|
return this.#client.get('/admin/courses/current-dates', { page, per_page: perPage });
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Platform-wide "needs teacher correction" queue — every quiz attempt still
|
|
15
|
+
* awaiting a teacher's grade, across every course/teacher (unlike
|
|
16
|
+
* TeacherDashboard's ungraded-quiz endpoints, which are scoped to one
|
|
17
|
+
* teacher's own courses). Optional `courseId` narrows to one course,
|
|
18
|
+
* `search` matches the student's name or email.
|
|
19
|
+
*/
|
|
20
|
+
quizzesUngraded({ courseId, search, page, perPage } = {}) {
|
|
21
|
+
return this.#client.get('/admin/quizzes/ungraded', {
|
|
22
|
+
course_id: courseId, search, page, per_page: perPage,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
/** Date-range sales report: totals by status (pending/approved/rejected), and the same split by course, payment method and currency. */
|
|
14
27
|
statisticsSales({ fromDate, toDate } = {}) {
|
|
15
28
|
return this.#client.get('/admin/statistics/sales', { from_date: fromDate, to_date: toDate });
|
package/src/api/v1/Files.js
CHANGED
|
@@ -27,4 +27,8 @@ export default class Files {
|
|
|
27
27
|
* Returns a pending FileZipRequest immediately; the zip is built asynchronously and the
|
|
28
28
|
* requester is notified when it's ready. */
|
|
29
29
|
zip(body) { return this.#client.post('/files/zip', body); }
|
|
30
|
+
|
|
31
|
+
/** Invalidate CloudFront's cache for every object under a directory (recursive).
|
|
32
|
+
* body: { organization_id, directory }. Returns { directory, invalidated: true }. */
|
|
33
|
+
invalidateCache(body) { return this.#client.post('/files/invalidate-cache', body); }
|
|
30
34
|
}
|