@easyedu/js-lsm-api 1.79.0 → 1.81.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.
- package/.openapi-generator/FILES +26 -0
- package/README.md +18 -2
- package/dist/apis/RichTextApi.d.ts +67 -0
- package/dist/apis/RichTextApi.js +158 -0
- package/dist/apis/UserApi.d.ts +42 -0
- package/dist/apis/UserApi.js +79 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/RichTextApi.d.ts +67 -0
- package/dist/esm/apis/RichTextApi.js +154 -0
- package/dist/esm/apis/UserApi.d.ts +42 -0
- package/dist/esm/apis/UserApi.js +78 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetQuestion.d.ts +7 -6
- package/dist/esm/models/GetQuestion.js +5 -4
- package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/GetQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/GetRichTextAssetUpload.d.ts +50 -0
- package/dist/esm/models/GetRichTextAssetUpload.js +55 -0
- package/dist/esm/models/GetUserCourseList.d.ts +57 -0
- package/dist/esm/models/GetUserCourseList.js +60 -0
- package/dist/esm/models/GetUserCourseListItem.d.ts +54 -0
- package/dist/esm/models/GetUserCourseListItem.js +59 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.d.ts +74 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.js +75 -0
- package/dist/esm/models/GetUserCourseListItemCourse.d.ts +89 -0
- package/dist/esm/models/GetUserCourseListItemCourse.js +82 -0
- package/dist/esm/models/GetUserCourseListItemEnrollment.d.ts +111 -0
- package/dist/esm/models/GetUserCourseListItemEnrollment.js +105 -0
- package/dist/esm/models/GetUserCourseListItemProgress.d.ts +44 -0
- package/dist/esm/models/GetUserCourseListItemProgress.js +51 -0
- package/dist/esm/models/PostQuestion.d.ts +7 -6
- package/dist/esm/models/PostQuestion.js +5 -4
- package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/PostQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/PostRichTextAssetComplete.d.ts +44 -0
- package/dist/esm/models/PostRichTextAssetComplete.js +47 -0
- package/dist/esm/models/PostRichTextAssetUpload.d.ts +69 -0
- package/dist/esm/models/PostRichTextAssetUpload.js +65 -0
- package/dist/esm/models/PutQuestion.d.ts +7 -6
- package/dist/esm/models/PutQuestion.js +5 -4
- package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/PutQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/RichTextAsset.d.ts +62 -0
- package/dist/esm/models/RichTextAsset.js +59 -0
- package/dist/esm/models/RichTextDocument.d.ts +60 -0
- package/dist/esm/models/RichTextDocument.js +62 -0
- package/dist/esm/models/RichTextInput.d.ts +47 -0
- package/dist/esm/models/RichTextInput.js +53 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/GetQuestion.d.ts +7 -6
- package/dist/models/GetQuestion.js +5 -4
- package/dist/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/GetQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/GetRichTextAssetUpload.d.ts +50 -0
- package/dist/models/GetRichTextAssetUpload.js +62 -0
- package/dist/models/GetUserCourseList.d.ts +57 -0
- package/dist/models/GetUserCourseList.js +67 -0
- package/dist/models/GetUserCourseListItem.d.ts +54 -0
- package/dist/models/GetUserCourseListItem.js +66 -0
- package/dist/models/GetUserCourseListItemCertificate.d.ts +74 -0
- package/dist/models/GetUserCourseListItemCertificate.js +83 -0
- package/dist/models/GetUserCourseListItemCourse.d.ts +89 -0
- package/dist/models/GetUserCourseListItemCourse.js +90 -0
- package/dist/models/GetUserCourseListItemEnrollment.d.ts +111 -0
- package/dist/models/GetUserCourseListItemEnrollment.js +113 -0
- package/dist/models/GetUserCourseListItemProgress.d.ts +44 -0
- package/dist/models/GetUserCourseListItemProgress.js +58 -0
- package/dist/models/PostQuestion.d.ts +7 -6
- package/dist/models/PostQuestion.js +5 -4
- package/dist/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/PostQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/PostRichTextAssetComplete.d.ts +44 -0
- package/dist/models/PostRichTextAssetComplete.js +54 -0
- package/dist/models/PostRichTextAssetUpload.d.ts +69 -0
- package/dist/models/PostRichTextAssetUpload.js +73 -0
- package/dist/models/PutQuestion.d.ts +7 -6
- package/dist/models/PutQuestion.js +5 -4
- package/dist/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/PutQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/RichTextAsset.d.ts +62 -0
- package/dist/models/RichTextAsset.js +66 -0
- package/dist/models/RichTextDocument.d.ts +60 -0
- package/dist/models/RichTextDocument.js +70 -0
- package/dist/models/RichTextInput.d.ts +47 -0
- package/dist/models/RichTextInput.js +61 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/GetQuestion.md +2 -2
- package/docs/GetQuestionAnswerChoicesInner.md +1 -1
- package/docs/GetRichTextAssetUpload.md +40 -0
- package/docs/GetUserCourseList.md +43 -0
- package/docs/GetUserCourseListItem.md +41 -0
- package/docs/GetUserCourseListItemCertificate.md +43 -0
- package/docs/GetUserCourseListItemCourse.md +51 -0
- package/docs/GetUserCourseListItemEnrollment.md +49 -0
- package/docs/GetUserCourseListItemProgress.md +39 -0
- package/docs/PostQuestion.md +2 -2
- package/docs/PostQuestionAnswerChoicesInner.md +1 -1
- package/docs/PostRichTextAssetComplete.md +38 -0
- package/docs/PostRichTextAssetUpload.md +44 -0
- package/docs/PutQuestion.md +2 -2
- package/docs/PutQuestionAnswerChoicesInner.md +1 -1
- package/docs/RichTextApi.md +212 -0
- package/docs/RichTextAsset.md +44 -0
- package/docs/RichTextDocument.md +40 -0
- package/docs/RichTextInput.md +36 -0
- package/docs/UserApi.md +90 -0
- package/package.json +1 -1
- package/src/apis/RichTextApi.ts +201 -0
- package/src/apis/UserApi.ts +108 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetQuestion.ts +17 -10
- package/src/models/GetQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/GetRichTextAssetUpload.ts +93 -0
- package/src/models/GetUserCourseList.ts +110 -0
- package/src/models/GetUserCourseListItem.ts +122 -0
- package/src/models/GetUserCourseListItemCertificate.ts +124 -0
- package/src/models/GetUserCourseListItemCourse.ts +149 -0
- package/src/models/GetUserCourseListItemEnrollment.ts +171 -0
- package/src/models/GetUserCourseListItemProgress.ts +84 -0
- package/src/models/PostQuestion.ts +17 -10
- package/src/models/PostQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/PostRichTextAssetComplete.ts +82 -0
- package/src/models/PostRichTextAssetUpload.ts +119 -0
- package/src/models/PutQuestion.ts +17 -10
- package/src/models/PutQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/RichTextAsset.ts +109 -0
- package/src/models/RichTextDocument.ts +111 -0
- package/src/models/RichTextInput.ts +85 -0
- package/src/models/index.ts +12 -0
|
@@ -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 GetRichTextAssetUpload
|
|
20
|
+
*/
|
|
21
|
+
export interface GetRichTextAssetUpload {
|
|
22
|
+
/**
|
|
23
|
+
* Created pending asset ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetRichTextAssetUpload
|
|
26
|
+
*/
|
|
27
|
+
assetId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Presigned URL for direct upload
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetRichTextAssetUpload
|
|
32
|
+
*/
|
|
33
|
+
uploadUrl: string;
|
|
34
|
+
/**
|
|
35
|
+
* Authenticated API URL that redirects to a signed asset URL once completed
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetRichTextAssetUpload
|
|
38
|
+
*/
|
|
39
|
+
renderUrl: string;
|
|
40
|
+
/**
|
|
41
|
+
* Upload URL lifetime
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetRichTextAssetUpload
|
|
44
|
+
*/
|
|
45
|
+
expiresInSeconds: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the GetRichTextAssetUpload interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfGetRichTextAssetUpload(value: object): value is GetRichTextAssetUpload {
|
|
52
|
+
if (!('assetId' in value) || value['assetId'] === undefined) return false;
|
|
53
|
+
if (!('uploadUrl' in value) || value['uploadUrl'] === undefined) return false;
|
|
54
|
+
if (!('renderUrl' in value) || value['renderUrl'] === undefined) return false;
|
|
55
|
+
if (!('expiresInSeconds' in value) || value['expiresInSeconds'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function GetRichTextAssetUploadFromJSON(json: any): GetRichTextAssetUpload {
|
|
60
|
+
return GetRichTextAssetUploadFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function GetRichTextAssetUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetRichTextAssetUpload {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'assetId': json['asset_id'],
|
|
70
|
+
'uploadUrl': json['upload_url'],
|
|
71
|
+
'renderUrl': json['render_url'],
|
|
72
|
+
'expiresInSeconds': json['expires_in_seconds'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function GetRichTextAssetUploadToJSON(json: any): GetRichTextAssetUpload {
|
|
77
|
+
return GetRichTextAssetUploadToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function GetRichTextAssetUploadToJSONTyped(value?: GetRichTextAssetUpload | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'asset_id': value['assetId'],
|
|
88
|
+
'upload_url': value['uploadUrl'],
|
|
89
|
+
'render_url': value['renderUrl'],
|
|
90
|
+
'expires_in_seconds': value['expiresInSeconds'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
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 { GetUserCourseListItem } from './GetUserCourseListItem';
|
|
17
|
+
import {
|
|
18
|
+
GetUserCourseListItemFromJSON,
|
|
19
|
+
GetUserCourseListItemFromJSONTyped,
|
|
20
|
+
GetUserCourseListItemToJSON,
|
|
21
|
+
GetUserCourseListItemToJSONTyped,
|
|
22
|
+
} from './GetUserCourseListItem';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A paginated list of courses the target user is enrolled in.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetUserCourseList
|
|
28
|
+
*/
|
|
29
|
+
export interface GetUserCourseList {
|
|
30
|
+
/**
|
|
31
|
+
* The current page number
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GetUserCourseList
|
|
34
|
+
*/
|
|
35
|
+
page: number;
|
|
36
|
+
/**
|
|
37
|
+
* The number of items returned on this page
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GetUserCourseList
|
|
40
|
+
*/
|
|
41
|
+
pageSize: number;
|
|
42
|
+
/**
|
|
43
|
+
* The total number of pages
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GetUserCourseList
|
|
46
|
+
*/
|
|
47
|
+
totalPages: number;
|
|
48
|
+
/**
|
|
49
|
+
* The total number of courses after selecting one enrollment per course
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GetUserCourseList
|
|
52
|
+
*/
|
|
53
|
+
totalItems: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<GetUserCourseListItem>}
|
|
57
|
+
* @memberof GetUserCourseList
|
|
58
|
+
*/
|
|
59
|
+
items: Array<GetUserCourseListItem>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the GetUserCourseList interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfGetUserCourseList(value: object): value is GetUserCourseList {
|
|
66
|
+
if (!('page' in value) || value['page'] === undefined) return false;
|
|
67
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
|
|
68
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
|
69
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
|
|
70
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function GetUserCourseListFromJSON(json: any): GetUserCourseList {
|
|
75
|
+
return GetUserCourseListFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function GetUserCourseListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseList {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'page': json['page'],
|
|
85
|
+
'pageSize': json['pageSize'],
|
|
86
|
+
'totalPages': json['totalPages'],
|
|
87
|
+
'totalItems': json['totalItems'],
|
|
88
|
+
'items': ((json['items'] as Array<any>).map(GetUserCourseListItemFromJSON)),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function GetUserCourseListToJSON(json: any): GetUserCourseList {
|
|
93
|
+
return GetUserCourseListToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function GetUserCourseListToJSONTyped(value?: GetUserCourseList | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'page': value['page'],
|
|
104
|
+
'pageSize': value['pageSize'],
|
|
105
|
+
'totalPages': value['totalPages'],
|
|
106
|
+
'totalItems': value['totalItems'],
|
|
107
|
+
'items': ((value['items'] as Array<any>).map(GetUserCourseListItemToJSON)),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
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 { GetUserCourseListItemCourse } from './GetUserCourseListItemCourse';
|
|
17
|
+
import {
|
|
18
|
+
GetUserCourseListItemCourseFromJSON,
|
|
19
|
+
GetUserCourseListItemCourseFromJSONTyped,
|
|
20
|
+
GetUserCourseListItemCourseToJSON,
|
|
21
|
+
GetUserCourseListItemCourseToJSONTyped,
|
|
22
|
+
} from './GetUserCourseListItemCourse';
|
|
23
|
+
import type { GetUserCourseListItemEnrollment } from './GetUserCourseListItemEnrollment';
|
|
24
|
+
import {
|
|
25
|
+
GetUserCourseListItemEnrollmentFromJSON,
|
|
26
|
+
GetUserCourseListItemEnrollmentFromJSONTyped,
|
|
27
|
+
GetUserCourseListItemEnrollmentToJSON,
|
|
28
|
+
GetUserCourseListItemEnrollmentToJSONTyped,
|
|
29
|
+
} from './GetUserCourseListItemEnrollment';
|
|
30
|
+
import type { GetUserCourseListItemCertificate } from './GetUserCourseListItemCertificate';
|
|
31
|
+
import {
|
|
32
|
+
GetUserCourseListItemCertificateFromJSON,
|
|
33
|
+
GetUserCourseListItemCertificateFromJSONTyped,
|
|
34
|
+
GetUserCourseListItemCertificateToJSON,
|
|
35
|
+
GetUserCourseListItemCertificateToJSONTyped,
|
|
36
|
+
} from './GetUserCourseListItemCertificate';
|
|
37
|
+
import type { GetUserCourseListItemProgress } from './GetUserCourseListItemProgress';
|
|
38
|
+
import {
|
|
39
|
+
GetUserCourseListItemProgressFromJSON,
|
|
40
|
+
GetUserCourseListItemProgressFromJSONTyped,
|
|
41
|
+
GetUserCourseListItemProgressToJSON,
|
|
42
|
+
GetUserCourseListItemProgressToJSONTyped,
|
|
43
|
+
} from './GetUserCourseListItemProgress';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A course the target user is enrolled in, grouped by course and selected enrollment.
|
|
47
|
+
* @export
|
|
48
|
+
* @interface GetUserCourseListItem
|
|
49
|
+
*/
|
|
50
|
+
export interface GetUserCourseListItem {
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {GetUserCourseListItemCourse}
|
|
54
|
+
* @memberof GetUserCourseListItem
|
|
55
|
+
*/
|
|
56
|
+
course: GetUserCourseListItemCourse;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {GetUserCourseListItemEnrollment}
|
|
60
|
+
* @memberof GetUserCourseListItem
|
|
61
|
+
*/
|
|
62
|
+
enrollment: GetUserCourseListItemEnrollment;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {GetUserCourseListItemProgress}
|
|
66
|
+
* @memberof GetUserCourseListItem
|
|
67
|
+
*/
|
|
68
|
+
progress: GetUserCourseListItemProgress;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {GetUserCourseListItemCertificate}
|
|
72
|
+
* @memberof GetUserCourseListItem
|
|
73
|
+
*/
|
|
74
|
+
certificate: GetUserCourseListItemCertificate | null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the GetUserCourseListItem interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfGetUserCourseListItem(value: object): value is GetUserCourseListItem {
|
|
81
|
+
if (!('course' in value) || value['course'] === undefined) return false;
|
|
82
|
+
if (!('enrollment' in value) || value['enrollment'] === undefined) return false;
|
|
83
|
+
if (!('progress' in value) || value['progress'] === undefined) return false;
|
|
84
|
+
if (!('certificate' in value) || value['certificate'] === undefined) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function GetUserCourseListItemFromJSON(json: any): GetUserCourseListItem {
|
|
89
|
+
return GetUserCourseListItemFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function GetUserCourseListItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseListItem {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'course': GetUserCourseListItemCourseFromJSON(json['course']),
|
|
99
|
+
'enrollment': GetUserCourseListItemEnrollmentFromJSON(json['enrollment']),
|
|
100
|
+
'progress': GetUserCourseListItemProgressFromJSON(json['progress']),
|
|
101
|
+
'certificate': GetUserCourseListItemCertificateFromJSON(json['certificate']),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function GetUserCourseListItemToJSON(json: any): GetUserCourseListItem {
|
|
106
|
+
return GetUserCourseListItemToJSONTyped(json, false);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function GetUserCourseListItemToJSONTyped(value?: GetUserCourseListItem | null, ignoreDiscriminator: boolean = false): any {
|
|
110
|
+
if (value == null) {
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
|
|
116
|
+
'course': GetUserCourseListItemCourseToJSON(value['course']),
|
|
117
|
+
'enrollment': GetUserCourseListItemEnrollmentToJSON(value['enrollment']),
|
|
118
|
+
'progress': GetUserCourseListItemProgressToJSON(value['progress']),
|
|
119
|
+
'certificate': GetUserCourseListItemCertificateToJSON(value['certificate']),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
* Latest certificate for the learner and course, if one exists.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetUserCourseListItemCertificate
|
|
20
|
+
*/
|
|
21
|
+
export interface GetUserCourseListItemCertificate {
|
|
22
|
+
/**
|
|
23
|
+
* The external ID of the certificate.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetUserCourseListItemCertificate
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Derived certificate status. Active certificates with expires_at in the past are returned as expired.
|
|
30
|
+
* @type {GetUserCourseListItemCertificateStatusEnum}
|
|
31
|
+
* @memberof GetUserCourseListItemCertificate
|
|
32
|
+
*/
|
|
33
|
+
status: GetUserCourseListItemCertificateStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof GetUserCourseListItemCertificate
|
|
38
|
+
*/
|
|
39
|
+
issuedAt: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetUserCourseListItemCertificate
|
|
44
|
+
*/
|
|
45
|
+
expiresAt: number | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {GetUserCourseListItemCertificateIssuanceReasonEnum}
|
|
49
|
+
* @memberof GetUserCourseListItemCertificate
|
|
50
|
+
*/
|
|
51
|
+
issuanceReason: GetUserCourseListItemCertificateIssuanceReasonEnum;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const GetUserCourseListItemCertificateStatusEnum = {
|
|
59
|
+
Active: 'active',
|
|
60
|
+
Expired: 'expired',
|
|
61
|
+
Revoked: 'revoked'
|
|
62
|
+
} as const;
|
|
63
|
+
export type GetUserCourseListItemCertificateStatusEnum = typeof GetUserCourseListItemCertificateStatusEnum[keyof typeof GetUserCourseListItemCertificateStatusEnum];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @export
|
|
67
|
+
*/
|
|
68
|
+
export const GetUserCourseListItemCertificateIssuanceReasonEnum = {
|
|
69
|
+
CourseCompletion: 'course_completion',
|
|
70
|
+
QuizPassed: 'quiz_passed',
|
|
71
|
+
Manual: 'manual'
|
|
72
|
+
} as const;
|
|
73
|
+
export type GetUserCourseListItemCertificateIssuanceReasonEnum = typeof GetUserCourseListItemCertificateIssuanceReasonEnum[keyof typeof GetUserCourseListItemCertificateIssuanceReasonEnum];
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Check if a given object implements the GetUserCourseListItemCertificate interface.
|
|
78
|
+
*/
|
|
79
|
+
export function instanceOfGetUserCourseListItemCertificate(value: object): value is GetUserCourseListItemCertificate {
|
|
80
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
81
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
82
|
+
if (!('issuedAt' in value) || value['issuedAt'] === undefined) return false;
|
|
83
|
+
if (!('expiresAt' in value) || value['expiresAt'] === undefined) return false;
|
|
84
|
+
if (!('issuanceReason' in value) || value['issuanceReason'] === undefined) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function GetUserCourseListItemCertificateFromJSON(json: any): GetUserCourseListItemCertificate {
|
|
89
|
+
return GetUserCourseListItemCertificateFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function GetUserCourseListItemCertificateFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseListItemCertificate {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'id': json['id'],
|
|
99
|
+
'status': json['status'],
|
|
100
|
+
'issuedAt': json['issued_at'],
|
|
101
|
+
'expiresAt': json['expires_at'],
|
|
102
|
+
'issuanceReason': json['issuance_reason'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function GetUserCourseListItemCertificateToJSON(json: any): GetUserCourseListItemCertificate {
|
|
107
|
+
return GetUserCourseListItemCertificateToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function GetUserCourseListItemCertificateToJSONTyped(value?: GetUserCourseListItemCertificate | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'id': value['id'],
|
|
118
|
+
'status': value['status'],
|
|
119
|
+
'issued_at': value['issuedAt'],
|
|
120
|
+
'expires_at': value['expiresAt'],
|
|
121
|
+
'issuance_reason': value['issuanceReason'],
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
* Course fields for an enrolled user's course list item.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetUserCourseListItemCourse
|
|
20
|
+
*/
|
|
21
|
+
export interface GetUserCourseListItemCourse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetUserCourseListItemCourse
|
|
26
|
+
*/
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetUserCourseListItemCourse
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetUserCourseListItemCourse
|
|
38
|
+
*/
|
|
39
|
+
description: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GetUserCourseListItemCourse
|
|
44
|
+
*/
|
|
45
|
+
imageUrl: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof GetUserCourseListItemCourse
|
|
50
|
+
*/
|
|
51
|
+
published: boolean;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof GetUserCourseListItemCourse
|
|
56
|
+
*/
|
|
57
|
+
createdAt: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {GetUserCourseListItemCourseAccessPolicyTypeEnum}
|
|
61
|
+
* @memberof GetUserCourseListItemCourse
|
|
62
|
+
*/
|
|
63
|
+
accessPolicyType: GetUserCourseListItemCourseAccessPolicyTypeEnum;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof GetUserCourseListItemCourse
|
|
68
|
+
*/
|
|
69
|
+
accessDurationDays: number | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof GetUserCourseListItemCourse
|
|
74
|
+
*/
|
|
75
|
+
accessFixedEndAt: number | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const GetUserCourseListItemCourseAccessPolicyTypeEnum = {
|
|
83
|
+
DurationDays: 'duration_days',
|
|
84
|
+
FixedEndDate: 'fixed_end_date',
|
|
85
|
+
NeverExpires: 'never_expires'
|
|
86
|
+
} as const;
|
|
87
|
+
export type GetUserCourseListItemCourseAccessPolicyTypeEnum = typeof GetUserCourseListItemCourseAccessPolicyTypeEnum[keyof typeof GetUserCourseListItemCourseAccessPolicyTypeEnum];
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Check if a given object implements the GetUserCourseListItemCourse interface.
|
|
92
|
+
*/
|
|
93
|
+
export function instanceOfGetUserCourseListItemCourse(value: object): value is GetUserCourseListItemCourse {
|
|
94
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
95
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
96
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
97
|
+
if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
|
|
98
|
+
if (!('published' in value) || value['published'] === undefined) return false;
|
|
99
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
100
|
+
if (!('accessPolicyType' in value) || value['accessPolicyType'] === undefined) return false;
|
|
101
|
+
if (!('accessDurationDays' in value) || value['accessDurationDays'] === undefined) return false;
|
|
102
|
+
if (!('accessFixedEndAt' in value) || value['accessFixedEndAt'] === undefined) return false;
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function GetUserCourseListItemCourseFromJSON(json: any): GetUserCourseListItemCourse {
|
|
107
|
+
return GetUserCourseListItemCourseFromJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function GetUserCourseListItemCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserCourseListItemCourse {
|
|
111
|
+
if (json == null) {
|
|
112
|
+
return json;
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
|
|
116
|
+
'id': json['id'],
|
|
117
|
+
'name': json['name'],
|
|
118
|
+
'description': json['description'],
|
|
119
|
+
'imageUrl': json['image_url'],
|
|
120
|
+
'published': json['published'],
|
|
121
|
+
'createdAt': json['created_at'],
|
|
122
|
+
'accessPolicyType': json['access_policy_type'],
|
|
123
|
+
'accessDurationDays': json['access_duration_days'],
|
|
124
|
+
'accessFixedEndAt': json['access_fixed_end_at'],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function GetUserCourseListItemCourseToJSON(json: any): GetUserCourseListItemCourse {
|
|
129
|
+
return GetUserCourseListItemCourseToJSONTyped(json, false);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function GetUserCourseListItemCourseToJSONTyped(value?: Omit<GetUserCourseListItemCourse, 'id'> | null, ignoreDiscriminator: boolean = false): any {
|
|
133
|
+
if (value == null) {
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
|
|
139
|
+
'name': value['name'],
|
|
140
|
+
'description': value['description'],
|
|
141
|
+
'image_url': value['imageUrl'],
|
|
142
|
+
'published': value['published'],
|
|
143
|
+
'created_at': value['createdAt'],
|
|
144
|
+
'access_policy_type': value['accessPolicyType'],
|
|
145
|
+
'access_duration_days': value['accessDurationDays'],
|
|
146
|
+
'access_fixed_end_at': value['accessFixedEndAt'],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|