@iblai/iblai-api 4.44.1-core → 4.45.1-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.
- package/dist/index.cjs.js +127 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +127 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +127 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/types/models/ContentAnalytics.d.ts +33 -0
- package/dist/types/models/ContentAverages.d.ts +29 -0
- package/dist/types/models/ContentItem.d.ts +52 -0
- package/dist/types/models/ContentPagination.d.ts +25 -0
- package/dist/types/models/ContentResponse.d.ts +24 -0
- package/dist/types/models/ContentSummary.d.ts +9 -0
- package/dist/types/models/ContentTotals.d.ts +85 -0
- package/dist/types/services/AiAnalyticsService.d.ts +54 -0
- package/dist/types/services/AnalyticsService.d.ts +95 -0
- package/package.json +1 -1
- package/sdk_schema.yml +339 -1
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +8 -0
- package/src/models/ContentAnalytics.ts +38 -0
- package/src/models/ContentAverages.ts +34 -0
- package/src/models/ContentItem.ts +57 -0
- package/src/models/ContentPagination.ts +30 -0
- package/src/models/ContentResponse.ts +29 -0
- package/src/models/ContentSummary.ts +14 -0
- package/src/models/ContentTotals.ts +90 -0
- package/src/services/AiAnalyticsService.ts +70 -0
- package/src/services/AnalyticsService.ts +133 -0
|
@@ -8,6 +8,7 @@ import type { ActivityAPI } from '../models/ActivityAPI';
|
|
|
8
8
|
import type { Average } from '../models/Average';
|
|
9
9
|
import type { AverageOvertime } from '../models/AverageOvertime';
|
|
10
10
|
import type { AvgCourseGradeWithCutoff } from '../models/AvgCourseGradeWithCutoff';
|
|
11
|
+
import type { ContentResponse } from '../models/ContentResponse';
|
|
11
12
|
import type { Count } from '../models/Count';
|
|
12
13
|
import type { CourseCompletionPerCourse } from '../models/CourseCompletionPerCourse';
|
|
13
14
|
import type { CourseCompletionSummaryOvertime } from '../models/CourseCompletionSummaryOvertime';
|
|
@@ -51,6 +52,75 @@ import type { CancelablePromise } from '../core/CancelablePromise';
|
|
|
51
52
|
import { OpenAPI } from '../core/OpenAPI';
|
|
52
53
|
import { request as __request } from '../core/request';
|
|
53
54
|
export class AiAnalyticsService {
|
|
55
|
+
/**
|
|
56
|
+
* Get Content Analytics
|
|
57
|
+
*
|
|
58
|
+
* Retrieve aggregated analytics for catalog content (courses, programs, pathways, skills).
|
|
59
|
+
*
|
|
60
|
+
* Returns both summary statistics and paginated list of content items with individual analytics.
|
|
61
|
+
* When a platform_key is provided, results are filtered to show only content consumed by
|
|
62
|
+
* learners associated with that platform.
|
|
63
|
+
*
|
|
64
|
+
* **Metrics supported:**
|
|
65
|
+
* - `course` or `courses`: Course analytics
|
|
66
|
+
* - `program` or `programs`: Program analytics
|
|
67
|
+
* - `pathway` or `pathways`: Pathway analytics
|
|
68
|
+
* - `skill` or `skills`: Skill analytics
|
|
69
|
+
*
|
|
70
|
+
* **Platform Filtering:**
|
|
71
|
+
* - Without platform_key: Shows global analytics across all platforms
|
|
72
|
+
* - With platform_key: Shows analytics filtered by platform learners only
|
|
73
|
+
*
|
|
74
|
+
* **External Content:**
|
|
75
|
+
* - Content not owned by the requesting platform but used by its learners is marked as "external"
|
|
76
|
+
* - External content has limited metadata exposure for privacy
|
|
77
|
+
*
|
|
78
|
+
* @returns ContentResponse
|
|
79
|
+
* @throws ApiError
|
|
80
|
+
*/
|
|
81
|
+
public static getContentAnalytics({
|
|
82
|
+
metric,
|
|
83
|
+
limit = 20,
|
|
84
|
+
page = 1,
|
|
85
|
+
platformKey,
|
|
86
|
+
}: {
|
|
87
|
+
/**
|
|
88
|
+
* The type of content to retrieve (course, program, pathway, skill)
|
|
89
|
+
*
|
|
90
|
+
* * `course` - course
|
|
91
|
+
* * `courses` - courses
|
|
92
|
+
* * `program` - program
|
|
93
|
+
* * `programs` - programs
|
|
94
|
+
* * `pathway` - pathway
|
|
95
|
+
* * `pathways` - pathways
|
|
96
|
+
* * `skill` - skill
|
|
97
|
+
* * `skills` - skills
|
|
98
|
+
*/
|
|
99
|
+
metric: 'course' | 'courses' | 'program' | 'programs' | 'pathway' | 'pathways' | 'skill' | 'skills',
|
|
100
|
+
/**
|
|
101
|
+
* Number of items per page (max 100)
|
|
102
|
+
*/
|
|
103
|
+
limit?: number,
|
|
104
|
+
/**
|
|
105
|
+
* Page number for pagination
|
|
106
|
+
*/
|
|
107
|
+
page?: number,
|
|
108
|
+
/**
|
|
109
|
+
* Optional platform key to filter results by platform
|
|
110
|
+
*/
|
|
111
|
+
platformKey?: string | null,
|
|
112
|
+
}): CancelablePromise<ContentResponse> {
|
|
113
|
+
return __request(OpenAPI, {
|
|
114
|
+
method: 'GET',
|
|
115
|
+
url: '/api/analytics/content/',
|
|
116
|
+
query: {
|
|
117
|
+
'limit': limit,
|
|
118
|
+
'metric': metric,
|
|
119
|
+
'page': page,
|
|
120
|
+
'platform_key': platformKey,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
54
124
|
/**
|
|
55
125
|
*
|
|
56
126
|
* Retrieve a holistic snapshot of a learner across catalog enrollments, mentor
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ContentResponse } from '../models/ContentResponse';
|
|
6
|
+
import type { LearnerAnalyticsResponse } from '../models/LearnerAnalyticsResponse';
|
|
7
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
8
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
9
|
+
import { request as __request } from '../core/request';
|
|
10
|
+
export class AnalyticsService {
|
|
11
|
+
/**
|
|
12
|
+
* Get Content Analytics
|
|
13
|
+
*
|
|
14
|
+
* Retrieve aggregated analytics for catalog content (courses, programs, pathways, skills).
|
|
15
|
+
*
|
|
16
|
+
* Returns both summary statistics and paginated list of content items with individual analytics.
|
|
17
|
+
* When a platform_key is provided, results are filtered to show only content consumed by
|
|
18
|
+
* learners associated with that platform.
|
|
19
|
+
*
|
|
20
|
+
* **Metrics supported:**
|
|
21
|
+
* - `course` or `courses`: Course analytics
|
|
22
|
+
* - `program` or `programs`: Program analytics
|
|
23
|
+
* - `pathway` or `pathways`: Pathway analytics
|
|
24
|
+
* - `skill` or `skills`: Skill analytics
|
|
25
|
+
*
|
|
26
|
+
* **Platform Filtering:**
|
|
27
|
+
* - Without platform_key: Shows global analytics across all platforms
|
|
28
|
+
* - With platform_key: Shows analytics filtered by platform learners only
|
|
29
|
+
*
|
|
30
|
+
* **External Content:**
|
|
31
|
+
* - Content not owned by the requesting platform but used by its learners is marked as "external"
|
|
32
|
+
* - External content has limited metadata exposure for privacy
|
|
33
|
+
*
|
|
34
|
+
* @returns ContentResponse
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
public static getContentAnalytics({
|
|
38
|
+
metric,
|
|
39
|
+
limit = 20,
|
|
40
|
+
page = 1,
|
|
41
|
+
platformKey,
|
|
42
|
+
}: {
|
|
43
|
+
/**
|
|
44
|
+
* The type of content to retrieve (course, program, pathway, skill)
|
|
45
|
+
*
|
|
46
|
+
* * `course` - course
|
|
47
|
+
* * `courses` - courses
|
|
48
|
+
* * `program` - program
|
|
49
|
+
* * `programs` - programs
|
|
50
|
+
* * `pathway` - pathway
|
|
51
|
+
* * `pathways` - pathways
|
|
52
|
+
* * `skill` - skill
|
|
53
|
+
* * `skills` - skills
|
|
54
|
+
*/
|
|
55
|
+
metric: 'course' | 'courses' | 'program' | 'programs' | 'pathway' | 'pathways' | 'skill' | 'skills',
|
|
56
|
+
/**
|
|
57
|
+
* Number of items per page (max 100)
|
|
58
|
+
*/
|
|
59
|
+
limit?: number,
|
|
60
|
+
/**
|
|
61
|
+
* Page number for pagination
|
|
62
|
+
*/
|
|
63
|
+
page?: number,
|
|
64
|
+
/**
|
|
65
|
+
* Optional platform key to filter results by platform
|
|
66
|
+
*/
|
|
67
|
+
platformKey?: string | null,
|
|
68
|
+
}): CancelablePromise<ContentResponse> {
|
|
69
|
+
return __request(OpenAPI, {
|
|
70
|
+
method: 'GET',
|
|
71
|
+
url: '/api/analytics/content/',
|
|
72
|
+
query: {
|
|
73
|
+
'limit': limit,
|
|
74
|
+
'metric': metric,
|
|
75
|
+
'page': page,
|
|
76
|
+
'platform_key': platformKey,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Unified API endpoint for learner analytics.
|
|
82
|
+
*
|
|
83
|
+
* This endpoint provides either:
|
|
84
|
+
* 1. Cross-platform summary (when only username is provided)
|
|
85
|
+
* 2. Platform-specific detailed data (when username + platform_key are provided)
|
|
86
|
+
*
|
|
87
|
+
* Query params:
|
|
88
|
+
* - username (required): Username of the learner
|
|
89
|
+
* - platform_key (optional): Platform key for platform-specific data
|
|
90
|
+
* - page (optional): Page number (default: 1)
|
|
91
|
+
* - limit (optional): Records per page (default: 20, max: 100)
|
|
92
|
+
*
|
|
93
|
+
* Returns:
|
|
94
|
+
* - If platform_key provided: Detailed platform metrics
|
|
95
|
+
* - If no platform_key: Cross-platform summary with pagination
|
|
96
|
+
* @returns LearnerAnalyticsResponse
|
|
97
|
+
* @throws ApiError
|
|
98
|
+
*/
|
|
99
|
+
public static analyticsLearnersRetrieve({
|
|
100
|
+
limit = 20,
|
|
101
|
+
page = 1,
|
|
102
|
+
platformKey,
|
|
103
|
+
username,
|
|
104
|
+
}: {
|
|
105
|
+
/**
|
|
106
|
+
* Number of records per page (default: 20, max: 100)
|
|
107
|
+
*/
|
|
108
|
+
limit?: number,
|
|
109
|
+
/**
|
|
110
|
+
* Page number (default: 1)
|
|
111
|
+
*/
|
|
112
|
+
page?: number,
|
|
113
|
+
/**
|
|
114
|
+
* Optional platform key - if provided, returns platform-specific detailed data
|
|
115
|
+
*/
|
|
116
|
+
platformKey?: string,
|
|
117
|
+
/**
|
|
118
|
+
* Username of the learner to get analytics for. Defaults to self if not provided.
|
|
119
|
+
*/
|
|
120
|
+
username?: string,
|
|
121
|
+
}): CancelablePromise<LearnerAnalyticsResponse> {
|
|
122
|
+
return __request(OpenAPI, {
|
|
123
|
+
method: 'GET',
|
|
124
|
+
url: '/api/analytics/learners/',
|
|
125
|
+
query: {
|
|
126
|
+
'limit': limit,
|
|
127
|
+
'page': page,
|
|
128
|
+
'platform_key': platformKey,
|
|
129
|
+
'username': username,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|