@easyedu/js-lsm-api 1.17.0 → 1.19.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 (65) hide show
  1. package/.openapi-generator/FILES +6 -3
  2. package/README.md +2 -2
  3. package/dist/apis/QuizApi.d.ts +4 -2
  4. package/dist/apis/QuizApi.js +8 -2
  5. package/dist/apis/ReportingApi.d.ts +13 -1
  6. package/dist/apis/ReportingApi.js +31 -0
  7. package/dist/esm/apis/QuizApi.d.ts +4 -2
  8. package/dist/esm/apis/QuizApi.js +8 -2
  9. package/dist/esm/apis/ReportingApi.d.ts +13 -1
  10. package/dist/esm/apis/ReportingApi.js +32 -1
  11. package/dist/esm/models/GetPortalStudentReporting.d.ts +40 -0
  12. package/dist/esm/models/GetPortalStudentReporting.js +49 -0
  13. package/dist/esm/models/GetPortalStudentReportingCertificates.d.ts +32 -0
  14. package/dist/esm/models/GetPortalStudentReportingCertificates.js +43 -0
  15. package/dist/esm/models/GetPortalStudentReportingPortalInfo.d.ts +44 -0
  16. package/dist/esm/models/GetPortalStudentReportingPortalInfo.js +51 -0
  17. package/dist/esm/models/GetQuizQuestions.d.ts +29 -5
  18. package/dist/esm/models/GetQuizQuestions.js +20 -4
  19. package/dist/esm/models/GetQuizQuestionsItemsInner.d.ts +75 -0
  20. package/dist/esm/models/{GetQuizQuestionsQuestionsInner.js → GetQuizQuestionsItemsInner.js} +11 -11
  21. package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +105 -0
  22. package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetails.js +84 -0
  23. package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.d.ts +56 -0
  24. package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.js +59 -0
  25. package/dist/esm/models/index.d.ts +6 -3
  26. package/dist/esm/models/index.js +6 -3
  27. package/dist/models/GetPortalStudentReporting.d.ts +40 -0
  28. package/dist/models/GetPortalStudentReporting.js +56 -0
  29. package/dist/models/GetPortalStudentReportingCertificates.d.ts +32 -0
  30. package/dist/models/GetPortalStudentReportingCertificates.js +50 -0
  31. package/dist/models/GetPortalStudentReportingPortalInfo.d.ts +44 -0
  32. package/dist/models/GetPortalStudentReportingPortalInfo.js +58 -0
  33. package/dist/models/GetQuizQuestions.d.ts +29 -5
  34. package/dist/models/GetQuizQuestions.js +20 -4
  35. package/dist/models/GetQuizQuestionsItemsInner.d.ts +75 -0
  36. package/dist/models/{GetQuizQuestionsQuestionsInner.js → GetQuizQuestionsItemsInner.js} +16 -16
  37. package/dist/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +105 -0
  38. package/dist/models/GetQuizQuestionsItemsInnerQuestionDetails.js +92 -0
  39. package/dist/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.d.ts +56 -0
  40. package/dist/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.js +66 -0
  41. package/dist/models/index.d.ts +6 -3
  42. package/dist/models/index.js +6 -3
  43. package/package.json +1 -1
  44. package/src/apis/QuizApi.ts +12 -2
  45. package/src/apis/ReportingApi.ts +48 -0
  46. package/src/models/GetPortalStudentReporting.ts +90 -0
  47. package/src/models/GetPortalStudentReportingCertificates.ts +66 -0
  48. package/src/models/GetPortalStudentReportingPortalInfo.ts +84 -0
  49. package/src/models/GetQuizQuestions.ts +49 -13
  50. package/src/models/{GetQuizQuestionsQuestionsInner.ts → GetQuizQuestionsItemsInner.ts} +28 -28
  51. package/src/models/GetQuizQuestionsItemsInnerQuestionDetails.ts +171 -0
  52. package/src/models/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.ts +102 -0
  53. package/src/models/index.ts +6 -3
  54. package/dist/esm/models/GetQuizQuestionsQuestionsInner.d.ts +0 -75
  55. package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetails.d.ts +0 -81
  56. package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetails.js +0 -76
  57. package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.d.ts +0 -50
  58. package/dist/esm/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.js +0 -53
  59. package/dist/models/GetQuizQuestionsQuestionsInner.d.ts +0 -75
  60. package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetails.d.ts +0 -81
  61. package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetails.js +0 -84
  62. package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.d.ts +0 -50
  63. package/dist/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.js +0 -60
  64. package/src/models/GetQuizQuestionsQuestionsInnerQuestionDetails.ts +0 -139
  65. package/src/models/GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner.ts +0 -92
@@ -0,0 +1,56 @@
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 GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
16
+ */
17
+ export interface GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner {
18
+ /**
19
+ * Answer choice ID
20
+ * @type {string}
21
+ * @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
22
+ */
23
+ id: string;
24
+ /**
25
+ * External ID of answer choice
26
+ * @type {string}
27
+ * @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
28
+ */
29
+ externalId: string;
30
+ /**
31
+ * Answer choice text
32
+ * @type {string}
33
+ * @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
34
+ */
35
+ text: string;
36
+ /**
37
+ * Whether this choice is correct
38
+ * @type {boolean}
39
+ * @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
40
+ */
41
+ isCorrect: boolean;
42
+ /**
43
+ * Display order of choice
44
+ * @type {number}
45
+ * @memberof GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner
46
+ */
47
+ displayOrder: number;
48
+ }
49
+ /**
50
+ * Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner interface.
51
+ */
52
+ export declare function instanceOfGetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner(value: object): value is GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner;
53
+ export declare function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner;
54
+ export declare function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner;
55
+ export declare function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON(json: any): GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner;
56
+ export declare function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped(value?: GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.instanceOfGetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner = instanceOfGetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner;
17
+ exports.GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON = GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON;
18
+ exports.GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped = GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped;
19
+ exports.GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON = GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON;
20
+ exports.GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped = GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner interface.
23
+ */
24
+ function instanceOfGetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('externalId' in value) || value['externalId'] === undefined)
28
+ return false;
29
+ if (!('text' in value) || value['text'] === undefined)
30
+ return false;
31
+ if (!('isCorrect' in value) || value['isCorrect'] === undefined)
32
+ return false;
33
+ if (!('displayOrder' in value) || value['displayOrder'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSON(json) {
38
+ return GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped(json, false);
39
+ }
40
+ function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'id': json['id'],
46
+ 'externalId': json['external_id'],
47
+ 'text': json['text'],
48
+ 'isCorrect': json['is_correct'],
49
+ 'displayOrder': json['display_order'],
50
+ };
51
+ }
52
+ function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSON(json) {
53
+ return GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped(json, false);
54
+ }
55
+ function GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInnerToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'id': value['id'],
61
+ 'external_id': value['externalId'],
62
+ 'text': value['text'],
63
+ 'is_correct': value['isCorrect'],
64
+ 'display_order': value['displayOrder'],
65
+ };
66
+ }
@@ -40,6 +40,9 @@ export * from './GetPortalBasicReporting';
40
40
  export * from './GetPortalBasicReportingCertificates';
41
41
  export * from './GetPortalBasicReportingPortalInfo';
42
42
  export * from './GetPortalList';
43
+ export * from './GetPortalStudentReporting';
44
+ export * from './GetPortalStudentReportingCertificates';
45
+ export * from './GetPortalStudentReportingPortalInfo';
43
46
  export * from './GetPortalUser';
44
47
  export * from './GetPortalUserList';
45
48
  export * from './GetQuestion';
@@ -76,9 +79,9 @@ export * from './GetQuizListAllOfFilters';
76
79
  export * from './GetQuizListAllOfQuizzes';
77
80
  export * from './GetQuizListAllOfStatistics';
78
81
  export * from './GetQuizQuestions';
79
- export * from './GetQuizQuestionsQuestionsInner';
80
- export * from './GetQuizQuestionsQuestionsInnerQuestionDetails';
81
- export * from './GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner';
82
+ export * from './GetQuizQuestionsItemsInner';
83
+ export * from './GetQuizQuestionsItemsInnerQuestionDetails';
84
+ export * from './GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner';
82
85
  export * from './GetQuizResults';
83
86
  export * from './GetQuizResultsFeedback';
84
87
  export * from './GetQuizResultsFeedbackDifficultyPerformanceInner';
@@ -58,6 +58,9 @@ __exportStar(require("./GetPortalBasicReporting"), exports);
58
58
  __exportStar(require("./GetPortalBasicReportingCertificates"), exports);
59
59
  __exportStar(require("./GetPortalBasicReportingPortalInfo"), exports);
60
60
  __exportStar(require("./GetPortalList"), exports);
61
+ __exportStar(require("./GetPortalStudentReporting"), exports);
62
+ __exportStar(require("./GetPortalStudentReportingCertificates"), exports);
63
+ __exportStar(require("./GetPortalStudentReportingPortalInfo"), exports);
61
64
  __exportStar(require("./GetPortalUser"), exports);
62
65
  __exportStar(require("./GetPortalUserList"), exports);
63
66
  __exportStar(require("./GetQuestion"), exports);
@@ -94,9 +97,9 @@ __exportStar(require("./GetQuizListAllOfFilters"), exports);
94
97
  __exportStar(require("./GetQuizListAllOfQuizzes"), exports);
95
98
  __exportStar(require("./GetQuizListAllOfStatistics"), exports);
96
99
  __exportStar(require("./GetQuizQuestions"), exports);
97
- __exportStar(require("./GetQuizQuestionsQuestionsInner"), exports);
98
- __exportStar(require("./GetQuizQuestionsQuestionsInnerQuestionDetails"), exports);
99
- __exportStar(require("./GetQuizQuestionsQuestionsInnerQuestionDetailsAnswerChoicesInner"), exports);
100
+ __exportStar(require("./GetQuizQuestionsItemsInner"), exports);
101
+ __exportStar(require("./GetQuizQuestionsItemsInnerQuestionDetails"), exports);
102
+ __exportStar(require("./GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner"), exports);
100
103
  __exportStar(require("./GetQuizResults"), exports);
101
104
  __exportStar(require("./GetQuizResultsFeedback"), exports);
102
105
  __exportStar(require("./GetQuizResultsFeedbackDifficultyPerformanceInner"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -123,6 +123,8 @@ export interface GetQuizListRequest {
123
123
 
124
124
  export interface GetQuizQuestionsRequest {
125
125
  quizId: string;
126
+ page?: number;
127
+ pageSize?: number;
126
128
  }
127
129
 
128
130
  export interface GetUserQuizAttemptsRequest {
@@ -583,7 +585,7 @@ export class QuizApi extends runtime.BaseAPI {
583
585
  }
584
586
 
585
587
  /**
586
- * Get quiz questions
588
+ * Get quiz questions (paginated)
587
589
  */
588
590
  async getQuizQuestionsRaw(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizQuestions>> {
589
591
  if (requestParameters['quizId'] == null) {
@@ -595,6 +597,14 @@ export class QuizApi extends runtime.BaseAPI {
595
597
 
596
598
  const queryParameters: any = {};
597
599
 
600
+ if (requestParameters['page'] != null) {
601
+ queryParameters['page'] = requestParameters['page'];
602
+ }
603
+
604
+ if (requestParameters['pageSize'] != null) {
605
+ queryParameters['pageSize'] = requestParameters['pageSize'];
606
+ }
607
+
598
608
  const headerParameters: runtime.HTTPHeaders = {};
599
609
 
600
610
  const response = await this.request({
@@ -608,7 +618,7 @@ export class QuizApi extends runtime.BaseAPI {
608
618
  }
609
619
 
610
620
  /**
611
- * Get quiz questions
621
+ * Get quiz questions (paginated)
612
622
  */
613
623
  async getQuizQuestions(requestParameters: GetQuizQuestionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizQuestions> {
614
624
  const response = await this.getQuizQuestionsRaw(requestParameters, initOverrides);
@@ -23,6 +23,7 @@ import type {
23
23
  GetModuleInstructorBasicReporting,
24
24
  GetModuleStudentReporting,
25
25
  GetPortalBasicReporting,
26
+ GetPortalStudentReporting,
26
27
  } from '../models/index';
27
28
  import {
28
29
  GetContentGradeDetailFromJSON,
@@ -41,6 +42,8 @@ import {
41
42
  GetModuleStudentReportingToJSON,
42
43
  GetPortalBasicReportingFromJSON,
43
44
  GetPortalBasicReportingToJSON,
45
+ GetPortalStudentReportingFromJSON,
46
+ GetPortalStudentReportingToJSON,
44
47
  } from '../models/index';
45
48
 
46
49
  export interface GetContentGradeDetailRequest {
@@ -89,6 +92,11 @@ export interface GetPortalBasicReportingRequest {
89
92
  portalId: string;
90
93
  }
91
94
 
95
+ export interface GetPortalStudentReportingRequest {
96
+ portalId: string;
97
+ studentId: string;
98
+ }
99
+
92
100
  /**
93
101
  *
94
102
  */
@@ -447,4 +455,44 @@ export class ReportingApi extends runtime.BaseAPI {
447
455
  return await response.value();
448
456
  }
449
457
 
458
+ /**
459
+ * Get student reporting for a portal
460
+ */
461
+ async getPortalStudentReportingRaw(requestParameters: GetPortalStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalStudentReporting>> {
462
+ if (requestParameters['portalId'] == null) {
463
+ throw new runtime.RequiredError(
464
+ 'portalId',
465
+ 'Required parameter "portalId" was null or undefined when calling getPortalStudentReporting().'
466
+ );
467
+ }
468
+
469
+ if (requestParameters['studentId'] == null) {
470
+ throw new runtime.RequiredError(
471
+ 'studentId',
472
+ 'Required parameter "studentId" was null or undefined when calling getPortalStudentReporting().'
473
+ );
474
+ }
475
+
476
+ const queryParameters: any = {};
477
+
478
+ const headerParameters: runtime.HTTPHeaders = {};
479
+
480
+ const response = await this.request({
481
+ path: `/portals/{portalId}/reporting/students/{studentId}`.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId']))).replace(`{${"studentId"}}`, encodeURIComponent(String(requestParameters['studentId']))),
482
+ method: 'GET',
483
+ headers: headerParameters,
484
+ query: queryParameters,
485
+ }, initOverrides);
486
+
487
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalStudentReportingFromJSON(jsonValue));
488
+ }
489
+
490
+ /**
491
+ * Get student reporting for a portal
492
+ */
493
+ async getPortalStudentReporting(requestParameters: GetPortalStudentReportingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalStudentReporting> {
494
+ const response = await this.getPortalStudentReportingRaw(requestParameters, initOverrides);
495
+ return await response.value();
496
+ }
497
+
450
498
  }
@@ -0,0 +1,90 @@
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 { GetPortalStudentReportingCertificates } from './GetPortalStudentReportingCertificates';
17
+ import {
18
+ GetPortalStudentReportingCertificatesFromJSON,
19
+ GetPortalStudentReportingCertificatesFromJSONTyped,
20
+ GetPortalStudentReportingCertificatesToJSON,
21
+ GetPortalStudentReportingCertificatesToJSONTyped,
22
+ } from './GetPortalStudentReportingCertificates';
23
+ import type { GetPortalStudentReportingPortalInfo } from './GetPortalStudentReportingPortalInfo';
24
+ import {
25
+ GetPortalStudentReportingPortalInfoFromJSON,
26
+ GetPortalStudentReportingPortalInfoFromJSONTyped,
27
+ GetPortalStudentReportingPortalInfoToJSON,
28
+ GetPortalStudentReportingPortalInfoToJSONTyped,
29
+ } from './GetPortalStudentReportingPortalInfo';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetPortalStudentReporting
35
+ */
36
+ export interface GetPortalStudentReporting {
37
+ /**
38
+ *
39
+ * @type {GetPortalStudentReportingPortalInfo}
40
+ * @memberof GetPortalStudentReporting
41
+ */
42
+ portalInfo: GetPortalStudentReportingPortalInfo;
43
+ /**
44
+ *
45
+ * @type {GetPortalStudentReportingCertificates}
46
+ * @memberof GetPortalStudentReporting
47
+ */
48
+ certificates: GetPortalStudentReportingCertificates;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetPortalStudentReporting interface.
53
+ */
54
+ export function instanceOfGetPortalStudentReporting(value: object): value is GetPortalStudentReporting {
55
+ if (!('portalInfo' in value) || value['portalInfo'] === undefined) return false;
56
+ if (!('certificates' in value) || value['certificates'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function GetPortalStudentReportingFromJSON(json: any): GetPortalStudentReporting {
61
+ return GetPortalStudentReportingFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetPortalStudentReportingFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalStudentReporting {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'portalInfo': GetPortalStudentReportingPortalInfoFromJSON(json['portal_info']),
71
+ 'certificates': GetPortalStudentReportingCertificatesFromJSON(json['certificates']),
72
+ };
73
+ }
74
+
75
+ export function GetPortalStudentReportingToJSON(json: any): GetPortalStudentReporting {
76
+ return GetPortalStudentReportingToJSONTyped(json, false);
77
+ }
78
+
79
+ export function GetPortalStudentReportingToJSONTyped(value?: GetPortalStudentReporting | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'portal_info': GetPortalStudentReportingPortalInfoToJSON(value['portalInfo']),
87
+ 'certificates': GetPortalStudentReportingCertificatesToJSON(value['certificates']),
88
+ };
89
+ }
90
+
@@ -0,0 +1,66 @@
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 GetPortalStudentReportingCertificates
20
+ */
21
+ export interface GetPortalStudentReportingCertificates {
22
+ /**
23
+ * Total number of certificates earned by the student
24
+ * @type {number}
25
+ * @memberof GetPortalStudentReportingCertificates
26
+ */
27
+ certificatesEarnedCount: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetPortalStudentReportingCertificates interface.
32
+ */
33
+ export function instanceOfGetPortalStudentReportingCertificates(value: object): value is GetPortalStudentReportingCertificates {
34
+ if (!('certificatesEarnedCount' in value) || value['certificatesEarnedCount'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function GetPortalStudentReportingCertificatesFromJSON(json: any): GetPortalStudentReportingCertificates {
39
+ return GetPortalStudentReportingCertificatesFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function GetPortalStudentReportingCertificatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalStudentReportingCertificates {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'certificatesEarnedCount': json['certificates_earned_count'],
49
+ };
50
+ }
51
+
52
+ export function GetPortalStudentReportingCertificatesToJSON(json: any): GetPortalStudentReportingCertificates {
53
+ return GetPortalStudentReportingCertificatesToJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetPortalStudentReportingCertificatesToJSONTyped(value?: GetPortalStudentReportingCertificates | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'certificates_earned_count': value['certificatesEarnedCount'],
64
+ };
65
+ }
66
+
@@ -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 GetPortalStudentReportingPortalInfo
20
+ */
21
+ export interface GetPortalStudentReportingPortalInfo {
22
+ /**
23
+ * Total number of courses the student is enrolled in
24
+ * @type {number}
25
+ * @memberof GetPortalStudentReportingPortalInfo
26
+ */
27
+ enrolledCoursesCount: number;
28
+ /**
29
+ * Number of courses the student has completed
30
+ * @type {number}
31
+ * @memberof GetPortalStudentReportingPortalInfo
32
+ */
33
+ completedCoursesCount: number;
34
+ /**
35
+ * Number of courses currently in progress
36
+ * @type {number}
37
+ * @memberof GetPortalStudentReportingPortalInfo
38
+ */
39
+ inProgressCoursesCount: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the GetPortalStudentReportingPortalInfo interface.
44
+ */
45
+ export function instanceOfGetPortalStudentReportingPortalInfo(value: object): value is GetPortalStudentReportingPortalInfo {
46
+ if (!('enrolledCoursesCount' in value) || value['enrolledCoursesCount'] === undefined) return false;
47
+ if (!('completedCoursesCount' in value) || value['completedCoursesCount'] === undefined) return false;
48
+ if (!('inProgressCoursesCount' in value) || value['inProgressCoursesCount'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function GetPortalStudentReportingPortalInfoFromJSON(json: any): GetPortalStudentReportingPortalInfo {
53
+ return GetPortalStudentReportingPortalInfoFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetPortalStudentReportingPortalInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPortalStudentReportingPortalInfo {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'enrolledCoursesCount': json['enrolled_courses_count'],
63
+ 'completedCoursesCount': json['completed_courses_count'],
64
+ 'inProgressCoursesCount': json['in_progress_courses_count'],
65
+ };
66
+ }
67
+
68
+ export function GetPortalStudentReportingPortalInfoToJSON(json: any): GetPortalStudentReportingPortalInfo {
69
+ return GetPortalStudentReportingPortalInfoToJSONTyped(json, false);
70
+ }
71
+
72
+ export function GetPortalStudentReportingPortalInfoToJSONTyped(value?: GetPortalStudentReportingPortalInfo | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'enrolled_courses_count': value['enrolledCoursesCount'],
80
+ 'completed_courses_count': value['completedCoursesCount'],
81
+ 'in_progress_courses_count': value['inProgressCoursesCount'],
82
+ };
83
+ }
84
+
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { GetQuizQuestionsQuestionsInner } from './GetQuizQuestionsQuestionsInner';
16
+ import type { GetQuizQuestionsItemsInner } from './GetQuizQuestionsItemsInner';
17
17
  import {
18
- GetQuizQuestionsQuestionsInnerFromJSON,
19
- GetQuizQuestionsQuestionsInnerFromJSONTyped,
20
- GetQuizQuestionsQuestionsInnerToJSON,
21
- GetQuizQuestionsQuestionsInnerToJSONTyped,
22
- } from './GetQuizQuestionsQuestionsInner';
18
+ GetQuizQuestionsItemsInnerFromJSON,
19
+ GetQuizQuestionsItemsInnerFromJSONTyped,
20
+ GetQuizQuestionsItemsInnerToJSON,
21
+ GetQuizQuestionsItemsInnerToJSONTyped,
22
+ } from './GetQuizQuestionsItemsInner';
23
23
 
24
24
  /**
25
25
  *
@@ -28,13 +28,31 @@ import {
28
28
  */
29
29
  export interface GetQuizQuestions {
30
30
  /**
31
- * Questions in the quiz
32
- * @type {Array<GetQuizQuestionsQuestionsInner>}
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetQuizQuestions
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetQuizQuestions
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetQuizQuestions
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of questions in the quiz
50
+ * @type {number}
33
51
  * @memberof GetQuizQuestions
34
52
  */
35
- questions: Array<GetQuizQuestionsQuestionsInner>;
53
+ totalItems: number;
36
54
  /**
37
- * Total number of questions in quiz
55
+ * Total number of questions in quiz (same as totalItems)
38
56
  * @type {number}
39
57
  * @memberof GetQuizQuestions
40
58
  */
@@ -51,6 +69,12 @@ export interface GetQuizQuestions {
51
69
  * @memberof GetQuizQuestions
52
70
  */
53
71
  selectionMethod: GetQuizQuestionsSelectionMethodEnum;
72
+ /**
73
+ * Questions in the quiz (paginated)
74
+ * @type {Array<GetQuizQuestionsItemsInner>}
75
+ * @memberof GetQuizQuestions
76
+ */
77
+ items: Array<GetQuizQuestionsItemsInner>;
54
78
  }
55
79
 
56
80
 
@@ -68,10 +92,14 @@ export type GetQuizQuestionsSelectionMethodEnum = typeof GetQuizQuestionsSelecti
68
92
  * Check if a given object implements the GetQuizQuestions interface.
69
93
  */
70
94
  export function instanceOfGetQuizQuestions(value: object): value is GetQuizQuestions {
71
- if (!('questions' in value) || value['questions'] === undefined) return false;
95
+ if (!('page' in value) || value['page'] === undefined) return false;
96
+ if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
97
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
98
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
72
99
  if (!('totalQuestions' in value) || value['totalQuestions'] === undefined) return false;
73
100
  if (!('totalPoints' in value) || value['totalPoints'] === undefined) return false;
74
101
  if (!('selectionMethod' in value) || value['selectionMethod'] === undefined) return false;
102
+ if (!('items' in value) || value['items'] === undefined) return false;
75
103
  return true;
76
104
  }
77
105
 
@@ -85,10 +113,14 @@ export function GetQuizQuestionsFromJSONTyped(json: any, ignoreDiscriminator: bo
85
113
  }
86
114
  return {
87
115
 
88
- 'questions': ((json['questions'] as Array<any>).map(GetQuizQuestionsQuestionsInnerFromJSON)),
116
+ 'page': json['page'],
117
+ 'pageSize': json['pageSize'],
118
+ 'totalPages': json['totalPages'],
119
+ 'totalItems': json['totalItems'],
89
120
  'totalQuestions': json['total_questions'],
90
121
  'totalPoints': json['total_points'],
91
122
  'selectionMethod': json['selection_method'],
123
+ 'items': ((json['items'] as Array<any>).map(GetQuizQuestionsItemsInnerFromJSON)),
92
124
  };
93
125
  }
94
126
 
@@ -103,10 +135,14 @@ export function GetQuizQuestionsToJSONTyped(value?: GetQuizQuestions | null, ign
103
135
 
104
136
  return {
105
137
 
106
- 'questions': ((value['questions'] as Array<any>).map(GetQuizQuestionsQuestionsInnerToJSON)),
138
+ 'page': value['page'],
139
+ 'pageSize': value['pageSize'],
140
+ 'totalPages': value['totalPages'],
141
+ 'totalItems': value['totalItems'],
107
142
  'total_questions': value['totalQuestions'],
108
143
  'total_points': value['totalPoints'],
109
144
  'selection_method': value['selectionMethod'],
145
+ 'items': ((value['items'] as Array<any>).map(GetQuizQuestionsItemsInnerToJSON)),
110
146
  };
111
147
  }
112
148