@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,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPostQuestionImportCommitResponse = instanceOfPostQuestionImportCommitResponse;
|
|
17
|
+
exports.PostQuestionImportCommitResponseFromJSON = PostQuestionImportCommitResponseFromJSON;
|
|
18
|
+
exports.PostQuestionImportCommitResponseFromJSONTyped = PostQuestionImportCommitResponseFromJSONTyped;
|
|
19
|
+
exports.PostQuestionImportCommitResponseToJSON = PostQuestionImportCommitResponseToJSON;
|
|
20
|
+
exports.PostQuestionImportCommitResponseToJSONTyped = PostQuestionImportCommitResponseToJSONTyped;
|
|
21
|
+
const QuestionImportCommitResult_1 = require("./QuestionImportCommitResult");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the PostQuestionImportCommitResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfPostQuestionImportCommitResponse(value) {
|
|
26
|
+
if (!('createdCount' in value) || value['createdCount'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('versionedCount' in value) || value['versionedCount'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('skippedCount' in value) || value['skippedCount'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function PostQuestionImportCommitResponseFromJSON(json) {
|
|
37
|
+
return PostQuestionImportCommitResponseFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function PostQuestionImportCommitResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'createdCount': json['created_count'],
|
|
45
|
+
'versionedCount': json['versioned_count'],
|
|
46
|
+
'skippedCount': json['skipped_count'],
|
|
47
|
+
'items': (json['items'].map(QuestionImportCommitResult_1.QuestionImportCommitResultFromJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function PostQuestionImportCommitResponseToJSON(json) {
|
|
51
|
+
return PostQuestionImportCommitResponseToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function PostQuestionImportCommitResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'created_count': value['createdCount'],
|
|
59
|
+
'versioned_count': value['versionedCount'],
|
|
60
|
+
'skipped_count': value['skippedCount'],
|
|
61
|
+
'items': (value['items'].map(QuestionImportCommitResult_1.QuestionImportCommitResultToJSON)),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPostQuestionImportParseResponse = instanceOfPostQuestionImportParseResponse;
|
|
17
|
+
exports.PostQuestionImportParseResponseFromJSON = PostQuestionImportParseResponseFromJSON;
|
|
18
|
+
exports.PostQuestionImportParseResponseFromJSONTyped = PostQuestionImportParseResponseFromJSONTyped;
|
|
19
|
+
exports.PostQuestionImportParseResponseToJSON = PostQuestionImportParseResponseToJSON;
|
|
20
|
+
exports.PostQuestionImportParseResponseToJSONTyped = PostQuestionImportParseResponseToJSONTyped;
|
|
21
|
+
const QuestionImportDraft_1 = require("./QuestionImportDraft");
|
|
22
|
+
const QuestionImportSource_1 = require("./QuestionImportSource");
|
|
23
|
+
const QuestionImportPreviewImage_1 = require("./QuestionImportPreviewImage");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the PostQuestionImportParseResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfPostQuestionImportParseResponse(value) {
|
|
28
|
+
if (!('importToken' in value) || value['importToken'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('expiresAt' in value) || value['expiresAt'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('source' in value) || value['source'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('questions' in value) || value['questions'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('images' in value) || value['images'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('parser' in value) || value['parser'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('warnings' in value) || value['warnings'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
function PostQuestionImportParseResponseFromJSON(json) {
|
|
45
|
+
return PostQuestionImportParseResponseFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function PostQuestionImportParseResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'importToken': json['import_token'],
|
|
53
|
+
'expiresAt': (new Date(json['expires_at'])),
|
|
54
|
+
'source': (0, QuestionImportSource_1.QuestionImportSourceFromJSON)(json['source']),
|
|
55
|
+
'questions': (json['questions'].map(QuestionImportDraft_1.QuestionImportDraftFromJSON)),
|
|
56
|
+
'images': (json['images'].map(QuestionImportPreviewImage_1.QuestionImportPreviewImageFromJSON)),
|
|
57
|
+
'parser': json['parser'],
|
|
58
|
+
'warnings': json['warnings'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function PostQuestionImportParseResponseToJSON(json) {
|
|
62
|
+
return PostQuestionImportParseResponseToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function PostQuestionImportParseResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'import_token': value['importToken'],
|
|
70
|
+
'expires_at': value['expiresAt'].toISOString(),
|
|
71
|
+
'source': (0, QuestionImportSource_1.QuestionImportSourceToJSON)(value['source']),
|
|
72
|
+
'questions': (value['questions'].map(QuestionImportDraft_1.QuestionImportDraftToJSON)),
|
|
73
|
+
'images': (value['images'].map(QuestionImportPreviewImage_1.QuestionImportPreviewImageToJSON)),
|
|
74
|
+
'parser': value['parser'],
|
|
75
|
+
'warnings': value['warnings'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -59,6 +59,12 @@ export interface PutQuestion {
|
|
|
59
59
|
* @memberof PutQuestion
|
|
60
60
|
*/
|
|
61
61
|
version?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Optional note describing the changes in the new version
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof PutQuestion
|
|
66
|
+
*/
|
|
67
|
+
versionReason?: string;
|
|
62
68
|
}
|
|
63
69
|
/**
|
|
64
70
|
* @export
|
|
@@ -53,6 +53,7 @@ function PutQuestionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
53
|
'explanation': json['explanation'] == null ? undefined : (0, RichTextInput_1.RichTextInputFromJSON)(json['explanation']),
|
|
54
54
|
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
55
55
|
'version': json['version'] == null ? undefined : json['version'],
|
|
56
|
+
'versionReason': json['version_reason'] == null ? undefined : json['version_reason'],
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
function PutQuestionToJSON(json) {
|
|
@@ -70,5 +71,6 @@ function PutQuestionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
70
71
|
'explanation': (0, RichTextInput_1.RichTextInputToJSON)(value['explanation']),
|
|
71
72
|
'tags': value['tags'],
|
|
72
73
|
'version': value['version'],
|
|
74
|
+
'version_reason': value['versionReason'],
|
|
73
75
|
};
|
|
74
76
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface QuestionImportCommitResult
|
|
16
|
+
*/
|
|
17
|
+
export interface QuestionImportCommitResult {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof QuestionImportCommitResult
|
|
22
|
+
*/
|
|
23
|
+
draftId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {QuestionImportCommitResultActionEnum}
|
|
27
|
+
* @memberof QuestionImportCommitResult
|
|
28
|
+
*/
|
|
29
|
+
action: QuestionImportCommitResultActionEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Identifier of the newly created question or question version
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof QuestionImportCommitResult
|
|
34
|
+
*/
|
|
35
|
+
questionId?: string | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const QuestionImportCommitResultActionEnum: {
|
|
41
|
+
readonly Created: "created";
|
|
42
|
+
readonly Versioned: "versioned";
|
|
43
|
+
readonly Skipped: "skipped";
|
|
44
|
+
};
|
|
45
|
+
export type QuestionImportCommitResultActionEnum = typeof QuestionImportCommitResultActionEnum[keyof typeof QuestionImportCommitResultActionEnum];
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the QuestionImportCommitResult interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfQuestionImportCommitResult(value: object): value is QuestionImportCommitResult;
|
|
50
|
+
export declare function QuestionImportCommitResultFromJSON(json: any): QuestionImportCommitResult;
|
|
51
|
+
export declare function QuestionImportCommitResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportCommitResult;
|
|
52
|
+
export declare function QuestionImportCommitResultToJSON(json: any): QuestionImportCommitResult;
|
|
53
|
+
export declare function QuestionImportCommitResultToJSONTyped(value?: QuestionImportCommitResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.QuestionImportCommitResultActionEnum = void 0;
|
|
17
|
+
exports.instanceOfQuestionImportCommitResult = instanceOfQuestionImportCommitResult;
|
|
18
|
+
exports.QuestionImportCommitResultFromJSON = QuestionImportCommitResultFromJSON;
|
|
19
|
+
exports.QuestionImportCommitResultFromJSONTyped = QuestionImportCommitResultFromJSONTyped;
|
|
20
|
+
exports.QuestionImportCommitResultToJSON = QuestionImportCommitResultToJSON;
|
|
21
|
+
exports.QuestionImportCommitResultToJSONTyped = QuestionImportCommitResultToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.QuestionImportCommitResultActionEnum = {
|
|
26
|
+
Created: 'created',
|
|
27
|
+
Versioned: 'versioned',
|
|
28
|
+
Skipped: 'skipped'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the QuestionImportCommitResult interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfQuestionImportCommitResult(value) {
|
|
34
|
+
if (!('draftId' in value) || value['draftId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function QuestionImportCommitResultFromJSON(json) {
|
|
41
|
+
return QuestionImportCommitResultFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function QuestionImportCommitResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'draftId': json['draft_id'],
|
|
49
|
+
'action': json['action'],
|
|
50
|
+
'questionId': json['question_id'] == null ? undefined : json['question_id'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function QuestionImportCommitResultToJSON(json) {
|
|
54
|
+
return QuestionImportCommitResultToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function QuestionImportCommitResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'draft_id': value['draftId'],
|
|
62
|
+
'action': value['action'],
|
|
63
|
+
'question_id': value['questionId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { QuestionImportDuplicate } from './QuestionImportDuplicate';
|
|
13
|
+
import type { PostQuestion } from './PostQuestion';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface QuestionImportDraft
|
|
18
|
+
*/
|
|
19
|
+
export interface QuestionImportDraft {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof QuestionImportDraft
|
|
24
|
+
*/
|
|
25
|
+
draftId: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof QuestionImportDraft
|
|
30
|
+
*/
|
|
31
|
+
sourceKey?: string | null;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof QuestionImportDraft
|
|
36
|
+
*/
|
|
37
|
+
sourceLocation?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {PostQuestion}
|
|
41
|
+
* @memberof QuestionImportDraft
|
|
42
|
+
*/
|
|
43
|
+
question: PostQuestion;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {QuestionImportDuplicate}
|
|
47
|
+
* @memberof QuestionImportDraft
|
|
48
|
+
*/
|
|
49
|
+
duplicate: QuestionImportDuplicate;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Array<string>}
|
|
53
|
+
* @memberof QuestionImportDraft
|
|
54
|
+
*/
|
|
55
|
+
warnings: Array<string>;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof QuestionImportDraft
|
|
60
|
+
*/
|
|
61
|
+
confidence: number;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {boolean}
|
|
65
|
+
* @memberof QuestionImportDraft
|
|
66
|
+
*/
|
|
67
|
+
included: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the QuestionImportDraft interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfQuestionImportDraft(value: object): value is QuestionImportDraft;
|
|
73
|
+
export declare function QuestionImportDraftFromJSON(json: any): QuestionImportDraft;
|
|
74
|
+
export declare function QuestionImportDraftFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportDraft;
|
|
75
|
+
export declare function QuestionImportDraftToJSON(json: any): QuestionImportDraft;
|
|
76
|
+
export declare function QuestionImportDraftToJSONTyped(value?: QuestionImportDraft | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfQuestionImportDraft = instanceOfQuestionImportDraft;
|
|
17
|
+
exports.QuestionImportDraftFromJSON = QuestionImportDraftFromJSON;
|
|
18
|
+
exports.QuestionImportDraftFromJSONTyped = QuestionImportDraftFromJSONTyped;
|
|
19
|
+
exports.QuestionImportDraftToJSON = QuestionImportDraftToJSON;
|
|
20
|
+
exports.QuestionImportDraftToJSONTyped = QuestionImportDraftToJSONTyped;
|
|
21
|
+
const QuestionImportDuplicate_1 = require("./QuestionImportDuplicate");
|
|
22
|
+
const PostQuestion_1 = require("./PostQuestion");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the QuestionImportDraft interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfQuestionImportDraft(value) {
|
|
27
|
+
if (!('draftId' in value) || value['draftId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('question' in value) || value['question'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('duplicate' in value) || value['duplicate'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('warnings' in value) || value['warnings'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('confidence' in value) || value['confidence'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('included' in value) || value['included'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function QuestionImportDraftFromJSON(json) {
|
|
42
|
+
return QuestionImportDraftFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function QuestionImportDraftFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'draftId': json['draft_id'],
|
|
50
|
+
'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
|
|
51
|
+
'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
|
|
52
|
+
'question': (0, PostQuestion_1.PostQuestionFromJSON)(json['question']),
|
|
53
|
+
'duplicate': (0, QuestionImportDuplicate_1.QuestionImportDuplicateFromJSON)(json['duplicate']),
|
|
54
|
+
'warnings': json['warnings'],
|
|
55
|
+
'confidence': json['confidence'],
|
|
56
|
+
'included': json['included'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function QuestionImportDraftToJSON(json) {
|
|
60
|
+
return QuestionImportDraftToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
function QuestionImportDraftToJSONTyped(value, ignoreDiscriminator = false) {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'draft_id': value['draftId'],
|
|
68
|
+
'source_key': value['sourceKey'],
|
|
69
|
+
'source_location': value['sourceLocation'],
|
|
70
|
+
'question': (0, PostQuestion_1.PostQuestionToJSON)(value['question']),
|
|
71
|
+
'duplicate': (0, QuestionImportDuplicate_1.QuestionImportDuplicateToJSON)(value['duplicate']),
|
|
72
|
+
'warnings': value['warnings'],
|
|
73
|
+
'confidence': value['confidence'],
|
|
74
|
+
'included': value['included'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface QuestionImportDuplicate
|
|
16
|
+
*/
|
|
17
|
+
export interface QuestionImportDuplicate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {QuestionImportDuplicateStatusEnum}
|
|
21
|
+
* @memberof QuestionImportDuplicate
|
|
22
|
+
*/
|
|
23
|
+
status: QuestionImportDuplicateStatusEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof QuestionImportDuplicate
|
|
28
|
+
*/
|
|
29
|
+
matchedQuestionId?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof QuestionImportDuplicate
|
|
34
|
+
*/
|
|
35
|
+
matchedDraftId?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof QuestionImportDuplicate
|
|
40
|
+
*/
|
|
41
|
+
matchedQuestionText?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof QuestionImportDuplicate
|
|
46
|
+
*/
|
|
47
|
+
similarity: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const QuestionImportDuplicateStatusEnum: {
|
|
53
|
+
readonly New: "new";
|
|
54
|
+
readonly Exact: "exact";
|
|
55
|
+
readonly Possible: "possible";
|
|
56
|
+
readonly WithinUpload: "within_upload";
|
|
57
|
+
};
|
|
58
|
+
export type QuestionImportDuplicateStatusEnum = typeof QuestionImportDuplicateStatusEnum[keyof typeof QuestionImportDuplicateStatusEnum];
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the QuestionImportDuplicate interface.
|
|
61
|
+
*/
|
|
62
|
+
export declare function instanceOfQuestionImportDuplicate(value: object): value is QuestionImportDuplicate;
|
|
63
|
+
export declare function QuestionImportDuplicateFromJSON(json: any): QuestionImportDuplicate;
|
|
64
|
+
export declare function QuestionImportDuplicateFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportDuplicate;
|
|
65
|
+
export declare function QuestionImportDuplicateToJSON(json: any): QuestionImportDuplicate;
|
|
66
|
+
export declare function QuestionImportDuplicateToJSONTyped(value?: QuestionImportDuplicate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.QuestionImportDuplicateStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfQuestionImportDuplicate = instanceOfQuestionImportDuplicate;
|
|
18
|
+
exports.QuestionImportDuplicateFromJSON = QuestionImportDuplicateFromJSON;
|
|
19
|
+
exports.QuestionImportDuplicateFromJSONTyped = QuestionImportDuplicateFromJSONTyped;
|
|
20
|
+
exports.QuestionImportDuplicateToJSON = QuestionImportDuplicateToJSON;
|
|
21
|
+
exports.QuestionImportDuplicateToJSONTyped = QuestionImportDuplicateToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.QuestionImportDuplicateStatusEnum = {
|
|
26
|
+
New: 'new',
|
|
27
|
+
Exact: 'exact',
|
|
28
|
+
Possible: 'possible',
|
|
29
|
+
WithinUpload: 'within_upload'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the QuestionImportDuplicate interface.
|
|
33
|
+
*/
|
|
34
|
+
function instanceOfQuestionImportDuplicate(value) {
|
|
35
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('similarity' in value) || value['similarity'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function QuestionImportDuplicateFromJSON(json) {
|
|
42
|
+
return QuestionImportDuplicateFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function QuestionImportDuplicateFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'status': json['status'],
|
|
50
|
+
'matchedQuestionId': json['matched_question_id'] == null ? undefined : json['matched_question_id'],
|
|
51
|
+
'matchedDraftId': json['matched_draft_id'] == null ? undefined : json['matched_draft_id'],
|
|
52
|
+
'matchedQuestionText': json['matched_question_text'] == null ? undefined : json['matched_question_text'],
|
|
53
|
+
'similarity': json['similarity'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function QuestionImportDuplicateToJSON(json) {
|
|
57
|
+
return QuestionImportDuplicateToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function QuestionImportDuplicateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'status': value['status'],
|
|
65
|
+
'matched_question_id': value['matchedQuestionId'],
|
|
66
|
+
'matched_draft_id': value['matchedDraftId'],
|
|
67
|
+
'matched_question_text': value['matchedQuestionText'],
|
|
68
|
+
'similarity': value['similarity'],
|
|
69
|
+
};
|
|
70
|
+
}
|