@easyedu/js-lsm-api 1.12.0 → 1.14.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.
@@ -28,6 +28,7 @@ src/models/GetCourseEnrollment.ts
28
28
  src/models/GetCourseEnrollmentList.ts
29
29
  src/models/GetCourseEnrollmentListItem.ts
30
30
  src/models/GetCourseList.ts
31
+ src/models/GetCourseReportingBasic.ts
31
32
  src/models/GetModule.ts
32
33
  src/models/GetModuleList.ts
33
34
  src/models/GetPortal.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @easyedu/js-lsm-api@1.12.0
1
+ ## @easyedu/js-lsm-api@1.14.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @easyedu/js-lsm-api@1.12.0 --save
39
+ npm install @easyedu/js-lsm-api@1.14.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
13
+ import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
14
14
  export interface GetCourseRequest {
15
15
  courseId: string;
16
16
  }
@@ -27,6 +27,9 @@ export interface GetCourseEnrollmentsRequest {
27
27
  export interface GetCourseListRequest {
28
28
  enrolled?: boolean;
29
29
  }
30
+ export interface GetCourseReportingBasicRequest {
31
+ courseId: string;
32
+ }
30
33
  export interface PostCourseRequest {
31
34
  postCourse: PostCourse;
32
35
  }
@@ -79,6 +82,14 @@ export declare class CourseApi extends runtime.BaseAPI {
79
82
  * get course list
80
83
  */
81
84
  getCourseList(requestParameters?: GetCourseListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseList>;
85
+ /**
86
+ * Get basic course reporting data
87
+ */
88
+ getCourseReportingBasicRaw(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseReportingBasic>>;
89
+ /**
90
+ * Get basic course reporting data
91
+ */
92
+ getCourseReportingBasic(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseReportingBasic>;
82
93
  /**
83
94
  * Post a new course
84
95
  */
@@ -153,6 +153,34 @@ class CourseApi extends runtime.BaseAPI {
153
153
  return yield response.value();
154
154
  });
155
155
  }
156
+ /**
157
+ * Get basic course reporting data
158
+ */
159
+ getCourseReportingBasicRaw(requestParameters, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ if (requestParameters['courseId'] == null) {
162
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseReportingBasic().');
163
+ }
164
+ const queryParameters = {};
165
+ const headerParameters = {};
166
+ const response = yield this.request({
167
+ path: `/courses/{courseId}/reporting/basic`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
168
+ method: 'GET',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ }, initOverrides);
172
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCourseReportingBasicFromJSON)(jsonValue));
173
+ });
174
+ }
175
+ /**
176
+ * Get basic course reporting data
177
+ */
178
+ getCourseReportingBasic(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const response = yield this.getCourseReportingBasicRaw(requestParameters, initOverrides);
181
+ return yield response.value();
182
+ });
183
+ }
156
184
  /**
157
185
  * Post a new course
158
186
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
13
+ import type { GetCourse, GetCourseEnrollment, GetCourseEnrollmentList, GetCourseList, GetCourseReportingBasic, PostCourse, PostCourseEnrollment, PutCourse, PutCourseEnrollment } from '../models/index';
14
14
  export interface GetCourseRequest {
15
15
  courseId: string;
16
16
  }
@@ -27,6 +27,9 @@ export interface GetCourseEnrollmentsRequest {
27
27
  export interface GetCourseListRequest {
28
28
  enrolled?: boolean;
29
29
  }
30
+ export interface GetCourseReportingBasicRequest {
31
+ courseId: string;
32
+ }
30
33
  export interface PostCourseRequest {
31
34
  postCourse: PostCourse;
32
35
  }
@@ -79,6 +82,14 @@ export declare class CourseApi extends runtime.BaseAPI {
79
82
  * get course list
80
83
  */
81
84
  getCourseList(requestParameters?: GetCourseListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseList>;
85
+ /**
86
+ * Get basic course reporting data
87
+ */
88
+ getCourseReportingBasicRaw(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseReportingBasic>>;
89
+ /**
90
+ * Get basic course reporting data
91
+ */
92
+ getCourseReportingBasic(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseReportingBasic>;
82
93
  /**
83
94
  * Post a new course
84
95
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseListFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
24
+ import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -150,6 +150,34 @@ export class CourseApi extends runtime.BaseAPI {
150
150
  return yield response.value();
151
151
  });
152
152
  }
153
+ /**
154
+ * Get basic course reporting data
155
+ */
156
+ getCourseReportingBasicRaw(requestParameters, initOverrides) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ if (requestParameters['courseId'] == null) {
159
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseReportingBasic().');
160
+ }
161
+ const queryParameters = {};
162
+ const headerParameters = {};
163
+ const response = yield this.request({
164
+ path: `/courses/{courseId}/reporting/basic`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
165
+ method: 'GET',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ }, initOverrides);
169
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseReportingBasicFromJSON(jsonValue));
170
+ });
171
+ }
172
+ /**
173
+ * Get basic course reporting data
174
+ */
175
+ getCourseReportingBasic(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const response = yield this.getCourseReportingBasicRaw(requestParameters, initOverrides);
178
+ return yield response.value();
179
+ });
180
+ }
153
181
  /**
154
182
  * Post a new course
155
183
  */
@@ -33,12 +33,6 @@ export interface GetCourse {
33
33
  * @memberof GetCourse
34
34
  */
35
35
  description: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof GetCourse
40
- */
41
- instructor?: string;
42
36
  /**
43
37
  *
44
38
  * @type {string}
@@ -51,6 +45,12 @@ export interface GetCourse {
51
45
  * @memberof GetCourse
52
46
  */
53
47
  published: boolean;
48
+ /**
49
+ * Unix epoch timestamp when the course was created
50
+ * @type {number}
51
+ * @memberof GetCourse
52
+ */
53
+ createdAt: number;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the GetCourse interface.
@@ -25,6 +25,8 @@ export function instanceOfGetCourse(value) {
25
25
  return false;
26
26
  if (!('published' in value) || value['published'] === undefined)
27
27
  return false;
28
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
29
+ return false;
28
30
  return true;
29
31
  }
30
32
  export function GetCourseFromJSON(json) {
@@ -38,9 +40,9 @@ export function GetCourseFromJSONTyped(json, ignoreDiscriminator) {
38
40
  'id': json['id'],
39
41
  'name': json['name'],
40
42
  'description': json['description'],
41
- 'instructor': json['instructor'] == null ? undefined : json['instructor'],
42
43
  'imageUrl': json['image_url'],
43
44
  'published': json['published'],
45
+ 'createdAt': json['created_at'],
44
46
  };
45
47
  }
46
48
  export function GetCourseToJSON(json) {
@@ -53,8 +55,8 @@ export function GetCourseToJSONTyped(value, ignoreDiscriminator = false) {
53
55
  return {
54
56
  'name': value['name'],
55
57
  'description': value['description'],
56
- 'instructor': value['instructor'],
57
58
  'image_url': value['imageUrl'],
58
59
  'published': value['published'],
60
+ 'created_at': value['createdAt'],
59
61
  };
60
62
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetCourseReportingBasic
16
+ */
17
+ export interface GetCourseReportingBasic {
18
+ /**
19
+ * Total number of students enrolled in the course
20
+ * @type {number}
21
+ * @memberof GetCourseReportingBasic
22
+ */
23
+ totalStudents: number;
24
+ /**
25
+ * Number of students with enrollment status of Enrolled
26
+ * @type {number}
27
+ * @memberof GetCourseReportingBasic
28
+ */
29
+ activeStudents: number;
30
+ /**
31
+ * Percentage of students who have completed the course
32
+ * @type {number}
33
+ * @memberof GetCourseReportingBasic
34
+ */
35
+ completionRatePercentage: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the GetCourseReportingBasic interface.
39
+ */
40
+ export declare function instanceOfGetCourseReportingBasic(value: object): value is GetCourseReportingBasic;
41
+ export declare function GetCourseReportingBasicFromJSON(json: any): GetCourseReportingBasic;
42
+ export declare function GetCourseReportingBasicFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseReportingBasic;
43
+ export declare function GetCourseReportingBasicToJSON(json: any): GetCourseReportingBasic;
44
+ export declare function GetCourseReportingBasicToJSONTyped(value?: GetCourseReportingBasic | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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
+ * Check if a given object implements the GetCourseReportingBasic interface.
16
+ */
17
+ export function instanceOfGetCourseReportingBasic(value) {
18
+ if (!('totalStudents' in value) || value['totalStudents'] === undefined)
19
+ return false;
20
+ if (!('activeStudents' in value) || value['activeStudents'] === undefined)
21
+ return false;
22
+ if (!('completionRatePercentage' in value) || value['completionRatePercentage'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function GetCourseReportingBasicFromJSON(json) {
27
+ return GetCourseReportingBasicFromJSONTyped(json, false);
28
+ }
29
+ export function GetCourseReportingBasicFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'totalStudents': json['total_students'],
35
+ 'activeStudents': json['active_students'],
36
+ 'completionRatePercentage': json['completion_rate_percentage'],
37
+ };
38
+ }
39
+ export function GetCourseReportingBasicToJSON(json) {
40
+ return GetCourseReportingBasicToJSONTyped(json, false);
41
+ }
42
+ export function GetCourseReportingBasicToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'total_students': value['totalStudents'],
48
+ 'active_students': value['activeStudents'],
49
+ 'completion_rate_percentage': value['completionRatePercentage'],
50
+ };
51
+ }
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface GetUser {
18
18
  /**
19
- *
19
+ * User's external ID
20
20
  * @type {string}
21
21
  * @memberof GetUser
22
22
  */
@@ -40,11 +40,11 @@ export interface GetUser {
40
40
  */
41
41
  email: string;
42
42
  /**
43
- *
44
- * @type {string}
43
+ * Unix timestamp in seconds
44
+ * @type {number}
45
45
  * @memberof GetUser
46
46
  */
47
- lastUpdated: string;
47
+ lastUpdated: number;
48
48
  }
49
49
  /**
50
50
  * Check if a given object implements the GetUser interface.
@@ -13,6 +13,7 @@ export * from './GetCourseEnrollment';
13
13
  export * from './GetCourseEnrollmentList';
14
14
  export * from './GetCourseEnrollmentListItem';
15
15
  export * from './GetCourseList';
16
+ export * from './GetCourseReportingBasic';
16
17
  export * from './GetModule';
17
18
  export * from './GetModuleList';
18
19
  export * from './GetPortal';
@@ -15,6 +15,7 @@ export * from './GetCourseEnrollment';
15
15
  export * from './GetCourseEnrollmentList';
16
16
  export * from './GetCourseEnrollmentListItem';
17
17
  export * from './GetCourseList';
18
+ export * from './GetCourseReportingBasic';
18
19
  export * from './GetModule';
19
20
  export * from './GetModuleList';
20
21
  export * from './GetPortal';
@@ -33,12 +33,6 @@ export interface GetCourse {
33
33
  * @memberof GetCourse
34
34
  */
35
35
  description: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof GetCourse
40
- */
41
- instructor?: string;
42
36
  /**
43
37
  *
44
38
  * @type {string}
@@ -51,6 +45,12 @@ export interface GetCourse {
51
45
  * @memberof GetCourse
52
46
  */
53
47
  published: boolean;
48
+ /**
49
+ * Unix epoch timestamp when the course was created
50
+ * @type {number}
51
+ * @memberof GetCourse
52
+ */
53
+ createdAt: number;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the GetCourse interface.
@@ -32,6 +32,8 @@ function instanceOfGetCourse(value) {
32
32
  return false;
33
33
  if (!('published' in value) || value['published'] === undefined)
34
34
  return false;
35
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
36
+ return false;
35
37
  return true;
36
38
  }
37
39
  function GetCourseFromJSON(json) {
@@ -45,9 +47,9 @@ function GetCourseFromJSONTyped(json, ignoreDiscriminator) {
45
47
  'id': json['id'],
46
48
  'name': json['name'],
47
49
  'description': json['description'],
48
- 'instructor': json['instructor'] == null ? undefined : json['instructor'],
49
50
  'imageUrl': json['image_url'],
50
51
  'published': json['published'],
52
+ 'createdAt': json['created_at'],
51
53
  };
52
54
  }
53
55
  function GetCourseToJSON(json) {
@@ -60,8 +62,8 @@ function GetCourseToJSONTyped(value, ignoreDiscriminator = false) {
60
62
  return {
61
63
  'name': value['name'],
62
64
  'description': value['description'],
63
- 'instructor': value['instructor'],
64
65
  'image_url': value['imageUrl'],
65
66
  'published': value['published'],
67
+ 'created_at': value['createdAt'],
66
68
  };
67
69
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetCourseReportingBasic
16
+ */
17
+ export interface GetCourseReportingBasic {
18
+ /**
19
+ * Total number of students enrolled in the course
20
+ * @type {number}
21
+ * @memberof GetCourseReportingBasic
22
+ */
23
+ totalStudents: number;
24
+ /**
25
+ * Number of students with enrollment status of Enrolled
26
+ * @type {number}
27
+ * @memberof GetCourseReportingBasic
28
+ */
29
+ activeStudents: number;
30
+ /**
31
+ * Percentage of students who have completed the course
32
+ * @type {number}
33
+ * @memberof GetCourseReportingBasic
34
+ */
35
+ completionRatePercentage: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the GetCourseReportingBasic interface.
39
+ */
40
+ export declare function instanceOfGetCourseReportingBasic(value: object): value is GetCourseReportingBasic;
41
+ export declare function GetCourseReportingBasicFromJSON(json: any): GetCourseReportingBasic;
42
+ export declare function GetCourseReportingBasicFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseReportingBasic;
43
+ export declare function GetCourseReportingBasicToJSON(json: any): GetCourseReportingBasic;
44
+ export declare function GetCourseReportingBasicToJSONTyped(value?: GetCourseReportingBasic | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetCourseReportingBasic = instanceOfGetCourseReportingBasic;
17
+ exports.GetCourseReportingBasicFromJSON = GetCourseReportingBasicFromJSON;
18
+ exports.GetCourseReportingBasicFromJSONTyped = GetCourseReportingBasicFromJSONTyped;
19
+ exports.GetCourseReportingBasicToJSON = GetCourseReportingBasicToJSON;
20
+ exports.GetCourseReportingBasicToJSONTyped = GetCourseReportingBasicToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetCourseReportingBasic interface.
23
+ */
24
+ function instanceOfGetCourseReportingBasic(value) {
25
+ if (!('totalStudents' in value) || value['totalStudents'] === undefined)
26
+ return false;
27
+ if (!('activeStudents' in value) || value['activeStudents'] === undefined)
28
+ return false;
29
+ if (!('completionRatePercentage' in value) || value['completionRatePercentage'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function GetCourseReportingBasicFromJSON(json) {
34
+ return GetCourseReportingBasicFromJSONTyped(json, false);
35
+ }
36
+ function GetCourseReportingBasicFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'totalStudents': json['total_students'],
42
+ 'activeStudents': json['active_students'],
43
+ 'completionRatePercentage': json['completion_rate_percentage'],
44
+ };
45
+ }
46
+ function GetCourseReportingBasicToJSON(json) {
47
+ return GetCourseReportingBasicToJSONTyped(json, false);
48
+ }
49
+ function GetCourseReportingBasicToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'total_students': value['totalStudents'],
55
+ 'active_students': value['activeStudents'],
56
+ 'completion_rate_percentage': value['completionRatePercentage'],
57
+ };
58
+ }
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface GetUser {
18
18
  /**
19
- *
19
+ * User's external ID
20
20
  * @type {string}
21
21
  * @memberof GetUser
22
22
  */
@@ -40,11 +40,11 @@ export interface GetUser {
40
40
  */
41
41
  email: string;
42
42
  /**
43
- *
44
- * @type {string}
43
+ * Unix timestamp in seconds
44
+ * @type {number}
45
45
  * @memberof GetUser
46
46
  */
47
- lastUpdated: string;
47
+ lastUpdated: number;
48
48
  }
49
49
  /**
50
50
  * Check if a given object implements the GetUser interface.
@@ -13,6 +13,7 @@ export * from './GetCourseEnrollment';
13
13
  export * from './GetCourseEnrollmentList';
14
14
  export * from './GetCourseEnrollmentListItem';
15
15
  export * from './GetCourseList';
16
+ export * from './GetCourseReportingBasic';
16
17
  export * from './GetModule';
17
18
  export * from './GetModuleList';
18
19
  export * from './GetPortal';
@@ -31,6 +31,7 @@ __exportStar(require("./GetCourseEnrollment"), exports);
31
31
  __exportStar(require("./GetCourseEnrollmentList"), exports);
32
32
  __exportStar(require("./GetCourseEnrollmentListItem"), exports);
33
33
  __exportStar(require("./GetCourseList"), exports);
34
+ __exportStar(require("./GetCourseReportingBasic"), exports);
34
35
  __exportStar(require("./GetModule"), exports);
35
36
  __exportStar(require("./GetModuleList"), exports);
36
37
  __exportStar(require("./GetPortal"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -19,6 +19,7 @@ import type {
19
19
  GetCourseEnrollment,
20
20
  GetCourseEnrollmentList,
21
21
  GetCourseList,
22
+ GetCourseReportingBasic,
22
23
  PostCourse,
23
24
  PostCourseEnrollment,
24
25
  PutCourse,
@@ -33,6 +34,8 @@ import {
33
34
  GetCourseEnrollmentListToJSON,
34
35
  GetCourseListFromJSON,
35
36
  GetCourseListToJSON,
37
+ GetCourseReportingBasicFromJSON,
38
+ GetCourseReportingBasicToJSON,
36
39
  PostCourseFromJSON,
37
40
  PostCourseToJSON,
38
41
  PostCourseEnrollmentFromJSON,
@@ -63,6 +66,10 @@ export interface GetCourseListRequest {
63
66
  enrolled?: boolean;
64
67
  }
65
68
 
69
+ export interface GetCourseReportingBasicRequest {
70
+ courseId: string;
71
+ }
72
+
66
73
  export interface PostCourseRequest {
67
74
  postCourse: PostCourse;
68
75
  }
@@ -236,6 +243,39 @@ export class CourseApi extends runtime.BaseAPI {
236
243
  return await response.value();
237
244
  }
238
245
 
246
+ /**
247
+ * Get basic course reporting data
248
+ */
249
+ async getCourseReportingBasicRaw(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseReportingBasic>> {
250
+ if (requestParameters['courseId'] == null) {
251
+ throw new runtime.RequiredError(
252
+ 'courseId',
253
+ 'Required parameter "courseId" was null or undefined when calling getCourseReportingBasic().'
254
+ );
255
+ }
256
+
257
+ const queryParameters: any = {};
258
+
259
+ const headerParameters: runtime.HTTPHeaders = {};
260
+
261
+ const response = await this.request({
262
+ path: `/courses/{courseId}/reporting/basic`.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
263
+ method: 'GET',
264
+ headers: headerParameters,
265
+ query: queryParameters,
266
+ }, initOverrides);
267
+
268
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseReportingBasicFromJSON(jsonValue));
269
+ }
270
+
271
+ /**
272
+ * Get basic course reporting data
273
+ */
274
+ async getCourseReportingBasic(requestParameters: GetCourseReportingBasicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseReportingBasic> {
275
+ const response = await this.getCourseReportingBasicRaw(requestParameters, initOverrides);
276
+ return await response.value();
277
+ }
278
+
239
279
  /**
240
280
  * Post a new course
241
281
  */
@@ -37,12 +37,6 @@ export interface GetCourse {
37
37
  * @memberof GetCourse
38
38
  */
39
39
  description: string;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof GetCourse
44
- */
45
- instructor?: string;
46
40
  /**
47
41
  *
48
42
  * @type {string}
@@ -55,6 +49,12 @@ export interface GetCourse {
55
49
  * @memberof GetCourse
56
50
  */
57
51
  published: boolean;
52
+ /**
53
+ * Unix epoch timestamp when the course was created
54
+ * @type {number}
55
+ * @memberof GetCourse
56
+ */
57
+ createdAt: number;
58
58
  }
59
59
 
60
60
  /**
@@ -66,6 +66,7 @@ export function instanceOfGetCourse(value: object): value is GetCourse {
66
66
  if (!('description' in value) || value['description'] === undefined) return false;
67
67
  if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
68
68
  if (!('published' in value) || value['published'] === undefined) return false;
69
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
69
70
  return true;
70
71
  }
71
72
 
@@ -82,9 +83,9 @@ export function GetCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean):
82
83
  'id': json['id'],
83
84
  'name': json['name'],
84
85
  'description': json['description'],
85
- 'instructor': json['instructor'] == null ? undefined : json['instructor'],
86
86
  'imageUrl': json['image_url'],
87
87
  'published': json['published'],
88
+ 'createdAt': json['created_at'],
88
89
  };
89
90
  }
90
91
 
@@ -101,9 +102,9 @@ export function GetCourseToJSONTyped(value?: Omit<GetCourse, 'id'> | null, ignor
101
102
 
102
103
  'name': value['name'],
103
104
  'description': value['description'],
104
- 'instructor': value['instructor'],
105
105
  'image_url': value['imageUrl'],
106
106
  'published': value['published'],
107
+ 'created_at': value['createdAt'],
107
108
  };
108
109
  }
109
110
 
@@ -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 GetCourseReportingBasic
20
+ */
21
+ export interface GetCourseReportingBasic {
22
+ /**
23
+ * Total number of students enrolled in the course
24
+ * @type {number}
25
+ * @memberof GetCourseReportingBasic
26
+ */
27
+ totalStudents: number;
28
+ /**
29
+ * Number of students with enrollment status of Enrolled
30
+ * @type {number}
31
+ * @memberof GetCourseReportingBasic
32
+ */
33
+ activeStudents: number;
34
+ /**
35
+ * Percentage of students who have completed the course
36
+ * @type {number}
37
+ * @memberof GetCourseReportingBasic
38
+ */
39
+ completionRatePercentage: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the GetCourseReportingBasic interface.
44
+ */
45
+ export function instanceOfGetCourseReportingBasic(value: object): value is GetCourseReportingBasic {
46
+ if (!('totalStudents' in value) || value['totalStudents'] === undefined) return false;
47
+ if (!('activeStudents' in value) || value['activeStudents'] === undefined) return false;
48
+ if (!('completionRatePercentage' in value) || value['completionRatePercentage'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function GetCourseReportingBasicFromJSON(json: any): GetCourseReportingBasic {
53
+ return GetCourseReportingBasicFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetCourseReportingBasicFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseReportingBasic {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'totalStudents': json['total_students'],
63
+ 'activeStudents': json['active_students'],
64
+ 'completionRatePercentage': json['completion_rate_percentage'],
65
+ };
66
+ }
67
+
68
+ export function GetCourseReportingBasicToJSON(json: any): GetCourseReportingBasic {
69
+ return GetCourseReportingBasicToJSONTyped(json, false);
70
+ }
71
+
72
+ export function GetCourseReportingBasicToJSONTyped(value?: GetCourseReportingBasic | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'total_students': value['totalStudents'],
80
+ 'active_students': value['activeStudents'],
81
+ 'completion_rate_percentage': value['completionRatePercentage'],
82
+ };
83
+ }
84
+
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface GetUser {
22
22
  /**
23
- *
23
+ * User's external ID
24
24
  * @type {string}
25
25
  * @memberof GetUser
26
26
  */
@@ -44,11 +44,11 @@ export interface GetUser {
44
44
  */
45
45
  email: string;
46
46
  /**
47
- *
48
- * @type {string}
47
+ * Unix timestamp in seconds
48
+ * @type {number}
49
49
  * @memberof GetUser
50
50
  */
51
- lastUpdated: string;
51
+ lastUpdated: number;
52
52
  }
53
53
 
54
54
  /**
@@ -15,6 +15,7 @@ export * from './GetCourseEnrollment';
15
15
  export * from './GetCourseEnrollmentList';
16
16
  export * from './GetCourseEnrollmentListItem';
17
17
  export * from './GetCourseList';
18
+ export * from './GetCourseReportingBasic';
18
19
  export * from './GetModule';
19
20
  export * from './GetModuleList';
20
21
  export * from './GetPortal';