@easyedu/js-lsm-api 1.111.0 → 1.113.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 +22 -0
- package/README.md +16 -3
- package/dist/apis/QuestionApi.d.ts +17 -2
- package/dist/apis/QuestionApi.js +41 -2
- package/dist/apis/QuestionImportApi.d.ts +51 -0
- package/dist/apis/QuestionImportApi.js +135 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/QuestionApi.d.ts +17 -2
- package/dist/esm/apis/QuestionApi.js +41 -2
- package/dist/esm/apis/QuestionImportApi.d.ts +51 -0
- package/dist/esm/apis/QuestionImportApi.js +131 -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 +20 -1
- package/dist/esm/models/GetQuestion.js +8 -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/PutQuestion.d.ts +6 -0
- package/dist/esm/models/PutQuestion.js +2 -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 +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/GetQuestion.d.ts +20 -1
- package/dist/models/GetQuestion.js +8 -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/PutQuestion.d.ts +6 -0
- package/dist/models/PutQuestion.js +2 -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 +10 -0
- package/dist/models/index.js +10 -0
- package/docs/GetQuestion.md +6 -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/PutQuestion.md +2 -0
- package/docs/QuestionApi.md +70 -2
- 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/QuestionApi.ts +51 -2
- package/src/apis/QuestionImportApi.ts +162 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetQuestion.ts +32 -1
- 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/PutQuestion.ts +8 -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 +10 -0
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { PostQuestionImportCommitToJSON, } from '../models/PostQuestionImportCommit';
|
|
25
|
+
import { PostQuestionImportCommitResponseFromJSON, } from '../models/PostQuestionImportCommitResponse';
|
|
26
|
+
import { PostQuestionImportParseResponseFromJSON, } from '../models/PostQuestionImportParseResponse';
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export class QuestionImportApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for postQuestionImportCommit without sending the request
|
|
33
|
+
*/
|
|
34
|
+
postQuestionImportCommitRequestOpts(requestParameters) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (requestParameters['postQuestionImportCommit'] == null) {
|
|
37
|
+
throw new runtime.RequiredError('postQuestionImportCommit', 'Required parameter "postQuestionImportCommit" was null or undefined when calling postQuestionImportCommit().');
|
|
38
|
+
}
|
|
39
|
+
const queryParameters = {};
|
|
40
|
+
const headerParameters = {};
|
|
41
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
42
|
+
let urlPath = `/question-imports/commit`;
|
|
43
|
+
return {
|
|
44
|
+
path: urlPath,
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: headerParameters,
|
|
47
|
+
query: queryParameters,
|
|
48
|
+
body: PostQuestionImportCommitToJSON(requestParameters['postQuestionImportCommit']),
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Validate and atomically create, version, or skip approved question drafts
|
|
54
|
+
*/
|
|
55
|
+
postQuestionImportCommitRaw(requestParameters, initOverrides) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const requestOptions = yield this.postQuestionImportCommitRequestOpts(requestParameters);
|
|
58
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostQuestionImportCommitResponseFromJSON(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Validate and atomically create, version, or skip approved question drafts
|
|
64
|
+
*/
|
|
65
|
+
postQuestionImportCommit(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.postQuestionImportCommitRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Creates request options for postQuestionImportParse without sending the request
|
|
73
|
+
*/
|
|
74
|
+
postQuestionImportParseRequestOpts(requestParameters) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['file'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postQuestionImportParse().');
|
|
78
|
+
}
|
|
79
|
+
const queryParameters = {};
|
|
80
|
+
const headerParameters = {};
|
|
81
|
+
const consumes = [
|
|
82
|
+
{ contentType: 'multipart/form-data' },
|
|
83
|
+
];
|
|
84
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
85
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
86
|
+
let formParams;
|
|
87
|
+
let useForm = false;
|
|
88
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
89
|
+
useForm = canConsumeForm;
|
|
90
|
+
if (useForm) {
|
|
91
|
+
formParams = new FormData();
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
formParams = new URLSearchParams();
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters['file'] != null) {
|
|
97
|
+
formParams.append('file', requestParameters['file']);
|
|
98
|
+
}
|
|
99
|
+
if (requestParameters['sourceLabel'] != null) {
|
|
100
|
+
formParams.append('source_label', requestParameters['sourceLabel']);
|
|
101
|
+
}
|
|
102
|
+
let urlPath = `/question-imports/parse`;
|
|
103
|
+
return {
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'POST',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
body: formParams,
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Parse a question document into stateless review drafts
|
|
114
|
+
*/
|
|
115
|
+
postQuestionImportParseRaw(requestParameters, initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const requestOptions = yield this.postQuestionImportParseRequestOpts(requestParameters);
|
|
118
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
119
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostQuestionImportParseResponseFromJSON(jsonValue));
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Parse a question document into stateless review drafts
|
|
124
|
+
*/
|
|
125
|
+
postQuestionImportParse(requestParameters, initOverrides) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const response = yield this.postQuestionImportParseRaw(requestParameters, initOverrides);
|
|
128
|
+
return yield response.value();
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './PlayerApi';
|
|
|
15
15
|
export * from './PortalApi';
|
|
16
16
|
export * from './PortalSublicenseApi';
|
|
17
17
|
export * from './QuestionApi';
|
|
18
|
+
export * from './QuestionImportApi';
|
|
18
19
|
export * from './ReportingApi';
|
|
19
20
|
export * from './RichTextApi';
|
|
20
21
|
export * from './RoleApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export * from './PlayerApi';
|
|
|
17
17
|
export * from './PortalApi';
|
|
18
18
|
export * from './PortalSublicenseApi';
|
|
19
19
|
export * from './QuestionApi';
|
|
20
|
+
export * from './QuestionImportApi';
|
|
20
21
|
export * from './ReportingApi';
|
|
21
22
|
export * from './RichTextApi';
|
|
22
23
|
export * from './RoleApi';
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { RichTextDocument } from './RichTextDocument';
|
|
13
13
|
import type { ContentLibraryTag } from './ContentLibraryTag';
|
|
14
14
|
import type { GetQuestionAnswerChoicesInner } from './GetQuestionAnswerChoicesInner';
|
|
15
|
+
import type { QuestionImportSourceSummary } from './QuestionImportSourceSummary';
|
|
15
16
|
import type { GetQuestionQuizzesInner } from './GetQuestionQuizzesInner';
|
|
16
17
|
/**
|
|
17
18
|
*
|
|
@@ -73,6 +74,18 @@ export interface GetQuestion {
|
|
|
73
74
|
* @memberof GetQuestion
|
|
74
75
|
*/
|
|
75
76
|
readonly versionNumber: number;
|
|
77
|
+
/**
|
|
78
|
+
* Whether this is the current editable version in the question history
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
* @memberof GetQuestion
|
|
81
|
+
*/
|
|
82
|
+
readonly isLatestVersion: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Optional note describing why this version was created
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof GetQuestion
|
|
87
|
+
*/
|
|
88
|
+
versionCreatedReason?: string;
|
|
76
89
|
/**
|
|
77
90
|
* When the question was created
|
|
78
91
|
* @type {Date}
|
|
@@ -103,6 +116,12 @@ export interface GetQuestion {
|
|
|
103
116
|
* @memberof GetQuestion
|
|
104
117
|
*/
|
|
105
118
|
readonly quizzes?: Array<GetQuestionQuizzesInner>;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @type {QuestionImportSourceSummary}
|
|
122
|
+
* @memberof GetQuestion
|
|
123
|
+
*/
|
|
124
|
+
importSource?: QuestionImportSourceSummary;
|
|
106
125
|
}
|
|
107
126
|
/**
|
|
108
127
|
* @export
|
|
@@ -123,4 +142,4 @@ export declare function instanceOfGetQuestion(value: object): value is GetQuesti
|
|
|
123
142
|
export declare function GetQuestionFromJSON(json: any): GetQuestion;
|
|
124
143
|
export declare function GetQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuestion;
|
|
125
144
|
export declare function GetQuestionToJSON(json: any): GetQuestion;
|
|
126
|
-
export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'version_number' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count' | 'quizzes'> | null, ignoreDiscriminator?: boolean): any;
|
|
145
|
+
export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'version_number' | 'is_latest_version' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count' | 'quizzes'> | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import { RichTextDocumentFromJSON, RichTextDocumentToJSON, } from './RichTextDocument';
|
|
15
15
|
import { ContentLibraryTagFromJSON, ContentLibraryTagToJSON, } from './ContentLibraryTag';
|
|
16
16
|
import { GetQuestionAnswerChoicesInnerFromJSON, GetQuestionAnswerChoicesInnerToJSON, } from './GetQuestionAnswerChoicesInner';
|
|
17
|
+
import { QuestionImportSourceSummaryFromJSON, QuestionImportSourceSummaryToJSON, } from './QuestionImportSourceSummary';
|
|
17
18
|
import { GetQuestionQuizzesInnerFromJSON, } from './GetQuestionQuizzesInner';
|
|
18
19
|
/**
|
|
19
20
|
* @export
|
|
@@ -38,6 +39,8 @@ export function instanceOfGetQuestion(value) {
|
|
|
38
39
|
return false;
|
|
39
40
|
if (!('versionNumber' in value) || value['versionNumber'] === undefined)
|
|
40
41
|
return false;
|
|
42
|
+
if (!('isLatestVersion' in value) || value['isLatestVersion'] === undefined)
|
|
43
|
+
return false;
|
|
41
44
|
if (!('createdDate' in value) || value['createdDate'] === undefined)
|
|
42
45
|
return false;
|
|
43
46
|
if (!('updatedDate' in value) || value['updatedDate'] === undefined)
|
|
@@ -61,11 +64,14 @@ export function GetQuestionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
64
|
'tags': json['tags'] == null ? undefined : (json['tags'].map(ContentLibraryTagFromJSON)),
|
|
62
65
|
'version': json['version'] == null ? undefined : json['version'],
|
|
63
66
|
'versionNumber': json['version_number'],
|
|
67
|
+
'isLatestVersion': json['is_latest_version'],
|
|
68
|
+
'versionCreatedReason': json['version_created_reason'] == null ? undefined : json['version_created_reason'],
|
|
64
69
|
'createdDate': (new Date(json['created_date'])),
|
|
65
70
|
'updatedDate': (new Date(json['updated_date'])),
|
|
66
71
|
'createdBy': json['created_by'] == null ? undefined : json['created_by'],
|
|
67
72
|
'quizCount': json['quiz_count'] == null ? undefined : json['quiz_count'],
|
|
68
73
|
'quizzes': json['quizzes'] == null ? undefined : (json['quizzes'].map(GetQuestionQuizzesInnerFromJSON)),
|
|
74
|
+
'importSource': json['import_source'] == null ? undefined : QuestionImportSourceSummaryFromJSON(json['import_source']),
|
|
69
75
|
};
|
|
70
76
|
}
|
|
71
77
|
export function GetQuestionToJSON(json) {
|
|
@@ -83,5 +89,7 @@ export function GetQuestionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
83
89
|
'explanation': RichTextDocumentToJSON(value['explanation']),
|
|
84
90
|
'tags': value['tags'] == null ? undefined : (value['tags'].map(ContentLibraryTagToJSON)),
|
|
85
91
|
'version': value['version'],
|
|
92
|
+
'version_created_reason': value['versionCreatedReason'],
|
|
93
|
+
'import_source': QuestionImportSourceSummaryToJSON(value['importSource']),
|
|
86
94
|
};
|
|
87
95
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import type { PostQuestionImportCommitItem } from './PostQuestionImportCommitItem';
|
|
13
|
+
import type { QuestionImportPreviewImage } from './QuestionImportPreviewImage';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface PostQuestionImportCommit
|
|
18
|
+
*/
|
|
19
|
+
export interface PostQuestionImportCommit {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof PostQuestionImportCommit
|
|
24
|
+
*/
|
|
25
|
+
importToken: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof PostQuestionImportCommit
|
|
30
|
+
*/
|
|
31
|
+
sourceLabel: string;
|
|
32
|
+
/**
|
|
33
|
+
* Tags applied to every created question in addition to per-question tags
|
|
34
|
+
* @type {Array<string>}
|
|
35
|
+
* @memberof PostQuestionImportCommit
|
|
36
|
+
*/
|
|
37
|
+
tags?: Array<string>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Array<PostQuestionImportCommitItem>}
|
|
41
|
+
* @memberof PostQuestionImportCommit
|
|
42
|
+
*/
|
|
43
|
+
questions: Array<PostQuestionImportCommitItem>;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {Array<QuestionImportPreviewImage>}
|
|
47
|
+
* @memberof PostQuestionImportCommit
|
|
48
|
+
*/
|
|
49
|
+
images: Array<QuestionImportPreviewImage>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PostQuestionImportCommit interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfPostQuestionImportCommit(value: object): value is PostQuestionImportCommit;
|
|
55
|
+
export declare function PostQuestionImportCommitFromJSON(json: any): PostQuestionImportCommit;
|
|
56
|
+
export declare function PostQuestionImportCommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommit;
|
|
57
|
+
export declare function PostQuestionImportCommitToJSON(json: any): PostQuestionImportCommit;
|
|
58
|
+
export declare function PostQuestionImportCommitToJSONTyped(value?: PostQuestionImportCommit | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
import { PostQuestionImportCommitItemFromJSON, PostQuestionImportCommitItemToJSON, } from './PostQuestionImportCommitItem';
|
|
15
|
+
import { QuestionImportPreviewImageFromJSON, QuestionImportPreviewImageToJSON, } from './QuestionImportPreviewImage';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the PostQuestionImportCommit interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfPostQuestionImportCommit(value) {
|
|
20
|
+
if (!('importToken' in value) || value['importToken'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('sourceLabel' in value) || value['sourceLabel'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('questions' in value) || value['questions'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('images' in value) || value['images'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function PostQuestionImportCommitFromJSON(json) {
|
|
31
|
+
return PostQuestionImportCommitFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function PostQuestionImportCommitFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'importToken': json['import_token'],
|
|
39
|
+
'sourceLabel': json['source_label'],
|
|
40
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
41
|
+
'questions': (json['questions'].map(PostQuestionImportCommitItemFromJSON)),
|
|
42
|
+
'images': (json['images'].map(QuestionImportPreviewImageFromJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function PostQuestionImportCommitToJSON(json) {
|
|
46
|
+
return PostQuestionImportCommitToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function PostQuestionImportCommitToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'import_token': value['importToken'],
|
|
54
|
+
'source_label': value['sourceLabel'],
|
|
55
|
+
'tags': value['tags'],
|
|
56
|
+
'questions': (value['questions'].map(PostQuestionImportCommitItemToJSON)),
|
|
57
|
+
'images': (value['images'].map(QuestionImportPreviewImageToJSON)),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
import type { PostQuestion } from './PostQuestion';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PostQuestionImportCommitItem
|
|
17
|
+
*/
|
|
18
|
+
export interface PostQuestionImportCommitItem {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof PostQuestionImportCommitItem
|
|
23
|
+
*/
|
|
24
|
+
draftId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Create a separate question, create a new version of the matched question, or skip the draft
|
|
27
|
+
* @type {PostQuestionImportCommitItemActionEnum}
|
|
28
|
+
* @memberof PostQuestionImportCommitItem
|
|
29
|
+
*/
|
|
30
|
+
action: PostQuestionImportCommitItemActionEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Matched question to version; required only when action is create_version and must match the signed parse result
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof PostQuestionImportCommitItem
|
|
35
|
+
*/
|
|
36
|
+
targetQuestionId?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof PostQuestionImportCommitItem
|
|
41
|
+
*/
|
|
42
|
+
sourceKey?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof PostQuestionImportCommitItem
|
|
47
|
+
*/
|
|
48
|
+
sourceLocation?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {PostQuestion}
|
|
52
|
+
* @memberof PostQuestionImportCommitItem
|
|
53
|
+
*/
|
|
54
|
+
question: PostQuestion;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @export
|
|
58
|
+
*/
|
|
59
|
+
export declare const PostQuestionImportCommitItemActionEnum: {
|
|
60
|
+
readonly Create: "create";
|
|
61
|
+
readonly CreateVersion: "create_version";
|
|
62
|
+
readonly Skip: "skip";
|
|
63
|
+
};
|
|
64
|
+
export type PostQuestionImportCommitItemActionEnum = typeof PostQuestionImportCommitItemActionEnum[keyof typeof PostQuestionImportCommitItemActionEnum];
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the PostQuestionImportCommitItem interface.
|
|
67
|
+
*/
|
|
68
|
+
export declare function instanceOfPostQuestionImportCommitItem(value: object): value is PostQuestionImportCommitItem;
|
|
69
|
+
export declare function PostQuestionImportCommitItemFromJSON(json: any): PostQuestionImportCommitItem;
|
|
70
|
+
export declare function PostQuestionImportCommitItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommitItem;
|
|
71
|
+
export declare function PostQuestionImportCommitItemToJSON(json: any): PostQuestionImportCommitItem;
|
|
72
|
+
export declare function PostQuestionImportCommitItemToJSONTyped(value?: PostQuestionImportCommitItem | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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
|
+
import { PostQuestionFromJSON, PostQuestionToJSON, } from './PostQuestion';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const PostQuestionImportCommitItemActionEnum = {
|
|
19
|
+
Create: 'create',
|
|
20
|
+
CreateVersion: 'create_version',
|
|
21
|
+
Skip: 'skip'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the PostQuestionImportCommitItem interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfPostQuestionImportCommitItem(value) {
|
|
27
|
+
if (!('draftId' in value) || value['draftId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('question' in value) || value['question'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function PostQuestionImportCommitItemFromJSON(json) {
|
|
36
|
+
return PostQuestionImportCommitItemFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function PostQuestionImportCommitItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'draftId': json['draft_id'],
|
|
44
|
+
'action': json['action'],
|
|
45
|
+
'targetQuestionId': json['target_question_id'] == null ? undefined : json['target_question_id'],
|
|
46
|
+
'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
|
|
47
|
+
'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
|
|
48
|
+
'question': PostQuestionFromJSON(json['question']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export function PostQuestionImportCommitItemToJSON(json) {
|
|
52
|
+
return PostQuestionImportCommitItemToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
export function PostQuestionImportCommitItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'draft_id': value['draftId'],
|
|
60
|
+
'action': value['action'],
|
|
61
|
+
'target_question_id': value['targetQuestionId'],
|
|
62
|
+
'source_key': value['sourceKey'],
|
|
63
|
+
'source_location': value['sourceLocation'],
|
|
64
|
+
'question': PostQuestionToJSON(value['question']),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
import type { QuestionImportCommitResult } from './QuestionImportCommitResult';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PostQuestionImportCommitResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface PostQuestionImportCommitResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof PostQuestionImportCommitResponse
|
|
23
|
+
*/
|
|
24
|
+
createdCount: number;
|
|
25
|
+
/**
|
|
26
|
+
* Number of created rows that are new versions of existing questions
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof PostQuestionImportCommitResponse
|
|
29
|
+
*/
|
|
30
|
+
versionedCount: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof PostQuestionImportCommitResponse
|
|
35
|
+
*/
|
|
36
|
+
skippedCount: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<QuestionImportCommitResult>}
|
|
40
|
+
* @memberof PostQuestionImportCommitResponse
|
|
41
|
+
*/
|
|
42
|
+
items: Array<QuestionImportCommitResult>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the PostQuestionImportCommitResponse interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfPostQuestionImportCommitResponse(value: object): value is PostQuestionImportCommitResponse;
|
|
48
|
+
export declare function PostQuestionImportCommitResponseFromJSON(json: any): PostQuestionImportCommitResponse;
|
|
49
|
+
export declare function PostQuestionImportCommitResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommitResponse;
|
|
50
|
+
export declare function PostQuestionImportCommitResponseToJSON(json: any): PostQuestionImportCommitResponse;
|
|
51
|
+
export declare function PostQuestionImportCommitResponseToJSONTyped(value?: PostQuestionImportCommitResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { QuestionImportCommitResultFromJSON, QuestionImportCommitResultToJSON, } from './QuestionImportCommitResult';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PostQuestionImportCommitResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPostQuestionImportCommitResponse(value) {
|
|
19
|
+
if (!('createdCount' in value) || value['createdCount'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('versionedCount' in value) || value['versionedCount'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('skippedCount' in value) || value['skippedCount'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function PostQuestionImportCommitResponseFromJSON(json) {
|
|
30
|
+
return PostQuestionImportCommitResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function PostQuestionImportCommitResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'createdCount': json['created_count'],
|
|
38
|
+
'versionedCount': json['versioned_count'],
|
|
39
|
+
'skippedCount': json['skipped_count'],
|
|
40
|
+
'items': (json['items'].map(QuestionImportCommitResultFromJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function PostQuestionImportCommitResponseToJSON(json) {
|
|
44
|
+
return PostQuestionImportCommitResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function PostQuestionImportCommitResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'created_count': value['createdCount'],
|
|
52
|
+
'versioned_count': value['versionedCount'],
|
|
53
|
+
'skipped_count': value['skippedCount'],
|
|
54
|
+
'items': (value['items'].map(QuestionImportCommitResultToJSON)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
import type { QuestionImportDraft } from './QuestionImportDraft';
|
|
13
|
+
import type { QuestionImportSource } from './QuestionImportSource';
|
|
14
|
+
import type { QuestionImportPreviewImage } from './QuestionImportPreviewImage';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface PostQuestionImportParseResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface PostQuestionImportParseResponse {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof PostQuestionImportParseResponse
|
|
25
|
+
*/
|
|
26
|
+
importToken: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Date}
|
|
30
|
+
* @memberof PostQuestionImportParseResponse
|
|
31
|
+
*/
|
|
32
|
+
expiresAt: Date;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {QuestionImportSource}
|
|
36
|
+
* @memberof PostQuestionImportParseResponse
|
|
37
|
+
*/
|
|
38
|
+
source: QuestionImportSource;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {Array<QuestionImportDraft>}
|
|
42
|
+
* @memberof PostQuestionImportParseResponse
|
|
43
|
+
*/
|
|
44
|
+
questions: Array<QuestionImportDraft>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {Array<QuestionImportPreviewImage>}
|
|
48
|
+
* @memberof PostQuestionImportParseResponse
|
|
49
|
+
*/
|
|
50
|
+
images: Array<QuestionImportPreviewImage>;
|
|
51
|
+
/**
|
|
52
|
+
* Parser adapter and strategy used for the uploaded document
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof PostQuestionImportParseResponse
|
|
55
|
+
*/
|
|
56
|
+
parser: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {Array<string>}
|
|
60
|
+
* @memberof PostQuestionImportParseResponse
|
|
61
|
+
*/
|
|
62
|
+
warnings: Array<string>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the PostQuestionImportParseResponse interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfPostQuestionImportParseResponse(value: object): value is PostQuestionImportParseResponse;
|
|
68
|
+
export declare function PostQuestionImportParseResponseFromJSON(json: any): PostQuestionImportParseResponse;
|
|
69
|
+
export declare function PostQuestionImportParseResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportParseResponse;
|
|
70
|
+
export declare function PostQuestionImportParseResponseToJSON(json: any): PostQuestionImportParseResponse;
|
|
71
|
+
export declare function PostQuestionImportParseResponseToJSONTyped(value?: PostQuestionImportParseResponse | null, ignoreDiscriminator?: boolean): any;
|