@easyedu/js-lsm-api 1.110.0 → 1.112.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 +42 -0
- package/README.md +33 -2
- package/dist/apis/LearnerExperienceApi.d.ts +153 -0
- package/dist/apis/LearnerExperienceApi.js +401 -0
- package/dist/apis/QuestionImportApi.d.ts +51 -0
- package/dist/apis/QuestionImportApi.js +135 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/LearnerExperienceApi.d.ts +153 -0
- package/dist/esm/apis/LearnerExperienceApi.js +397 -0
- package/dist/esm/apis/QuestionImportApi.d.ts +51 -0
- package/dist/esm/apis/QuestionImportApi.js +131 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/GetEffectiveLearnerExperience.d.ts +62 -0
- package/dist/esm/models/GetEffectiveLearnerExperience.js +62 -0
- package/dist/esm/models/GetLearnerDashboard.d.ts +47 -0
- package/dist/esm/models/GetLearnerDashboard.js +54 -0
- package/dist/esm/models/GetLearnerDashboardCourseList.d.ts +39 -0
- package/dist/esm/models/GetLearnerDashboardCourseList.js +48 -0
- package/dist/esm/models/GetLearnerDashboardSummary.d.ts +56 -0
- package/dist/esm/models/GetLearnerDashboardSummary.js +59 -0
- package/dist/esm/models/GetLearnerExperience.d.ts +67 -0
- package/dist/esm/models/GetLearnerExperience.js +65 -0
- package/dist/esm/models/GetLearnerExperiencePreview.d.ts +40 -0
- package/dist/esm/models/GetLearnerExperiencePreview.js +47 -0
- package/dist/esm/models/GetQuestion.d.ts +7 -0
- package/dist/esm/models/GetQuestion.js +3 -0
- package/dist/esm/models/LearnerExperienceVersion.d.ts +86 -0
- package/dist/esm/models/LearnerExperienceVersion.js +76 -0
- package/dist/esm/models/PostLearnerExperiencePreview.d.ts +40 -0
- package/dist/esm/models/PostLearnerExperiencePreview.js +45 -0
- package/dist/esm/models/PostQuestionImportCommit.d.ts +58 -0
- package/dist/esm/models/PostQuestionImportCommit.js +59 -0
- package/dist/esm/models/PostQuestionImportCommitItem.d.ts +72 -0
- package/dist/esm/models/PostQuestionImportCommitItem.js +66 -0
- package/dist/esm/models/PostQuestionImportCommitResponse.d.ts +51 -0
- package/dist/esm/models/PostQuestionImportCommitResponse.js +56 -0
- package/dist/esm/models/PostQuestionImportParseResponse.d.ts +71 -0
- package/dist/esm/models/PostQuestionImportParseResponse.js +70 -0
- package/dist/esm/models/PutLearnerExperienceDraft.d.ts +40 -0
- package/dist/esm/models/PutLearnerExperienceDraft.js +45 -0
- package/dist/esm/models/QuestionImportCommitResult.d.ts +53 -0
- package/dist/esm/models/QuestionImportCommitResult.js +57 -0
- package/dist/esm/models/QuestionImportDraft.d.ts +76 -0
- package/dist/esm/models/QuestionImportDraft.js +69 -0
- package/dist/esm/models/QuestionImportDuplicate.d.ts +66 -0
- package/dist/esm/models/QuestionImportDuplicate.js +62 -0
- package/dist/esm/models/QuestionImportPreviewImage.d.ts +84 -0
- package/dist/esm/models/QuestionImportPreviewImage.js +76 -0
- package/dist/esm/models/QuestionImportSource.d.ts +56 -0
- package/dist/esm/models/QuestionImportSource.js +57 -0
- package/dist/esm/models/QuestionImportSourceSummary.d.ts +50 -0
- package/dist/esm/models/QuestionImportSourceSummary.js +53 -0
- package/dist/esm/models/index.d.ts +19 -0
- package/dist/esm/models/index.js +19 -0
- package/dist/models/GetEffectiveLearnerExperience.d.ts +62 -0
- package/dist/models/GetEffectiveLearnerExperience.js +70 -0
- package/dist/models/GetLearnerDashboard.d.ts +47 -0
- package/dist/models/GetLearnerDashboard.js +61 -0
- package/dist/models/GetLearnerDashboardCourseList.d.ts +39 -0
- package/dist/models/GetLearnerDashboardCourseList.js +55 -0
- package/dist/models/GetLearnerDashboardSummary.d.ts +56 -0
- package/dist/models/GetLearnerDashboardSummary.js +66 -0
- package/dist/models/GetLearnerExperience.d.ts +67 -0
- package/dist/models/GetLearnerExperience.js +73 -0
- package/dist/models/GetLearnerExperiencePreview.d.ts +40 -0
- package/dist/models/GetLearnerExperiencePreview.js +54 -0
- package/dist/models/GetQuestion.d.ts +7 -0
- package/dist/models/GetQuestion.js +3 -0
- package/dist/models/LearnerExperienceVersion.d.ts +86 -0
- package/dist/models/LearnerExperienceVersion.js +84 -0
- package/dist/models/PostLearnerExperiencePreview.d.ts +40 -0
- package/dist/models/PostLearnerExperiencePreview.js +52 -0
- package/dist/models/PostQuestionImportCommit.d.ts +58 -0
- package/dist/models/PostQuestionImportCommit.js +66 -0
- package/dist/models/PostQuestionImportCommitItem.d.ts +72 -0
- package/dist/models/PostQuestionImportCommitItem.js +74 -0
- package/dist/models/PostQuestionImportCommitResponse.d.ts +51 -0
- package/dist/models/PostQuestionImportCommitResponse.js +63 -0
- package/dist/models/PostQuestionImportParseResponse.d.ts +71 -0
- package/dist/models/PostQuestionImportParseResponse.js +77 -0
- package/dist/models/PutLearnerExperienceDraft.d.ts +40 -0
- package/dist/models/PutLearnerExperienceDraft.js +52 -0
- package/dist/models/QuestionImportCommitResult.d.ts +53 -0
- package/dist/models/QuestionImportCommitResult.js +65 -0
- package/dist/models/QuestionImportDraft.d.ts +76 -0
- package/dist/models/QuestionImportDraft.js +76 -0
- package/dist/models/QuestionImportDuplicate.d.ts +66 -0
- package/dist/models/QuestionImportDuplicate.js +70 -0
- package/dist/models/QuestionImportPreviewImage.d.ts +84 -0
- package/dist/models/QuestionImportPreviewImage.js +84 -0
- package/dist/models/QuestionImportSource.d.ts +56 -0
- package/dist/models/QuestionImportSource.js +64 -0
- package/dist/models/QuestionImportSourceSummary.d.ts +50 -0
- package/dist/models/QuestionImportSourceSummary.js +60 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.js +19 -0
- package/docs/GetEffectiveLearnerExperience.md +40 -0
- package/docs/GetLearnerDashboard.md +38 -0
- package/docs/GetLearnerDashboardCourseList.md +36 -0
- package/docs/GetLearnerDashboardSummary.md +42 -0
- package/docs/GetLearnerExperience.md +42 -0
- package/docs/GetLearnerExperiencePreview.md +36 -0
- package/docs/GetQuestion.md +2 -0
- package/docs/LearnerExperienceApi.md +622 -0
- package/docs/LearnerExperienceVersion.md +48 -0
- package/docs/PostLearnerExperiencePreview.md +36 -0
- package/docs/PostQuestionImportCommit.md +42 -0
- package/docs/PostQuestionImportCommitItem.md +44 -0
- package/docs/PostQuestionImportCommitResponse.md +40 -0
- package/docs/PostQuestionImportParseResponse.md +46 -0
- package/docs/PutLearnerExperienceDraft.md +36 -0
- package/docs/QuestionImportApi.md +149 -0
- package/docs/QuestionImportCommitResult.md +38 -0
- package/docs/QuestionImportDraft.md +48 -0
- package/docs/QuestionImportDuplicate.md +42 -0
- package/docs/QuestionImportPreviewImage.md +48 -0
- package/docs/QuestionImportSource.md +42 -0
- package/docs/QuestionImportSourceSummary.md +40 -0
- package/package.json +1 -1
- package/src/apis/LearnerExperienceApi.ts +465 -0
- package/src/apis/QuestionImportApi.ts +162 -0
- package/src/apis/index.ts +2 -0
- package/src/models/GetEffectiveLearnerExperience.ts +105 -0
- package/src/models/GetLearnerDashboard.ts +106 -0
- package/src/models/GetLearnerDashboardCourseList.ts +83 -0
- package/src/models/GetLearnerDashboardSummary.ts +102 -0
- package/src/models/GetLearnerExperience.ts +121 -0
- package/src/models/GetLearnerExperiencePreview.ts +75 -0
- package/src/models/GetQuestion.ts +15 -0
- package/src/models/LearnerExperienceVersion.ts +140 -0
- package/src/models/PostLearnerExperiencePreview.ts +74 -0
- package/src/models/PostQuestionImportCommit.ts +116 -0
- package/src/models/PostQuestionImportCommitItem.ts +128 -0
- package/src/models/PostQuestionImportCommitResponse.ts +101 -0
- package/src/models/PostQuestionImportParseResponse.ts +142 -0
- package/src/models/PutLearnerExperienceDraft.ts +74 -0
- package/src/models/QuestionImportCommitResult.ts +95 -0
- package/src/models/QuestionImportDraft.ts +142 -0
- package/src/models/QuestionImportDuplicate.ts +112 -0
- package/src/models/QuestionImportPreviewImage.ts +140 -0
- package/src/models/QuestionImportSource.ts +101 -0
- package/src/models/QuestionImportSourceSummary.ts +92 -0
- package/src/models/index.ts +19 -0
|
@@ -0,0 +1,140 @@
|
|
|
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 LearnerExperienceVersion
|
|
20
|
+
*/
|
|
21
|
+
export interface LearnerExperienceVersion {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof LearnerExperienceVersion
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof LearnerExperienceVersion
|
|
32
|
+
*/
|
|
33
|
+
versionNumber: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {LearnerExperienceVersionStatusEnum}
|
|
37
|
+
* @memberof LearnerExperienceVersion
|
|
38
|
+
*/
|
|
39
|
+
status: LearnerExperienceVersionStatusEnum;
|
|
40
|
+
/**
|
|
41
|
+
* Validated learner-experience-v1 shell and dashboard document.
|
|
42
|
+
* @type {{ [key: string]: any; }}
|
|
43
|
+
* @memberof LearnerExperienceVersion
|
|
44
|
+
*/
|
|
45
|
+
designDocument: { [key: string]: any; };
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof LearnerExperienceVersion
|
|
50
|
+
*/
|
|
51
|
+
changeNotes?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof LearnerExperienceVersion
|
|
56
|
+
*/
|
|
57
|
+
createdAt: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof LearnerExperienceVersion
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof LearnerExperienceVersion
|
|
68
|
+
*/
|
|
69
|
+
publishedAt?: number | null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export const LearnerExperienceVersionStatusEnum = {
|
|
77
|
+
Draft: 'draft',
|
|
78
|
+
Published: 'published',
|
|
79
|
+
Archived: 'archived',
|
|
80
|
+
System: 'system'
|
|
81
|
+
} as const;
|
|
82
|
+
export type LearnerExperienceVersionStatusEnum = typeof LearnerExperienceVersionStatusEnum[keyof typeof LearnerExperienceVersionStatusEnum];
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the LearnerExperienceVersion interface.
|
|
87
|
+
*/
|
|
88
|
+
export function instanceOfLearnerExperienceVersion(value: object): value is LearnerExperienceVersion {
|
|
89
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
90
|
+
if (!('versionNumber' in value) || value['versionNumber'] === undefined) return false;
|
|
91
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
92
|
+
if (!('designDocument' in value) || value['designDocument'] === undefined) return false;
|
|
93
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
94
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function LearnerExperienceVersionFromJSON(json: any): LearnerExperienceVersion {
|
|
99
|
+
return LearnerExperienceVersionFromJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function LearnerExperienceVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): LearnerExperienceVersion {
|
|
103
|
+
if (json == null) {
|
|
104
|
+
return json;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'id': json['id'],
|
|
109
|
+
'versionNumber': json['version_number'],
|
|
110
|
+
'status': json['status'],
|
|
111
|
+
'designDocument': json['design_document'],
|
|
112
|
+
'changeNotes': json['change_notes'] == null ? undefined : json['change_notes'],
|
|
113
|
+
'createdAt': json['created_at'],
|
|
114
|
+
'updatedAt': json['updated_at'],
|
|
115
|
+
'publishedAt': json['published_at'] == null ? undefined : json['published_at'],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function LearnerExperienceVersionToJSON(json: any): LearnerExperienceVersion {
|
|
120
|
+
return LearnerExperienceVersionToJSONTyped(json, false);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function LearnerExperienceVersionToJSONTyped(value?: LearnerExperienceVersion | null, ignoreDiscriminator: boolean = false): any {
|
|
124
|
+
if (value == null) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'id': value['id'],
|
|
131
|
+
'version_number': value['versionNumber'],
|
|
132
|
+
'status': value['status'],
|
|
133
|
+
'design_document': value['designDocument'],
|
|
134
|
+
'change_notes': value['changeNotes'],
|
|
135
|
+
'created_at': value['createdAt'],
|
|
136
|
+
'updated_at': value['updatedAt'],
|
|
137
|
+
'published_at': value['publishedAt'],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
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 PostLearnerExperiencePreview
|
|
20
|
+
*/
|
|
21
|
+
export interface PostLearnerExperiencePreview {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {{ [key: string]: any; }}
|
|
25
|
+
* @memberof PostLearnerExperiencePreview
|
|
26
|
+
*/
|
|
27
|
+
designDocument: { [key: string]: any; };
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PostLearnerExperiencePreview
|
|
32
|
+
*/
|
|
33
|
+
changeNotes?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the PostLearnerExperiencePreview interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfPostLearnerExperiencePreview(value: object): value is PostLearnerExperiencePreview {
|
|
40
|
+
if (!('designDocument' in value) || value['designDocument'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function PostLearnerExperiencePreviewFromJSON(json: any): PostLearnerExperiencePreview {
|
|
45
|
+
return PostLearnerExperiencePreviewFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function PostLearnerExperiencePreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostLearnerExperiencePreview {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'designDocument': json['design_document'],
|
|
55
|
+
'changeNotes': json['change_notes'] == null ? undefined : json['change_notes'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PostLearnerExperiencePreviewToJSON(json: any): PostLearnerExperiencePreview {
|
|
60
|
+
return PostLearnerExperiencePreviewToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function PostLearnerExperiencePreviewToJSONTyped(value?: PostLearnerExperiencePreview | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'design_document': value['designDocument'],
|
|
71
|
+
'change_notes': value['changeNotes'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
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 { PostQuestionImportCommitItem } from './PostQuestionImportCommitItem';
|
|
17
|
+
import {
|
|
18
|
+
PostQuestionImportCommitItemFromJSON,
|
|
19
|
+
PostQuestionImportCommitItemFromJSONTyped,
|
|
20
|
+
PostQuestionImportCommitItemToJSON,
|
|
21
|
+
PostQuestionImportCommitItemToJSONTyped,
|
|
22
|
+
} from './PostQuestionImportCommitItem';
|
|
23
|
+
import type { QuestionImportPreviewImage } from './QuestionImportPreviewImage';
|
|
24
|
+
import {
|
|
25
|
+
QuestionImportPreviewImageFromJSON,
|
|
26
|
+
QuestionImportPreviewImageFromJSONTyped,
|
|
27
|
+
QuestionImportPreviewImageToJSON,
|
|
28
|
+
QuestionImportPreviewImageToJSONTyped,
|
|
29
|
+
} from './QuestionImportPreviewImage';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PostQuestionImportCommit
|
|
35
|
+
*/
|
|
36
|
+
export interface PostQuestionImportCommit {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof PostQuestionImportCommit
|
|
41
|
+
*/
|
|
42
|
+
importToken: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof PostQuestionImportCommit
|
|
47
|
+
*/
|
|
48
|
+
sourceLabel: string;
|
|
49
|
+
/**
|
|
50
|
+
* Tags applied to every created question in addition to per-question tags
|
|
51
|
+
* @type {Array<string>}
|
|
52
|
+
* @memberof PostQuestionImportCommit
|
|
53
|
+
*/
|
|
54
|
+
tags?: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<PostQuestionImportCommitItem>}
|
|
58
|
+
* @memberof PostQuestionImportCommit
|
|
59
|
+
*/
|
|
60
|
+
questions: Array<PostQuestionImportCommitItem>;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Array<QuestionImportPreviewImage>}
|
|
64
|
+
* @memberof PostQuestionImportCommit
|
|
65
|
+
*/
|
|
66
|
+
images: Array<QuestionImportPreviewImage>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the PostQuestionImportCommit interface.
|
|
71
|
+
*/
|
|
72
|
+
export function instanceOfPostQuestionImportCommit(value: object): value is PostQuestionImportCommit {
|
|
73
|
+
if (!('importToken' in value) || value['importToken'] === undefined) return false;
|
|
74
|
+
if (!('sourceLabel' in value) || value['sourceLabel'] === undefined) return false;
|
|
75
|
+
if (!('questions' in value) || value['questions'] === undefined) return false;
|
|
76
|
+
if (!('images' in value) || value['images'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function PostQuestionImportCommitFromJSON(json: any): PostQuestionImportCommit {
|
|
81
|
+
return PostQuestionImportCommitFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PostQuestionImportCommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommit {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'importToken': json['import_token'],
|
|
91
|
+
'sourceLabel': json['source_label'],
|
|
92
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
93
|
+
'questions': ((json['questions'] as Array<any>).map(PostQuestionImportCommitItemFromJSON)),
|
|
94
|
+
'images': ((json['images'] as Array<any>).map(QuestionImportPreviewImageFromJSON)),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function PostQuestionImportCommitToJSON(json: any): PostQuestionImportCommit {
|
|
99
|
+
return PostQuestionImportCommitToJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function PostQuestionImportCommitToJSONTyped(value?: PostQuestionImportCommit | null, ignoreDiscriminator: boolean = false): any {
|
|
103
|
+
if (value == null) {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'import_token': value['importToken'],
|
|
110
|
+
'source_label': value['sourceLabel'],
|
|
111
|
+
'tags': value['tags'],
|
|
112
|
+
'questions': ((value['questions'] as Array<any>).map(PostQuestionImportCommitItemToJSON)),
|
|
113
|
+
'images': ((value['images'] as Array<any>).map(QuestionImportPreviewImageToJSON)),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
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 { PostQuestion } from './PostQuestion';
|
|
17
|
+
import {
|
|
18
|
+
PostQuestionFromJSON,
|
|
19
|
+
PostQuestionFromJSONTyped,
|
|
20
|
+
PostQuestionToJSON,
|
|
21
|
+
PostQuestionToJSONTyped,
|
|
22
|
+
} from './PostQuestion';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PostQuestionImportCommitItem
|
|
28
|
+
*/
|
|
29
|
+
export interface PostQuestionImportCommitItem {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PostQuestionImportCommitItem
|
|
34
|
+
*/
|
|
35
|
+
draftId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Create a separate question, create a new version of the matched question, or skip the draft
|
|
38
|
+
* @type {PostQuestionImportCommitItemActionEnum}
|
|
39
|
+
* @memberof PostQuestionImportCommitItem
|
|
40
|
+
*/
|
|
41
|
+
action: PostQuestionImportCommitItemActionEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Matched question to version; required only when action is create_version and must match the signed parse result
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof PostQuestionImportCommitItem
|
|
46
|
+
*/
|
|
47
|
+
targetQuestionId?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PostQuestionImportCommitItem
|
|
52
|
+
*/
|
|
53
|
+
sourceKey?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof PostQuestionImportCommitItem
|
|
58
|
+
*/
|
|
59
|
+
sourceLocation?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {PostQuestion}
|
|
63
|
+
* @memberof PostQuestionImportCommitItem
|
|
64
|
+
*/
|
|
65
|
+
question: PostQuestion;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export const PostQuestionImportCommitItemActionEnum = {
|
|
73
|
+
Create: 'create',
|
|
74
|
+
CreateVersion: 'create_version',
|
|
75
|
+
Skip: 'skip'
|
|
76
|
+
} as const;
|
|
77
|
+
export type PostQuestionImportCommitItemActionEnum = typeof PostQuestionImportCommitItemActionEnum[keyof typeof PostQuestionImportCommitItemActionEnum];
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the PostQuestionImportCommitItem interface.
|
|
82
|
+
*/
|
|
83
|
+
export function instanceOfPostQuestionImportCommitItem(value: object): value is PostQuestionImportCommitItem {
|
|
84
|
+
if (!('draftId' in value) || value['draftId'] === undefined) return false;
|
|
85
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
86
|
+
if (!('question' in value) || value['question'] === undefined) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function PostQuestionImportCommitItemFromJSON(json: any): PostQuestionImportCommitItem {
|
|
91
|
+
return PostQuestionImportCommitItemFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function PostQuestionImportCommitItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommitItem {
|
|
95
|
+
if (json == null) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'draftId': json['draft_id'],
|
|
101
|
+
'action': json['action'],
|
|
102
|
+
'targetQuestionId': json['target_question_id'] == null ? undefined : json['target_question_id'],
|
|
103
|
+
'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
|
|
104
|
+
'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
|
|
105
|
+
'question': PostQuestionFromJSON(json['question']),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function PostQuestionImportCommitItemToJSON(json: any): PostQuestionImportCommitItem {
|
|
110
|
+
return PostQuestionImportCommitItemToJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function PostQuestionImportCommitItemToJSONTyped(value?: PostQuestionImportCommitItem | null, ignoreDiscriminator: boolean = false): any {
|
|
114
|
+
if (value == null) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'draft_id': value['draftId'],
|
|
121
|
+
'action': value['action'],
|
|
122
|
+
'target_question_id': value['targetQuestionId'],
|
|
123
|
+
'source_key': value['sourceKey'],
|
|
124
|
+
'source_location': value['sourceLocation'],
|
|
125
|
+
'question': PostQuestionToJSON(value['question']),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { QuestionImportCommitResult } from './QuestionImportCommitResult';
|
|
17
|
+
import {
|
|
18
|
+
QuestionImportCommitResultFromJSON,
|
|
19
|
+
QuestionImportCommitResultFromJSONTyped,
|
|
20
|
+
QuestionImportCommitResultToJSON,
|
|
21
|
+
QuestionImportCommitResultToJSONTyped,
|
|
22
|
+
} from './QuestionImportCommitResult';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PostQuestionImportCommitResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PostQuestionImportCommitResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof PostQuestionImportCommitResponse
|
|
34
|
+
*/
|
|
35
|
+
createdCount: number;
|
|
36
|
+
/**
|
|
37
|
+
* Number of created rows that are new versions of existing questions
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PostQuestionImportCommitResponse
|
|
40
|
+
*/
|
|
41
|
+
versionedCount: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PostQuestionImportCommitResponse
|
|
46
|
+
*/
|
|
47
|
+
skippedCount: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Array<QuestionImportCommitResult>}
|
|
51
|
+
* @memberof PostQuestionImportCommitResponse
|
|
52
|
+
*/
|
|
53
|
+
items: Array<QuestionImportCommitResult>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PostQuestionImportCommitResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPostQuestionImportCommitResponse(value: object): value is PostQuestionImportCommitResponse {
|
|
60
|
+
if (!('createdCount' in value) || value['createdCount'] === undefined) return false;
|
|
61
|
+
if (!('versionedCount' in value) || value['versionedCount'] === undefined) return false;
|
|
62
|
+
if (!('skippedCount' in value) || value['skippedCount'] === undefined) return false;
|
|
63
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function PostQuestionImportCommitResponseFromJSON(json: any): PostQuestionImportCommitResponse {
|
|
68
|
+
return PostQuestionImportCommitResponseFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PostQuestionImportCommitResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommitResponse {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'createdCount': json['created_count'],
|
|
78
|
+
'versionedCount': json['versioned_count'],
|
|
79
|
+
'skippedCount': json['skipped_count'],
|
|
80
|
+
'items': ((json['items'] as Array<any>).map(QuestionImportCommitResultFromJSON)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PostQuestionImportCommitResponseToJSON(json: any): PostQuestionImportCommitResponse {
|
|
85
|
+
return PostQuestionImportCommitResponseToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PostQuestionImportCommitResponseToJSONTyped(value?: PostQuestionImportCommitResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'created_count': value['createdCount'],
|
|
96
|
+
'versioned_count': value['versionedCount'],
|
|
97
|
+
'skipped_count': value['skippedCount'],
|
|
98
|
+
'items': ((value['items'] as Array<any>).map(QuestionImportCommitResultToJSON)),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
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 { QuestionImportDraft } from './QuestionImportDraft';
|
|
17
|
+
import {
|
|
18
|
+
QuestionImportDraftFromJSON,
|
|
19
|
+
QuestionImportDraftFromJSONTyped,
|
|
20
|
+
QuestionImportDraftToJSON,
|
|
21
|
+
QuestionImportDraftToJSONTyped,
|
|
22
|
+
} from './QuestionImportDraft';
|
|
23
|
+
import type { QuestionImportSource } from './QuestionImportSource';
|
|
24
|
+
import {
|
|
25
|
+
QuestionImportSourceFromJSON,
|
|
26
|
+
QuestionImportSourceFromJSONTyped,
|
|
27
|
+
QuestionImportSourceToJSON,
|
|
28
|
+
QuestionImportSourceToJSONTyped,
|
|
29
|
+
} from './QuestionImportSource';
|
|
30
|
+
import type { QuestionImportPreviewImage } from './QuestionImportPreviewImage';
|
|
31
|
+
import {
|
|
32
|
+
QuestionImportPreviewImageFromJSON,
|
|
33
|
+
QuestionImportPreviewImageFromJSONTyped,
|
|
34
|
+
QuestionImportPreviewImageToJSON,
|
|
35
|
+
QuestionImportPreviewImageToJSONTyped,
|
|
36
|
+
} from './QuestionImportPreviewImage';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface PostQuestionImportParseResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface PostQuestionImportParseResponse {
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof PostQuestionImportParseResponse
|
|
48
|
+
*/
|
|
49
|
+
importToken: string;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Date}
|
|
53
|
+
* @memberof PostQuestionImportParseResponse
|
|
54
|
+
*/
|
|
55
|
+
expiresAt: Date;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {QuestionImportSource}
|
|
59
|
+
* @memberof PostQuestionImportParseResponse
|
|
60
|
+
*/
|
|
61
|
+
source: QuestionImportSource;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {Array<QuestionImportDraft>}
|
|
65
|
+
* @memberof PostQuestionImportParseResponse
|
|
66
|
+
*/
|
|
67
|
+
questions: Array<QuestionImportDraft>;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {Array<QuestionImportPreviewImage>}
|
|
71
|
+
* @memberof PostQuestionImportParseResponse
|
|
72
|
+
*/
|
|
73
|
+
images: Array<QuestionImportPreviewImage>;
|
|
74
|
+
/**
|
|
75
|
+
* Parser adapter and strategy used for the uploaded document
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof PostQuestionImportParseResponse
|
|
78
|
+
*/
|
|
79
|
+
parser: string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {Array<string>}
|
|
83
|
+
* @memberof PostQuestionImportParseResponse
|
|
84
|
+
*/
|
|
85
|
+
warnings: Array<string>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Check if a given object implements the PostQuestionImportParseResponse interface.
|
|
90
|
+
*/
|
|
91
|
+
export function instanceOfPostQuestionImportParseResponse(value: object): value is PostQuestionImportParseResponse {
|
|
92
|
+
if (!('importToken' in value) || value['importToken'] === undefined) return false;
|
|
93
|
+
if (!('expiresAt' in value) || value['expiresAt'] === undefined) return false;
|
|
94
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
95
|
+
if (!('questions' in value) || value['questions'] === undefined) return false;
|
|
96
|
+
if (!('images' in value) || value['images'] === undefined) return false;
|
|
97
|
+
if (!('parser' in value) || value['parser'] === undefined) return false;
|
|
98
|
+
if (!('warnings' in value) || value['warnings'] === undefined) return false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function PostQuestionImportParseResponseFromJSON(json: any): PostQuestionImportParseResponse {
|
|
103
|
+
return PostQuestionImportParseResponseFromJSONTyped(json, false);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function PostQuestionImportParseResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportParseResponse {
|
|
107
|
+
if (json == null) {
|
|
108
|
+
return json;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'importToken': json['import_token'],
|
|
113
|
+
'expiresAt': (new Date(json['expires_at'])),
|
|
114
|
+
'source': QuestionImportSourceFromJSON(json['source']),
|
|
115
|
+
'questions': ((json['questions'] as Array<any>).map(QuestionImportDraftFromJSON)),
|
|
116
|
+
'images': ((json['images'] as Array<any>).map(QuestionImportPreviewImageFromJSON)),
|
|
117
|
+
'parser': json['parser'],
|
|
118
|
+
'warnings': json['warnings'],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function PostQuestionImportParseResponseToJSON(json: any): PostQuestionImportParseResponse {
|
|
123
|
+
return PostQuestionImportParseResponseToJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function PostQuestionImportParseResponseToJSONTyped(value?: PostQuestionImportParseResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
127
|
+
if (value == null) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
|
|
133
|
+
'import_token': value['importToken'],
|
|
134
|
+
'expires_at': value['expiresAt'].toISOString(),
|
|
135
|
+
'source': QuestionImportSourceToJSON(value['source']),
|
|
136
|
+
'questions': ((value['questions'] as Array<any>).map(QuestionImportDraftToJSON)),
|
|
137
|
+
'images': ((value['images'] as Array<any>).map(QuestionImportPreviewImageToJSON)),
|
|
138
|
+
'parser': value['parser'],
|
|
139
|
+
'warnings': value['warnings'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|