@insignia-education/api-sdk-js 0.24.1 → 0.24.3
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/Sales.js +5 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -48,6 +48,11 @@ export default class Admin {
|
|
|
48
48
|
return this.#client.get('/admin/statistics/students-by-age-group');
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/** Average + count of the course survey ratings — `{ teacher, content, platform, ux, overall }`, each `{ average, count }` (`average` is `null` when nobody rated it). Counts are enrollments that answered that rating; `overall.average` spans every rating given and `overall.count` is enrollments with at least one. Teacher enrollments and deleted ones are excluded. `by_course` is `[{ course_id, title, teacher, content, platform, ux, overall }]` (same `{ average, count }` shape) for courses with at least one rating, best overall average first. */
|
|
52
|
+
statisticsCourseRatings() {
|
|
53
|
+
return this.#client.get('/admin/statistics/course-ratings');
|
|
54
|
+
}
|
|
55
|
+
|
|
51
56
|
/** 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. */
|
|
52
57
|
statisticsClaudeUsage({ fromDate, toDate } = {}) {
|
|
53
58
|
return this.#client.get('/admin/statistics/claude-usage', { from_date: fromDate, to_date: toDate });
|
package/src/api/v1/Sales.js
CHANGED
|
@@ -16,6 +16,11 @@ export default class Sales {
|
|
|
16
16
|
return this.#client.get('/sales/my-sales', { page, per_page: perPage });
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** Paginated list of the current seller's clients — users whose `seller_id` is the seller (`id, name, username, email, phone, created_at`). Optional `q` filters by name/username/email/phone. */
|
|
20
|
+
myClients({ page, perPage, q } = {}) {
|
|
21
|
+
return this.#client.get('/sales/my-clients', { page, per_page: perPage, q });
|
|
22
|
+
}
|
|
23
|
+
|
|
19
24
|
/** Sellers and above: users with all 3 KYC files uploaded but not yet verified. */
|
|
20
25
|
kycPending() { return this.#client.get('/sales/kyc-pending'); }
|
|
21
26
|
|