@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/sdk_schema.yml CHANGED
@@ -1,9 +1,105 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ibl-data-manager
4
- version: 4.44.0-core
4
+ version: 4.45.1-core
5
5
  description: API for iblai
6
6
  paths:
7
+ /api/analytics/content/:
8
+ get:
9
+ operationId: get_content_analytics
10
+ description: "\n Retrieve aggregated analytics for catalog content (courses,\
11
+ \ programs, pathways, skills).\n \n Returns both summary statistics\
12
+ \ and paginated list of content items with individual analytics.\n \
13
+ \ When a platform_key is provided, results are filtered to show only content\
14
+ \ consumed by \n learners associated with that platform.\n \n\
15
+ \ **Metrics supported:**\n - `course` or `courses`: Course analytics\n\
16
+ \ - `program` or `programs`: Program analytics \n - `pathway`\
17
+ \ or `pathways`: Pathway analytics\n - `skill` or `skills`: Skill analytics\n\
18
+ \ \n **Platform Filtering:**\n - Without platform_key:\
19
+ \ Shows global analytics across all platforms\n - With platform_key:\
20
+ \ Shows analytics filtered by platform learners only\n \n **External\
21
+ \ Content:**\n - Content not owned by the requesting platform but used\
22
+ \ by its learners is marked as \"external\"\n - External content has\
23
+ \ limited metadata exposure for privacy\n "
24
+ summary: Get Content Analytics
25
+ parameters:
26
+ - in: query
27
+ name: limit
28
+ schema:
29
+ type: integer
30
+ maximum: 100
31
+ minimum: 1
32
+ default: 20
33
+ description: Number of items per page (max 100)
34
+ - in: query
35
+ name: metric
36
+ schema:
37
+ enum:
38
+ - course
39
+ - courses
40
+ - program
41
+ - programs
42
+ - pathway
43
+ - pathways
44
+ - skill
45
+ - skills
46
+ type: string
47
+ minLength: 1
48
+ description: |-
49
+ The type of content to retrieve (course, program, pathway, skill)
50
+
51
+ * `course` - course
52
+ * `courses` - courses
53
+ * `program` - program
54
+ * `programs` - programs
55
+ * `pathway` - pathway
56
+ * `pathways` - pathways
57
+ * `skill` - skill
58
+ * `skills` - skills
59
+ required: true
60
+ - in: query
61
+ name: page
62
+ schema:
63
+ type: integer
64
+ minimum: 1
65
+ default: 1
66
+ description: Page number for pagination
67
+ - in: query
68
+ name: platform_key
69
+ schema:
70
+ type: string
71
+ nullable: true
72
+ description: Optional platform key to filter results by platform
73
+ tags:
74
+ - ai-analytics
75
+ - analytics
76
+ security:
77
+ - PlatformApiKeyAuthentication: []
78
+ responses:
79
+ '200':
80
+ content:
81
+ application/json:
82
+ schema:
83
+ $ref: '#/components/schemas/ContentResponse'
84
+ description: ''
85
+ '400':
86
+ content:
87
+ application/json:
88
+ schema:
89
+ description: Invalid metric or parameters
90
+ description: ''
91
+ '404':
92
+ content:
93
+ application/json:
94
+ schema:
95
+ description: Page out of range
96
+ description: ''
97
+ '500':
98
+ content:
99
+ application/json:
100
+ schema:
101
+ description: Internal server error
102
+ description: ''
7
103
  /api/analytics/learner/details:
8
104
  get:
9
105
  operationId: analytics_learner_details_retrieve
@@ -143,6 +239,7 @@ paths:
143
239
  if not provided.
144
240
  tags:
145
241
  - ai-analytics
242
+ - analytics
146
243
  security:
147
244
  - PlatformApiKeyAuthentication: []
148
245
  responses:
@@ -30809,6 +30906,247 @@ components:
30809
30906
  required:
30810
30907
  - key
30811
30908
  - value
30909
+ ContentAnalytics:
30910
+ type: object
30911
+ description: Serializer for individual content item analytics.
30912
+ properties:
30913
+ enrollments:
30914
+ type: integer
30915
+ description: Total enrollments for this item
30916
+ active_enrollments:
30917
+ type: integer
30918
+ description: Active enrollments for this item
30919
+ completion_rate:
30920
+ type: number
30921
+ format: double
30922
+ description: Completion rate percentage
30923
+ avg_rating:
30924
+ type: number
30925
+ format: double
30926
+ nullable: true
30927
+ description: Average rating
30928
+ rating_count:
30929
+ type: integer
30930
+ description: Number of ratings
30931
+ associated_courses:
30932
+ type: integer
30933
+ description: Associated courses (for skills)
30934
+ learners_count:
30935
+ type: integer
30936
+ description: Number of learners (for skills)
30937
+ required:
30938
+ - active_enrollments
30939
+ - completion_rate
30940
+ - enrollments
30941
+ ContentAverages:
30942
+ type: object
30943
+ description: Serializer for content summary averages.
30944
+ properties:
30945
+ completion_rate:
30946
+ type: number
30947
+ format: double
30948
+ description: Average completion rate percentage
30949
+ average_rating:
30950
+ type: number
30951
+ format: double
30952
+ description: Average rating
30953
+ enrollments_per_course:
30954
+ type: number
30955
+ format: double
30956
+ description: Average enrollments per course
30957
+ enrollments_per_program:
30958
+ type: number
30959
+ format: double
30960
+ description: Average enrollments per program
30961
+ enrollments_per_pathway:
30962
+ type: number
30963
+ format: double
30964
+ description: Average enrollments per pathway
30965
+ courses_per_skill:
30966
+ type: number
30967
+ format: double
30968
+ description: Average courses per skill
30969
+ ContentItem:
30970
+ type: object
30971
+ description: Serializer for individual content items.
30972
+ properties:
30973
+ id:
30974
+ type: string
30975
+ description: Content identifier
30976
+ name:
30977
+ type: string
30978
+ description: Content name
30979
+ slug:
30980
+ type: string
30981
+ description: Content slug
30982
+ platform:
30983
+ type: string
30984
+ nullable: true
30985
+ description: Platform key
30986
+ external:
30987
+ type: boolean
30988
+ description: Whether content is external to the platform
30989
+ analytics:
30990
+ $ref: '#/components/schemas/ContentAnalytics'
30991
+ instructor:
30992
+ type: string
30993
+ nullable: true
30994
+ description: Instructor name
30995
+ category:
30996
+ type: string
30997
+ nullable: true
30998
+ description: Content category
30999
+ duration:
31000
+ type: string
31001
+ nullable: true
31002
+ description: Content duration
31003
+ enabled:
31004
+ type: boolean
31005
+ description: Whether content is enabled
31006
+ created:
31007
+ type: string
31008
+ nullable: true
31009
+ description: Creation date
31010
+ updated:
31011
+ type: string
31012
+ nullable: true
31013
+ description: Last update date
31014
+ metadata: {}
31015
+ required:
31016
+ - analytics
31017
+ - external
31018
+ - id
31019
+ - name
31020
+ - platform
31021
+ - slug
31022
+ ContentPagination:
31023
+ type: object
31024
+ description: Serializer for content pagination metadata.
31025
+ properties:
31026
+ count:
31027
+ type: integer
31028
+ description: Total number of items
31029
+ next:
31030
+ type: string
31031
+ nullable: true
31032
+ description: URL for next page
31033
+ previous:
31034
+ type: string
31035
+ nullable: true
31036
+ description: URL for previous page
31037
+ current_page:
31038
+ type: integer
31039
+ description: Current page number
31040
+ total_pages:
31041
+ type: integer
31042
+ description: Total number of pages
31043
+ required:
31044
+ - count
31045
+ - current_page
31046
+ - total_pages
31047
+ ContentResponse:
31048
+ type: object
31049
+ description: Serializer for the complete content API response.
31050
+ properties:
31051
+ metric:
31052
+ type: string
31053
+ description: The metric type (course, program, pathway, skill)
31054
+ summary:
31055
+ allOf:
31056
+ - $ref: '#/components/schemas/ContentSummary'
31057
+ description: Summary statistics for the metric
31058
+ pagination:
31059
+ allOf:
31060
+ - $ref: '#/components/schemas/ContentPagination'
31061
+ description: Pagination metadata
31062
+ results:
31063
+ type: array
31064
+ items:
31065
+ $ref: '#/components/schemas/ContentItem'
31066
+ description: List of content items
31067
+ required:
31068
+ - metric
31069
+ - pagination
31070
+ - results
31071
+ - summary
31072
+ ContentSummary:
31073
+ type: object
31074
+ description: Serializer for content summary data.
31075
+ properties:
31076
+ totals:
31077
+ $ref: '#/components/schemas/ContentTotals'
31078
+ averages:
31079
+ $ref: '#/components/schemas/ContentAverages'
31080
+ required:
31081
+ - averages
31082
+ - totals
31083
+ ContentTotals:
31084
+ type: object
31085
+ description: Serializer for content summary totals.
31086
+ properties:
31087
+ total_learners:
31088
+ type: integer
31089
+ description: Total number of learners
31090
+ total_enrollments:
31091
+ type: integer
31092
+ description: Total number of enrollments
31093
+ courses:
31094
+ type: integer
31095
+ description: Total number of courses
31096
+ active_courses:
31097
+ type: integer
31098
+ description: Number of active courses
31099
+ platform_courses:
31100
+ type: integer
31101
+ description: Number of platform-owned courses
31102
+ external_courses:
31103
+ type: integer
31104
+ description: Number of external courses
31105
+ programs:
31106
+ type: integer
31107
+ description: Total number of programs
31108
+ active_programs:
31109
+ type: integer
31110
+ description: Number of active programs
31111
+ platform_programs:
31112
+ type: integer
31113
+ description: Number of platform-owned programs
31114
+ external_programs:
31115
+ type: integer
31116
+ description: Number of external programs
31117
+ pathways:
31118
+ type: integer
31119
+ description: Total number of pathways
31120
+ active_pathways:
31121
+ type: integer
31122
+ description: Number of active pathways
31123
+ platform_pathways:
31124
+ type: integer
31125
+ description: Number of platform-owned pathways
31126
+ external_pathways:
31127
+ type: integer
31128
+ description: Number of external pathways
31129
+ skills:
31130
+ type: integer
31131
+ description: Total number of skills
31132
+ active_skills:
31133
+ type: integer
31134
+ description: Number of active skills
31135
+ platform_skills:
31136
+ type: integer
31137
+ description: Number of platform-owned skills
31138
+ external_skills:
31139
+ type: integer
31140
+ description: Number of external skills
31141
+ associated_courses:
31142
+ type: integer
31143
+ description: Number of courses associated with skills
31144
+ learners_with_skills:
31145
+ type: integer
31146
+ description: Number of learners with skills
31147
+ required:
31148
+ - total_enrollments
31149
+ - total_learners
30812
31150
  ContextResponse:
30813
31151
  type: object
30814
31152
  description: Response serializer for context endpoint
@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
21
21
 
22
22
  export const OpenAPI: OpenAPIConfig = {
23
23
  BASE: 'https://base.manager.iblai.app',
24
- VERSION: '4.44.0-core',
24
+ VERSION: '4.45.1-core',
25
25
  WITH_CREDENTIALS: false,
26
26
  CREDENTIALS: 'include',
27
27
  TOKEN: undefined,
package/src/index.ts CHANGED
@@ -55,6 +55,13 @@ export { CeleryHeartbeatFailStatusEnum } from './models/CeleryHeartbeatFailStatu
55
55
  export { CeleryHeartbeatStatusEnum } from './models/CeleryHeartbeatStatusEnum';
56
56
  export type { Company } from './models/Company';
57
57
  export type { ConfigurationItem } from './models/ConfigurationItem';
58
+ export type { ContentAnalytics } from './models/ContentAnalytics';
59
+ export type { ContentAverages } from './models/ContentAverages';
60
+ export type { ContentItem } from './models/ContentItem';
61
+ export type { ContentPagination } from './models/ContentPagination';
62
+ export type { ContentResponse } from './models/ContentResponse';
63
+ export type { ContentSummary } from './models/ContentSummary';
64
+ export type { ContentTotals } from './models/ContentTotals';
58
65
  export type { ContextResponse } from './models/ContextResponse';
59
66
  export type { Count } from './models/Count';
60
67
  export type { CountData } from './models/CountData';
@@ -446,6 +453,7 @@ export type { WatchedVideosPerUserData } from './models/WatchedVideosPerUserData
446
453
  export type { WhitelistedDomain } from './models/WhitelistedDomain';
447
454
 
448
455
  export { AiAnalyticsService } from './services/AiAnalyticsService';
456
+ export { AnalyticsService } from './services/AnalyticsService';
449
457
  export { CareerService } from './services/CareerService';
450
458
  export { CatalogService } from './services/CatalogService';
451
459
  export { CommerceService } from './services/CommerceService';
@@ -0,0 +1,38 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for individual content item analytics.
7
+ */
8
+ export type ContentAnalytics = {
9
+ /**
10
+ * Total enrollments for this item
11
+ */
12
+ enrollments: number;
13
+ /**
14
+ * Active enrollments for this item
15
+ */
16
+ active_enrollments: number;
17
+ /**
18
+ * Completion rate percentage
19
+ */
20
+ completion_rate: number;
21
+ /**
22
+ * Average rating
23
+ */
24
+ avg_rating?: number | null;
25
+ /**
26
+ * Number of ratings
27
+ */
28
+ rating_count?: number;
29
+ /**
30
+ * Associated courses (for skills)
31
+ */
32
+ associated_courses?: number;
33
+ /**
34
+ * Number of learners (for skills)
35
+ */
36
+ learners_count?: number;
37
+ };
38
+
@@ -0,0 +1,34 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for content summary averages.
7
+ */
8
+ export type ContentAverages = {
9
+ /**
10
+ * Average completion rate percentage
11
+ */
12
+ completion_rate?: number;
13
+ /**
14
+ * Average rating
15
+ */
16
+ average_rating?: number;
17
+ /**
18
+ * Average enrollments per course
19
+ */
20
+ enrollments_per_course?: number;
21
+ /**
22
+ * Average enrollments per program
23
+ */
24
+ enrollments_per_program?: number;
25
+ /**
26
+ * Average enrollments per pathway
27
+ */
28
+ enrollments_per_pathway?: number;
29
+ /**
30
+ * Average courses per skill
31
+ */
32
+ courses_per_skill?: number;
33
+ };
34
+
@@ -0,0 +1,57 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { ContentAnalytics } from './ContentAnalytics';
6
+ /**
7
+ * Serializer for individual content items.
8
+ */
9
+ export type ContentItem = {
10
+ /**
11
+ * Content identifier
12
+ */
13
+ id: string;
14
+ /**
15
+ * Content name
16
+ */
17
+ name: string;
18
+ /**
19
+ * Content slug
20
+ */
21
+ slug: string;
22
+ /**
23
+ * Platform key
24
+ */
25
+ platform: string | null;
26
+ /**
27
+ * Whether content is external to the platform
28
+ */
29
+ external: boolean;
30
+ analytics: ContentAnalytics;
31
+ /**
32
+ * Instructor name
33
+ */
34
+ instructor?: string | null;
35
+ /**
36
+ * Content category
37
+ */
38
+ category?: string | null;
39
+ /**
40
+ * Content duration
41
+ */
42
+ duration?: string | null;
43
+ /**
44
+ * Whether content is enabled
45
+ */
46
+ enabled?: boolean;
47
+ /**
48
+ * Creation date
49
+ */
50
+ created?: string | null;
51
+ /**
52
+ * Last update date
53
+ */
54
+ updated?: string | null;
55
+ metadata?: any;
56
+ };
57
+
@@ -0,0 +1,30 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for content pagination metadata.
7
+ */
8
+ export type ContentPagination = {
9
+ /**
10
+ * Total number of items
11
+ */
12
+ count: number;
13
+ /**
14
+ * URL for next page
15
+ */
16
+ next?: string | null;
17
+ /**
18
+ * URL for previous page
19
+ */
20
+ previous?: string | null;
21
+ /**
22
+ * Current page number
23
+ */
24
+ current_page: number;
25
+ /**
26
+ * Total number of pages
27
+ */
28
+ total_pages: number;
29
+ };
30
+
@@ -0,0 +1,29 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { ContentItem } from './ContentItem';
6
+ import type { ContentPagination } from './ContentPagination';
7
+ import type { ContentSummary } from './ContentSummary';
8
+ /**
9
+ * Serializer for the complete content API response.
10
+ */
11
+ export type ContentResponse = {
12
+ /**
13
+ * The metric type (course, program, pathway, skill)
14
+ */
15
+ metric: string;
16
+ /**
17
+ * Summary statistics for the metric
18
+ */
19
+ summary: ContentSummary;
20
+ /**
21
+ * Pagination metadata
22
+ */
23
+ pagination: ContentPagination;
24
+ /**
25
+ * List of content items
26
+ */
27
+ results: Array<ContentItem>;
28
+ };
29
+
@@ -0,0 +1,14 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { ContentAverages } from './ContentAverages';
6
+ import type { ContentTotals } from './ContentTotals';
7
+ /**
8
+ * Serializer for content summary data.
9
+ */
10
+ export type ContentSummary = {
11
+ totals: ContentTotals;
12
+ averages: ContentAverages;
13
+ };
14
+
@@ -0,0 +1,90 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for content summary totals.
7
+ */
8
+ export type ContentTotals = {
9
+ /**
10
+ * Total number of learners
11
+ */
12
+ total_learners: number;
13
+ /**
14
+ * Total number of enrollments
15
+ */
16
+ total_enrollments: number;
17
+ /**
18
+ * Total number of courses
19
+ */
20
+ courses?: number;
21
+ /**
22
+ * Number of active courses
23
+ */
24
+ active_courses?: number;
25
+ /**
26
+ * Number of platform-owned courses
27
+ */
28
+ platform_courses?: number;
29
+ /**
30
+ * Number of external courses
31
+ */
32
+ external_courses?: number;
33
+ /**
34
+ * Total number of programs
35
+ */
36
+ programs?: number;
37
+ /**
38
+ * Number of active programs
39
+ */
40
+ active_programs?: number;
41
+ /**
42
+ * Number of platform-owned programs
43
+ */
44
+ platform_programs?: number;
45
+ /**
46
+ * Number of external programs
47
+ */
48
+ external_programs?: number;
49
+ /**
50
+ * Total number of pathways
51
+ */
52
+ pathways?: number;
53
+ /**
54
+ * Number of active pathways
55
+ */
56
+ active_pathways?: number;
57
+ /**
58
+ * Number of platform-owned pathways
59
+ */
60
+ platform_pathways?: number;
61
+ /**
62
+ * Number of external pathways
63
+ */
64
+ external_pathways?: number;
65
+ /**
66
+ * Total number of skills
67
+ */
68
+ skills?: number;
69
+ /**
70
+ * Number of active skills
71
+ */
72
+ active_skills?: number;
73
+ /**
74
+ * Number of platform-owned skills
75
+ */
76
+ platform_skills?: number;
77
+ /**
78
+ * Number of external skills
79
+ */
80
+ external_skills?: number;
81
+ /**
82
+ * Number of courses associated with skills
83
+ */
84
+ associated_courses?: number;
85
+ /**
86
+ * Number of learners with skills
87
+ */
88
+ learners_with_skills?: number;
89
+ };
90
+