@insignia-education/api-sdk-js 0.15.92 → 0.15.95
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 +5 -0
- package/src/api/v1/Files.js +5 -0
- package/src/api/v1/Teacher.js +2 -2
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -15,6 +15,11 @@ export default class Admin {
|
|
|
15
15
|
return this.#client.get('/admin/statistics/sales', { from_date: fromDate, to_date: toDate });
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/** Claude (Anthropic) token usage/spend for a date range, plus account balance. Each half resolves `{ available: false }` (not an error) when its required config (admin key / account balance) isn't set. */
|
|
19
|
+
statisticsClaudeUsage({ fromDate, toDate } = {}) {
|
|
20
|
+
return this.#client.get('/admin/statistics/claude-usage', { from_date: fromDate, to_date: toDate });
|
|
21
|
+
}
|
|
22
|
+
|
|
18
23
|
/** Paginated sales-report rows for a date range, with optional course/seller/payment-method/currency filters. */
|
|
19
24
|
reportsSales({ fromDate, toDate, courseId, sellerId, paymentMethodId, currencyId, page, perPage } = {}) {
|
|
20
25
|
return this.#client.get('/admin/reports/sales', {
|
package/src/api/v1/Files.js
CHANGED
|
@@ -22,4 +22,9 @@ export default class Files {
|
|
|
22
22
|
|
|
23
23
|
/** Soft-delete a file. Pass s3=true to also remove from S3. */
|
|
24
24
|
delete(id, s3 = false) { return this.#client.del(`/files/${id}${s3 ? '?s3=1' : ''}`); }
|
|
25
|
+
|
|
26
|
+
/** Queue a zip of every file under a directory (recursive). body: { organization_id, directory }.
|
|
27
|
+
* Returns a pending FileZipRequest immediately; the zip is built asynchronously and the
|
|
28
|
+
* requester is notified when it's ready. */
|
|
29
|
+
zip(body) { return this.#client.post('/files/zip', body); }
|
|
25
30
|
}
|
package/src/api/v1/Teacher.js
CHANGED
|
@@ -60,8 +60,8 @@ export default class Teacher {
|
|
|
60
60
|
courseDateGradedQuizzes: (courseDateId, quizId = null) => this.#client.get(`${base}/course-dates/${courseDateId}/quizzes/graded`, quizId ? { quiz_id: quizId } : {}),
|
|
61
61
|
/** Distinct { id, title } quizzes needing correction under this CourseDate's course — for the graded-tab quiz filter. */
|
|
62
62
|
courseDateCorrectableQuizzes: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/quizzes/correctable`),
|
|
63
|
-
/** Ungraded quiz submissions grouped by course, for every course this teacher teaches. */
|
|
64
|
-
ungradedQuizzes: () => this.#client.get(`${base}/quizzes/ungraded
|
|
63
|
+
/** Ungraded quiz submissions grouped by course, for every course this teacher teaches. hasCertificate (true/false) narrows to courses with/without Course.certificate_exam_enabled; omit for every course. */
|
|
64
|
+
ungradedQuizzes: (hasCertificate = null) => this.#client.get(`${base}/quizzes/ungraded`, hasCertificate === null ? {} : { has_certificate: hasCertificate ? 1 : 0 }),
|
|
65
65
|
/** Ungraded quiz submissions for one course (any student, not just one CourseDate's) — for courses with no cohort scheduling, e.g. placement exams. */
|
|
66
66
|
courseUngradedQuizzes: (courseId) => this.#client.get(`${base}/courses/${courseId}/quizzes/ungraded`),
|
|
67
67
|
/** Already-graded quiz submissions for one course, optionally narrowed to one quiz. */
|