@iblai/iblai-api 4.23.2-test-core → 4.24.0-core

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.
@@ -2,17 +2,14 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ /**
6
+ * Serializer for user information.
7
+ */
5
8
  export type UserInfo = {
6
- /**
7
- * edX user ID
8
- */
9
- id: number;
10
- /**
11
- * edX username
12
- */
13
- username?: string | null;
14
- email: string;
15
- active: boolean;
16
- edx_data: any;
9
+ user_id: number;
10
+ username: string | null;
11
+ email: string | null;
12
+ name: string;
13
+ is_active: boolean;
17
14
  };
18
15
 
@@ -18,6 +18,7 @@ import type { EngagementPerCourse } from '../models/EngagementPerCourse';
18
18
  import type { Enrollments } from '../models/Enrollments';
19
19
  import type { EnrollmentsPerUser } from '../models/EnrollmentsPerUser';
20
20
  import type { GradingPerUser } from '../models/GradingPerUser';
21
+ import type { LearnerAnalyticsResponse } from '../models/LearnerAnalyticsResponse';
21
22
  import type { LearnerInformationAPI } from '../models/LearnerInformationAPI';
22
23
  import type { NewPerLearnerList } from '../models/NewPerLearnerList';
23
24
  import type { OvertimeWithChangeInfo } from '../models/OvertimeWithChangeInfo';
@@ -49,6 +50,59 @@ import type { CancelablePromise } from '../core/CancelablePromise';
49
50
  import { OpenAPI } from '../core/OpenAPI';
50
51
  import { request as __request } from '../core/request';
51
52
  export class AiAnalyticsService {
53
+ /**
54
+ * Unified API endpoint for learner analytics.
55
+ *
56
+ * This endpoint provides either:
57
+ * 1. Cross-platform summary (when only username is provided)
58
+ * 2. Platform-specific detailed data (when username + platform_key are provided)
59
+ *
60
+ * Query params:
61
+ * - username (required): Username of the learner
62
+ * - platform_key (optional): Platform key for platform-specific data
63
+ * - page (optional): Page number (default: 1)
64
+ * - limit (optional): Records per page (default: 20, max: 100)
65
+ *
66
+ * Returns:
67
+ * - If platform_key provided: Detailed platform metrics
68
+ * - If no platform_key: Cross-platform summary with pagination
69
+ * @returns LearnerAnalyticsResponse
70
+ * @throws ApiError
71
+ */
72
+ public static analyticsLearnersRetrieve({
73
+ limit = 20,
74
+ page = 1,
75
+ platformKey,
76
+ username,
77
+ }: {
78
+ /**
79
+ * Number of records per page (default: 20, max: 100)
80
+ */
81
+ limit?: number,
82
+ /**
83
+ * Page number (default: 1)
84
+ */
85
+ page?: number,
86
+ /**
87
+ * Optional platform key - if provided, returns platform-specific detailed data
88
+ */
89
+ platformKey?: string,
90
+ /**
91
+ * Username of the learner to get analytics for. Defaults to self if not provided.
92
+ */
93
+ username?: string,
94
+ }): CancelablePromise<LearnerAnalyticsResponse> {
95
+ return __request(OpenAPI, {
96
+ method: 'GET',
97
+ url: '/api/analytics/learners/',
98
+ query: {
99
+ 'limit': limit,
100
+ 'page': page,
101
+ 'platform_key': platformKey,
102
+ 'username': username,
103
+ },
104
+ });
105
+ }
52
106
  /**
53
107
  * Update time spent tracking data from client-side events.
54
108
  *