feat: enhance API and middleware functionality: add public API routes, implement program and course member checks, and improve rate limiting for invite acceptance. Update OpenAPI spec generation to focus on public API endpoints and add new middleware for automation key scopes. Include new documentation for lesson AI features and public API tests.

This commit is contained in:
Rotimi Best
2026-04-12 08:58:41 +01:00
parent 5a8f50f67b
commit d6e812d08b
573 changed files with 31964 additions and 8708 deletions
@@ -7,9 +7,9 @@ import type { DashStatsSuccess } from '$features/org/utils/types';
*/
class DashStatApi extends BaseApi {
stats = $state<DashStatsSuccess['data']>({
enrollments: [],
recentCertifications: [],
numberOfCourses: 0,
revenue: 0,
totalCertificates: 0,
totalStudents: 0,
topCourses: []
});
@@ -18,7 +18,7 @@ class DashStatApi extends BaseApi {
* Fetches dashboard statistics for an organization
* @param orgId Optional organization ID
* @param siteName Optional site name
* @returns Organization analytics data (enrollments, courses, revenue, students, top courses)
* @returns Organization analytics data (certifications, courses, students, top courses)
*/
async fetchOrgStats({ orgId, siteName }: { orgId?: string; siteName?: string }) {
await this.execute<typeof classroomio.dash.stats.$get>({