@easyedu/js-lsm-api 1.123.0 → 1.124.0

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.
Files changed (50) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +9 -2
  3. package/dist/apis/ReportingApi.d.ts +16 -0
  4. package/dist/apis/ReportingApi.js +39 -0
  5. package/dist/esm/apis/ReportingApi.d.ts +16 -0
  6. package/dist/esm/apis/ReportingApi.js +39 -0
  7. package/dist/esm/models/GetPortalManagementDashboard.d.ts +73 -0
  8. package/dist/esm/models/GetPortalManagementDashboard.js +72 -0
  9. package/dist/esm/models/GetPortalManagementDashboardActivityDay.d.ts +50 -0
  10. package/dist/esm/models/GetPortalManagementDashboardActivityDay.js +55 -0
  11. package/dist/esm/models/GetPortalManagementDashboardAttention.d.ts +56 -0
  12. package/dist/esm/models/GetPortalManagementDashboardAttention.js +59 -0
  13. package/dist/esm/models/GetPortalManagementDashboardEnrollmentStatus.d.ts +44 -0
  14. package/dist/esm/models/GetPortalManagementDashboardEnrollmentStatus.js +51 -0
  15. package/dist/esm/models/GetPortalManagementDashboardSummary.d.ts +74 -0
  16. package/dist/esm/models/GetPortalManagementDashboardSummary.js +71 -0
  17. package/dist/esm/models/GetPortalManagementDashboardTopCourse.d.ts +56 -0
  18. package/dist/esm/models/GetPortalManagementDashboardTopCourse.js +59 -0
  19. package/dist/esm/models/index.d.ts +6 -0
  20. package/dist/esm/models/index.js +6 -0
  21. package/dist/models/GetPortalManagementDashboard.d.ts +73 -0
  22. package/dist/models/GetPortalManagementDashboard.js +79 -0
  23. package/dist/models/GetPortalManagementDashboardActivityDay.d.ts +50 -0
  24. package/dist/models/GetPortalManagementDashboardActivityDay.js +62 -0
  25. package/dist/models/GetPortalManagementDashboardAttention.d.ts +56 -0
  26. package/dist/models/GetPortalManagementDashboardAttention.js +66 -0
  27. package/dist/models/GetPortalManagementDashboardEnrollmentStatus.d.ts +44 -0
  28. package/dist/models/GetPortalManagementDashboardEnrollmentStatus.js +58 -0
  29. package/dist/models/GetPortalManagementDashboardSummary.d.ts +74 -0
  30. package/dist/models/GetPortalManagementDashboardSummary.js +78 -0
  31. package/dist/models/GetPortalManagementDashboardTopCourse.d.ts +56 -0
  32. package/dist/models/GetPortalManagementDashboardTopCourse.js +66 -0
  33. package/dist/models/index.d.ts +6 -0
  34. package/dist/models/index.js +6 -0
  35. package/docs/GetPortalManagementDashboard.md +46 -0
  36. package/docs/GetPortalManagementDashboardActivityDay.md +40 -0
  37. package/docs/GetPortalManagementDashboardAttention.md +42 -0
  38. package/docs/GetPortalManagementDashboardEnrollmentStatus.md +38 -0
  39. package/docs/GetPortalManagementDashboardSummary.md +48 -0
  40. package/docs/GetPortalManagementDashboardTopCourse.md +42 -0
  41. package/docs/ReportingApi.md +67 -0
  42. package/package.json +1 -1
  43. package/src/apis/ReportingApi.ts +50 -0
  44. package/src/models/GetPortalManagementDashboard.ts +156 -0
  45. package/src/models/GetPortalManagementDashboardActivityDay.ts +93 -0
  46. package/src/models/GetPortalManagementDashboardAttention.ts +102 -0
  47. package/src/models/GetPortalManagementDashboardEnrollmentStatus.ts +84 -0
  48. package/src/models/GetPortalManagementDashboardSummary.ts +129 -0
  49. package/src/models/GetPortalManagementDashboardTopCourse.ts +102 -0
  50. package/src/models/index.ts +6 -0
@@ -0,0 +1,48 @@
1
+
2
+ # GetPortalManagementDashboardSummary
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `learnerCount` | number
10
+ `activeLearnerCount` | number
11
+ `activeEnrollmentCount` | number
12
+ `completionRatePercentage` | number
13
+ `courseCount` | number
14
+ `publishedCourseCount` | number
15
+ `draftCourseCount` | number
16
+ `loginsToday` | number
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { GetPortalManagementDashboardSummary } from '@easyedu/js-lsm-api'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "learnerCount": null,
26
+ "activeLearnerCount": null,
27
+ "activeEnrollmentCount": null,
28
+ "completionRatePercentage": null,
29
+ "courseCount": null,
30
+ "publishedCourseCount": null,
31
+ "draftCourseCount": null,
32
+ "loginsToday": null,
33
+ } satisfies GetPortalManagementDashboardSummary
34
+
35
+ console.log(example)
36
+
37
+ // Convert the instance to a JSON string
38
+ const exampleJSON: string = JSON.stringify(example)
39
+ console.log(exampleJSON)
40
+
41
+ // Parse the JSON string back to an object
42
+ const exampleParsed = JSON.parse(exampleJSON) as GetPortalManagementDashboardSummary
43
+ console.log(exampleParsed)
44
+ ```
45
+
46
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
+
48
+
@@ -0,0 +1,42 @@
1
+
2
+ # GetPortalManagementDashboardTopCourse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `courseId` | string
10
+ `courseName` | string
11
+ `enrollmentCount` | number
12
+ `activeLearnerCount` | number
13
+ `completionRatePercentage` | number
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { GetPortalManagementDashboardTopCourse } from '@easyedu/js-lsm-api'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "courseId": null,
23
+ "courseName": null,
24
+ "enrollmentCount": null,
25
+ "activeLearnerCount": null,
26
+ "completionRatePercentage": null,
27
+ } satisfies GetPortalManagementDashboardTopCourse
28
+
29
+ console.log(example)
30
+
31
+ // Convert the instance to a JSON string
32
+ const exampleJSON: string = JSON.stringify(example)
33
+ console.log(exampleJSON)
34
+
35
+ // Parse the JSON string back to an object
36
+ const exampleParsed = JSON.parse(exampleJSON) as GetPortalManagementDashboardTopCourse
37
+ console.log(exampleParsed)
38
+ ```
39
+
40
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
41
+
42
+
@@ -6,6 +6,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
6
6
  |------------- | ------------- | -------------|
7
7
  | [**getCourseVersionReporting**](ReportingApi.md#getcourseversionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/reporting | Get instructor reporting for one explicit course version |
8
8
  | [**getCourseVersionSectionReporting**](ReportingApi.md#getcourseversionsectionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/sections/{sectionId}/reporting | Get instructor reporting for one section and its descendants in an explicit course version |
9
+ | [**getPortalManagementDashboard**](ReportingApi.md#getportalmanagementdashboard) | **GET** /reporting/portal/dashboard | Get the selected portal\'s management dashboard reporting |
9
10
 
10
11
 
11
12
 
@@ -149,3 +150,69 @@ No authorization required
149
150
 
150
151
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
151
152
 
153
+
154
+ ## getPortalManagementDashboard
155
+
156
+ > GetPortalManagementDashboard getPortalManagementDashboard(days)
157
+
158
+ Get the selected portal\'s management dashboard reporting
159
+
160
+ ### Example
161
+
162
+ ```ts
163
+ import {
164
+ Configuration,
165
+ ReportingApi,
166
+ } from '@easyedu/js-lsm-api';
167
+ import type { GetPortalManagementDashboardRequest } from '@easyedu/js-lsm-api';
168
+
169
+ async function example() {
170
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
171
+ const api = new ReportingApi();
172
+
173
+ const body = {
174
+ // number | Number of UTC calendar days to include in activity reporting. (optional)
175
+ days: 56,
176
+ } satisfies GetPortalManagementDashboardRequest;
177
+
178
+ try {
179
+ const data = await api.getPortalManagementDashboard(body);
180
+ console.log(data);
181
+ } catch (error) {
182
+ console.error(error);
183
+ }
184
+ }
185
+
186
+ // Run the test
187
+ example().catch(console.error);
188
+ ```
189
+
190
+ ### Parameters
191
+
192
+
193
+ | Name | Type | Description | Notes |
194
+ |------------- | ------------- | ------------- | -------------|
195
+ | **days** | `number` | Number of UTC calendar days to include in activity reporting. | [Optional] [Defaults to `30`] |
196
+
197
+ ### Return type
198
+
199
+ [**GetPortalManagementDashboard**](GetPortalManagementDashboard.md)
200
+
201
+ ### Authorization
202
+
203
+ No authorization required
204
+
205
+ ### HTTP request headers
206
+
207
+ - **Content-Type**: Not defined
208
+ - **Accept**: `application/json`
209
+
210
+
211
+ ### HTTP response details
212
+ | Status code | Description | Response headers |
213
+ |-------------|-------------|------------------|
214
+ | **200** | Portal-scoped dashboard totals, trends, and attention counts | - |
215
+ | **400** | Invalid reporting range | - |
216
+
217
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
218
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.123.0",
3
+ "version": "1.124.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -23,6 +23,11 @@ import {
23
23
  GetCourseVersionSectionReportingFromJSON,
24
24
  GetCourseVersionSectionReportingToJSON,
25
25
  } from '../models/GetCourseVersionSectionReporting';
26
+ import {
27
+ type GetPortalManagementDashboard,
28
+ GetPortalManagementDashboardFromJSON,
29
+ GetPortalManagementDashboardToJSON,
30
+ } from '../models/GetPortalManagementDashboard';
26
31
 
27
32
  export interface GetCourseVersionReportingRequest {
28
33
  courseId: string;
@@ -35,6 +40,10 @@ export interface GetCourseVersionSectionReportingRequest {
35
40
  sectionId: string;
36
41
  }
37
42
 
43
+ export interface GetPortalManagementDashboardRequest {
44
+ days?: number;
45
+ }
46
+
38
47
  /**
39
48
  *
40
49
  */
@@ -154,4 +163,45 @@ export class ReportingApi extends runtime.BaseAPI {
154
163
  return await response.value();
155
164
  }
156
165
 
166
+ /**
167
+ * Creates request options for getPortalManagementDashboard without sending the request
168
+ */
169
+ async getPortalManagementDashboardRequestOpts(requestParameters: GetPortalManagementDashboardRequest): Promise<runtime.RequestOpts> {
170
+ const queryParameters: any = {};
171
+
172
+ if (requestParameters['days'] != null) {
173
+ queryParameters['days'] = requestParameters['days'];
174
+ }
175
+
176
+ const headerParameters: runtime.HTTPHeaders = {};
177
+
178
+
179
+ let urlPath = `/reporting/portal/dashboard`;
180
+
181
+ return {
182
+ path: urlPath,
183
+ method: 'GET',
184
+ headers: headerParameters,
185
+ query: queryParameters,
186
+ };
187
+ }
188
+
189
+ /**
190
+ * Get the selected portal\'s management dashboard reporting
191
+ */
192
+ async getPortalManagementDashboardRaw(requestParameters: GetPortalManagementDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalManagementDashboard>> {
193
+ const requestOptions = await this.getPortalManagementDashboardRequestOpts(requestParameters);
194
+ const response = await this.request(requestOptions, initOverrides);
195
+
196
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalManagementDashboardFromJSON(jsonValue));
197
+ }
198
+
199
+ /**
200
+ * Get the selected portal\'s management dashboard reporting
201
+ */
202
+ async getPortalManagementDashboard(requestParameters: GetPortalManagementDashboardRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalManagementDashboard> {
203
+ const response = await this.getPortalManagementDashboardRaw(requestParameters, initOverrides);
204
+ return await response.value();
205
+ }
206
+
157
207
  }
@@ -0,0 +1,156 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GetPortalManagementDashboardTopCourse } from './GetPortalManagementDashboardTopCourse';
17
+ import {
18
+ GetPortalManagementDashboardTopCourseFromJSON,
19
+ GetPortalManagementDashboardTopCourseFromJSONTyped,
20
+ GetPortalManagementDashboardTopCourseToJSON,
21
+ GetPortalManagementDashboardTopCourseToJSONTyped,
22
+ } from './GetPortalManagementDashboardTopCourse';
23
+ import type { GetPortalManagementDashboardEnrollmentStatus } from './GetPortalManagementDashboardEnrollmentStatus';
24
+ import {
25
+ GetPortalManagementDashboardEnrollmentStatusFromJSON,
26
+ GetPortalManagementDashboardEnrollmentStatusFromJSONTyped,
27
+ GetPortalManagementDashboardEnrollmentStatusToJSON,
28
+ GetPortalManagementDashboardEnrollmentStatusToJSONTyped,
29
+ } from './GetPortalManagementDashboardEnrollmentStatus';
30
+ import type { GetPortalManagementDashboardSummary } from './GetPortalManagementDashboardSummary';
31
+ import {
32
+ GetPortalManagementDashboardSummaryFromJSON,
33
+ GetPortalManagementDashboardSummaryFromJSONTyped,
34
+ GetPortalManagementDashboardSummaryToJSON,
35
+ GetPortalManagementDashboardSummaryToJSONTyped,
36
+ } from './GetPortalManagementDashboardSummary';
37
+ import type { GetPortalManagementDashboardActivityDay } from './GetPortalManagementDashboardActivityDay';
38
+ import {
39
+ GetPortalManagementDashboardActivityDayFromJSON,
40
+ GetPortalManagementDashboardActivityDayFromJSONTyped,
41
+ GetPortalManagementDashboardActivityDayToJSON,
42
+ GetPortalManagementDashboardActivityDayToJSONTyped,
43
+ } from './GetPortalManagementDashboardActivityDay';
44
+ import type { GetPortalManagementDashboardAttention } from './GetPortalManagementDashboardAttention';
45
+ import {
46
+ GetPortalManagementDashboardAttentionFromJSON,
47
+ GetPortalManagementDashboardAttentionFromJSONTyped,
48
+ GetPortalManagementDashboardAttentionToJSON,
49
+ GetPortalManagementDashboardAttentionToJSONTyped,
50
+ } from './GetPortalManagementDashboardAttention';
51
+
52
+ /**
53
+ *
54
+ * @export
55
+ * @interface GetPortalManagementDashboard
56
+ */
57
+ export interface GetPortalManagementDashboard {
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof GetPortalManagementDashboard
62
+ */
63
+ rangeDays: number;
64
+ /**
65
+ * Unix timestamp in seconds.
66
+ * @type {number}
67
+ * @memberof GetPortalManagementDashboard
68
+ */
69
+ generatedAt: number;
70
+ /**
71
+ *
72
+ * @type {GetPortalManagementDashboardSummary}
73
+ * @memberof GetPortalManagementDashboard
74
+ */
75
+ summary: GetPortalManagementDashboardSummary;
76
+ /**
77
+ *
78
+ * @type {GetPortalManagementDashboardEnrollmentStatus}
79
+ * @memberof GetPortalManagementDashboard
80
+ */
81
+ enrollmentStatus: GetPortalManagementDashboardEnrollmentStatus;
82
+ /**
83
+ *
84
+ * @type {Array<GetPortalManagementDashboardActivityDay>}
85
+ * @memberof GetPortalManagementDashboard
86
+ */
87
+ activity: Array<GetPortalManagementDashboardActivityDay>;
88
+ /**
89
+ *
90
+ * @type {Array<GetPortalManagementDashboardTopCourse>}
91
+ * @memberof GetPortalManagementDashboard
92
+ */
93
+ topCourses: Array<GetPortalManagementDashboardTopCourse>;
94
+ /**
95
+ *
96
+ * @type {GetPortalManagementDashboardAttention}
97
+ * @memberof GetPortalManagementDashboard
98
+ */
99
+ attention: GetPortalManagementDashboardAttention;
100
+ }
101
+
102
+ /**
103
+ * Check if a given object implements the GetPortalManagementDashboard interface.
104
+ */
105
+ export function instanceOfGetPortalManagementDashboard(value: object): value is GetPortalManagementDashboard {
106
+ if (!('rangeDays' in value) || value['rangeDays'] === undefined) return false;
107
+ if (!('generatedAt' in value) || value['generatedAt'] === undefined) return false;
108
+ if (!('summary' in value) || value['summary'] === undefined) return false;
109
+ if (!('enrollmentStatus' in value) || value['enrollmentStatus'] === undefined) return false;
110
+ if (!('activity' in value) || value['activity'] === undefined) return false;
111
+ if (!('topCourses' in value) || value['topCourses'] === undefined) return false;
112
+ if (!('attention' in value) || value['attention'] === undefined) return false;
113
+ return true;
114
+ }
115
+
116
+ export function GetPortalManagementDashboardFromJSON(json: any): GetPortalManagementDashboard {
117
+ return GetPortalManagementDashboardFromJSONTyped(json, false);
118
+ }
119
+
120
+ export function GetPortalManagementDashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalManagementDashboard {
121
+ if (json == null) {
122
+ return json;
123
+ }
124
+ return {
125
+
126
+ 'rangeDays': json['range_days'],
127
+ 'generatedAt': json['generated_at'],
128
+ 'summary': GetPortalManagementDashboardSummaryFromJSON(json['summary']),
129
+ 'enrollmentStatus': GetPortalManagementDashboardEnrollmentStatusFromJSON(json['enrollment_status']),
130
+ 'activity': ((json['activity'] as Array<any>).map(GetPortalManagementDashboardActivityDayFromJSON)),
131
+ 'topCourses': ((json['top_courses'] as Array<any>).map(GetPortalManagementDashboardTopCourseFromJSON)),
132
+ 'attention': GetPortalManagementDashboardAttentionFromJSON(json['attention']),
133
+ };
134
+ }
135
+
136
+ export function GetPortalManagementDashboardToJSON(json: any): GetPortalManagementDashboard {
137
+ return GetPortalManagementDashboardToJSONTyped(json, false);
138
+ }
139
+
140
+ export function GetPortalManagementDashboardToJSONTyped(value?: GetPortalManagementDashboard | null, ignoreDiscriminator: boolean = false): any {
141
+ if (value == null) {
142
+ return value;
143
+ }
144
+
145
+ return {
146
+
147
+ 'range_days': value['rangeDays'],
148
+ 'generated_at': value['generatedAt'],
149
+ 'summary': GetPortalManagementDashboardSummaryToJSON(value['summary']),
150
+ 'enrollment_status': GetPortalManagementDashboardEnrollmentStatusToJSON(value['enrollmentStatus']),
151
+ 'activity': ((value['activity'] as Array<any>).map(GetPortalManagementDashboardActivityDayToJSON)),
152
+ 'top_courses': ((value['topCourses'] as Array<any>).map(GetPortalManagementDashboardTopCourseToJSON)),
153
+ 'attention': GetPortalManagementDashboardAttentionToJSON(value['attention']),
154
+ };
155
+ }
156
+
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GetPortalManagementDashboardActivityDay
20
+ */
21
+ export interface GetPortalManagementDashboardActivityDay {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof GetPortalManagementDashboardActivityDay
26
+ */
27
+ date: Date;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof GetPortalManagementDashboardActivityDay
32
+ */
33
+ activeLearnerCount: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof GetPortalManagementDashboardActivityDay
38
+ */
39
+ loginCount: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof GetPortalManagementDashboardActivityDay
44
+ */
45
+ completionCount: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the GetPortalManagementDashboardActivityDay interface.
50
+ */
51
+ export function instanceOfGetPortalManagementDashboardActivityDay(value: object): value is GetPortalManagementDashboardActivityDay {
52
+ if (!('date' in value) || value['date'] === undefined) return false;
53
+ if (!('activeLearnerCount' in value) || value['activeLearnerCount'] === undefined) return false;
54
+ if (!('loginCount' in value) || value['loginCount'] === undefined) return false;
55
+ if (!('completionCount' in value) || value['completionCount'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function GetPortalManagementDashboardActivityDayFromJSON(json: any): GetPortalManagementDashboardActivityDay {
60
+ return GetPortalManagementDashboardActivityDayFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function GetPortalManagementDashboardActivityDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalManagementDashboardActivityDay {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'date': (new Date(json['date'])),
70
+ 'activeLearnerCount': json['active_learner_count'],
71
+ 'loginCount': json['login_count'],
72
+ 'completionCount': json['completion_count'],
73
+ };
74
+ }
75
+
76
+ export function GetPortalManagementDashboardActivityDayToJSON(json: any): GetPortalManagementDashboardActivityDay {
77
+ return GetPortalManagementDashboardActivityDayToJSONTyped(json, false);
78
+ }
79
+
80
+ export function GetPortalManagementDashboardActivityDayToJSONTyped(value?: GetPortalManagementDashboardActivityDay | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'date': value['date'].toISOString().substring(0,10),
88
+ 'active_learner_count': value['activeLearnerCount'],
89
+ 'login_count': value['loginCount'],
90
+ 'completion_count': value['completionCount'],
91
+ };
92
+ }
93
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GetPortalManagementDashboardAttention
20
+ */
21
+ export interface GetPortalManagementDashboardAttention {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof GetPortalManagementDashboardAttention
26
+ */
27
+ notStartedEnrollmentCount: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof GetPortalManagementDashboardAttention
32
+ */
33
+ inactiveLearnerCount: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof GetPortalManagementDashboardAttention
38
+ */
39
+ expiringEnrollmentCount: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof GetPortalManagementDashboardAttention
44
+ */
45
+ expiringCertificateCount: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof GetPortalManagementDashboardAttention
50
+ */
51
+ draftCourseCount: number;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the GetPortalManagementDashboardAttention interface.
56
+ */
57
+ export function instanceOfGetPortalManagementDashboardAttention(value: object): value is GetPortalManagementDashboardAttention {
58
+ if (!('notStartedEnrollmentCount' in value) || value['notStartedEnrollmentCount'] === undefined) return false;
59
+ if (!('inactiveLearnerCount' in value) || value['inactiveLearnerCount'] === undefined) return false;
60
+ if (!('expiringEnrollmentCount' in value) || value['expiringEnrollmentCount'] === undefined) return false;
61
+ if (!('expiringCertificateCount' in value) || value['expiringCertificateCount'] === undefined) return false;
62
+ if (!('draftCourseCount' in value) || value['draftCourseCount'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function GetPortalManagementDashboardAttentionFromJSON(json: any): GetPortalManagementDashboardAttention {
67
+ return GetPortalManagementDashboardAttentionFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function GetPortalManagementDashboardAttentionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalManagementDashboardAttention {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'notStartedEnrollmentCount': json['not_started_enrollment_count'],
77
+ 'inactiveLearnerCount': json['inactive_learner_count'],
78
+ 'expiringEnrollmentCount': json['expiring_enrollment_count'],
79
+ 'expiringCertificateCount': json['expiring_certificate_count'],
80
+ 'draftCourseCount': json['draft_course_count'],
81
+ };
82
+ }
83
+
84
+ export function GetPortalManagementDashboardAttentionToJSON(json: any): GetPortalManagementDashboardAttention {
85
+ return GetPortalManagementDashboardAttentionToJSONTyped(json, false);
86
+ }
87
+
88
+ export function GetPortalManagementDashboardAttentionToJSONTyped(value?: GetPortalManagementDashboardAttention | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'not_started_enrollment_count': value['notStartedEnrollmentCount'],
96
+ 'inactive_learner_count': value['inactiveLearnerCount'],
97
+ 'expiring_enrollment_count': value['expiringEnrollmentCount'],
98
+ 'expiring_certificate_count': value['expiringCertificateCount'],
99
+ 'draft_course_count': value['draftCourseCount'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,84 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GetPortalManagementDashboardEnrollmentStatus
20
+ */
21
+ export interface GetPortalManagementDashboardEnrollmentStatus {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof GetPortalManagementDashboardEnrollmentStatus
26
+ */
27
+ notStartedCount: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof GetPortalManagementDashboardEnrollmentStatus
32
+ */
33
+ inProgressCount: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof GetPortalManagementDashboardEnrollmentStatus
38
+ */
39
+ completedCount: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the GetPortalManagementDashboardEnrollmentStatus interface.
44
+ */
45
+ export function instanceOfGetPortalManagementDashboardEnrollmentStatus(value: object): value is GetPortalManagementDashboardEnrollmentStatus {
46
+ if (!('notStartedCount' in value) || value['notStartedCount'] === undefined) return false;
47
+ if (!('inProgressCount' in value) || value['inProgressCount'] === undefined) return false;
48
+ if (!('completedCount' in value) || value['completedCount'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function GetPortalManagementDashboardEnrollmentStatusFromJSON(json: any): GetPortalManagementDashboardEnrollmentStatus {
53
+ return GetPortalManagementDashboardEnrollmentStatusFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetPortalManagementDashboardEnrollmentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalManagementDashboardEnrollmentStatus {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'notStartedCount': json['not_started_count'],
63
+ 'inProgressCount': json['in_progress_count'],
64
+ 'completedCount': json['completed_count'],
65
+ };
66
+ }
67
+
68
+ export function GetPortalManagementDashboardEnrollmentStatusToJSON(json: any): GetPortalManagementDashboardEnrollmentStatus {
69
+ return GetPortalManagementDashboardEnrollmentStatusToJSONTyped(json, false);
70
+ }
71
+
72
+ export function GetPortalManagementDashboardEnrollmentStatusToJSONTyped(value?: GetPortalManagementDashboardEnrollmentStatus | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'not_started_count': value['notStartedCount'],
80
+ 'in_progress_count': value['inProgressCount'],
81
+ 'completed_count': value['completedCount'],
82
+ };
83
+ }
84
+