@easyedu/js-lsm-api 1.111.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 +22 -0
- package/README.md +14 -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/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 +7 -0
- package/dist/esm/models/GetQuestion.js +3 -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/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 +7 -0
- package/dist/models/GetQuestion.js +3 -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/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 +2 -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/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/QuestionImportApi.ts +162 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetQuestion.ts +15 -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/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,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
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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 QuestionImportCommitResult
|
|
20
|
+
*/
|
|
21
|
+
export interface QuestionImportCommitResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof QuestionImportCommitResult
|
|
26
|
+
*/
|
|
27
|
+
draftId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {QuestionImportCommitResultActionEnum}
|
|
31
|
+
* @memberof QuestionImportCommitResult
|
|
32
|
+
*/
|
|
33
|
+
action: QuestionImportCommitResultActionEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Identifier of the newly created question or question version
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof QuestionImportCommitResult
|
|
38
|
+
*/
|
|
39
|
+
questionId?: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const QuestionImportCommitResultActionEnum = {
|
|
47
|
+
Created: 'created',
|
|
48
|
+
Versioned: 'versioned',
|
|
49
|
+
Skipped: 'skipped'
|
|
50
|
+
} as const;
|
|
51
|
+
export type QuestionImportCommitResultActionEnum = typeof QuestionImportCommitResultActionEnum[keyof typeof QuestionImportCommitResultActionEnum];
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the QuestionImportCommitResult interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfQuestionImportCommitResult(value: object): value is QuestionImportCommitResult {
|
|
58
|
+
if (!('draftId' in value) || value['draftId'] === undefined) return false;
|
|
59
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function QuestionImportCommitResultFromJSON(json: any): QuestionImportCommitResult {
|
|
64
|
+
return QuestionImportCommitResultFromJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function QuestionImportCommitResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportCommitResult {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'draftId': json['draft_id'],
|
|
74
|
+
'action': json['action'],
|
|
75
|
+
'questionId': json['question_id'] == null ? undefined : json['question_id'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function QuestionImportCommitResultToJSON(json: any): QuestionImportCommitResult {
|
|
80
|
+
return QuestionImportCommitResultToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function QuestionImportCommitResultToJSONTyped(value?: QuestionImportCommitResult | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'draft_id': value['draftId'],
|
|
91
|
+
'action': value['action'],
|
|
92
|
+
'question_id': value['questionId'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -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 { QuestionImportDuplicate } from './QuestionImportDuplicate';
|
|
17
|
+
import {
|
|
18
|
+
QuestionImportDuplicateFromJSON,
|
|
19
|
+
QuestionImportDuplicateFromJSONTyped,
|
|
20
|
+
QuestionImportDuplicateToJSON,
|
|
21
|
+
QuestionImportDuplicateToJSONTyped,
|
|
22
|
+
} from './QuestionImportDuplicate';
|
|
23
|
+
import type { PostQuestion } from './PostQuestion';
|
|
24
|
+
import {
|
|
25
|
+
PostQuestionFromJSON,
|
|
26
|
+
PostQuestionFromJSONTyped,
|
|
27
|
+
PostQuestionToJSON,
|
|
28
|
+
PostQuestionToJSONTyped,
|
|
29
|
+
} from './PostQuestion';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface QuestionImportDraft
|
|
35
|
+
*/
|
|
36
|
+
export interface QuestionImportDraft {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof QuestionImportDraft
|
|
41
|
+
*/
|
|
42
|
+
draftId: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof QuestionImportDraft
|
|
47
|
+
*/
|
|
48
|
+
sourceKey?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof QuestionImportDraft
|
|
53
|
+
*/
|
|
54
|
+
sourceLocation?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {PostQuestion}
|
|
58
|
+
* @memberof QuestionImportDraft
|
|
59
|
+
*/
|
|
60
|
+
question: PostQuestion;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {QuestionImportDuplicate}
|
|
64
|
+
* @memberof QuestionImportDraft
|
|
65
|
+
*/
|
|
66
|
+
duplicate: QuestionImportDuplicate;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Array<string>}
|
|
70
|
+
* @memberof QuestionImportDraft
|
|
71
|
+
*/
|
|
72
|
+
warnings: Array<string>;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof QuestionImportDraft
|
|
77
|
+
*/
|
|
78
|
+
confidence: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
* @memberof QuestionImportDraft
|
|
83
|
+
*/
|
|
84
|
+
included: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Check if a given object implements the QuestionImportDraft interface.
|
|
89
|
+
*/
|
|
90
|
+
export function instanceOfQuestionImportDraft(value: object): value is QuestionImportDraft {
|
|
91
|
+
if (!('draftId' in value) || value['draftId'] === undefined) return false;
|
|
92
|
+
if (!('question' in value) || value['question'] === undefined) return false;
|
|
93
|
+
if (!('duplicate' in value) || value['duplicate'] === undefined) return false;
|
|
94
|
+
if (!('warnings' in value) || value['warnings'] === undefined) return false;
|
|
95
|
+
if (!('confidence' in value) || value['confidence'] === undefined) return false;
|
|
96
|
+
if (!('included' in value) || value['included'] === undefined) return false;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function QuestionImportDraftFromJSON(json: any): QuestionImportDraft {
|
|
101
|
+
return QuestionImportDraftFromJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function QuestionImportDraftFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportDraft {
|
|
105
|
+
if (json == null) {
|
|
106
|
+
return json;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'draftId': json['draft_id'],
|
|
111
|
+
'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
|
|
112
|
+
'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
|
|
113
|
+
'question': PostQuestionFromJSON(json['question']),
|
|
114
|
+
'duplicate': QuestionImportDuplicateFromJSON(json['duplicate']),
|
|
115
|
+
'warnings': json['warnings'],
|
|
116
|
+
'confidence': json['confidence'],
|
|
117
|
+
'included': json['included'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function QuestionImportDraftToJSON(json: any): QuestionImportDraft {
|
|
122
|
+
return QuestionImportDraftToJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function QuestionImportDraftToJSONTyped(value?: QuestionImportDraft | null, ignoreDiscriminator: boolean = false): any {
|
|
126
|
+
if (value == null) {
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
|
|
132
|
+
'draft_id': value['draftId'],
|
|
133
|
+
'source_key': value['sourceKey'],
|
|
134
|
+
'source_location': value['sourceLocation'],
|
|
135
|
+
'question': PostQuestionToJSON(value['question']),
|
|
136
|
+
'duplicate': QuestionImportDuplicateToJSON(value['duplicate']),
|
|
137
|
+
'warnings': value['warnings'],
|
|
138
|
+
'confidence': value['confidence'],
|
|
139
|
+
'included': value['included'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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 QuestionImportDuplicate
|
|
20
|
+
*/
|
|
21
|
+
export interface QuestionImportDuplicate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {QuestionImportDuplicateStatusEnum}
|
|
25
|
+
* @memberof QuestionImportDuplicate
|
|
26
|
+
*/
|
|
27
|
+
status: QuestionImportDuplicateStatusEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof QuestionImportDuplicate
|
|
32
|
+
*/
|
|
33
|
+
matchedQuestionId?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof QuestionImportDuplicate
|
|
38
|
+
*/
|
|
39
|
+
matchedDraftId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof QuestionImportDuplicate
|
|
44
|
+
*/
|
|
45
|
+
matchedQuestionText?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof QuestionImportDuplicate
|
|
50
|
+
*/
|
|
51
|
+
similarity: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const QuestionImportDuplicateStatusEnum = {
|
|
59
|
+
New: 'new',
|
|
60
|
+
Exact: 'exact',
|
|
61
|
+
Possible: 'possible',
|
|
62
|
+
WithinUpload: 'within_upload'
|
|
63
|
+
} as const;
|
|
64
|
+
export type QuestionImportDuplicateStatusEnum = typeof QuestionImportDuplicateStatusEnum[keyof typeof QuestionImportDuplicateStatusEnum];
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the QuestionImportDuplicate interface.
|
|
69
|
+
*/
|
|
70
|
+
export function instanceOfQuestionImportDuplicate(value: object): value is QuestionImportDuplicate {
|
|
71
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
72
|
+
if (!('similarity' in value) || value['similarity'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function QuestionImportDuplicateFromJSON(json: any): QuestionImportDuplicate {
|
|
77
|
+
return QuestionImportDuplicateFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function QuestionImportDuplicateFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportDuplicate {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'status': json['status'],
|
|
87
|
+
'matchedQuestionId': json['matched_question_id'] == null ? undefined : json['matched_question_id'],
|
|
88
|
+
'matchedDraftId': json['matched_draft_id'] == null ? undefined : json['matched_draft_id'],
|
|
89
|
+
'matchedQuestionText': json['matched_question_text'] == null ? undefined : json['matched_question_text'],
|
|
90
|
+
'similarity': json['similarity'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function QuestionImportDuplicateToJSON(json: any): QuestionImportDuplicate {
|
|
95
|
+
return QuestionImportDuplicateToJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function QuestionImportDuplicateToJSONTyped(value?: QuestionImportDuplicate | null, ignoreDiscriminator: boolean = false): any {
|
|
99
|
+
if (value == null) {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'status': value['status'],
|
|
106
|
+
'matched_question_id': value['matchedQuestionId'],
|
|
107
|
+
'matched_draft_id': value['matchedDraftId'],
|
|
108
|
+
'matched_question_text': value['matchedQuestionText'],
|
|
109
|
+
'similarity': value['similarity'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
@@ -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 QuestionImportPreviewImage
|
|
20
|
+
*/
|
|
21
|
+
export interface QuestionImportPreviewImage {
|
|
22
|
+
/**
|
|
23
|
+
* Import-scoped image identifier used by source: image placeholders
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof QuestionImportPreviewImage
|
|
26
|
+
*/
|
|
27
|
+
sourceId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof QuestionImportPreviewImage
|
|
32
|
+
*/
|
|
33
|
+
filename: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {QuestionImportPreviewImageMimeTypeEnum}
|
|
37
|
+
* @memberof QuestionImportPreviewImage
|
|
38
|
+
*/
|
|
39
|
+
mimeType: QuestionImportPreviewImageMimeTypeEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof QuestionImportPreviewImage
|
|
44
|
+
*/
|
|
45
|
+
byteSize: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof QuestionImportPreviewImage
|
|
50
|
+
*/
|
|
51
|
+
width?: number | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof QuestionImportPreviewImage
|
|
56
|
+
*/
|
|
57
|
+
height?: number | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof QuestionImportPreviewImage
|
|
62
|
+
*/
|
|
63
|
+
sha256: string;
|
|
64
|
+
/**
|
|
65
|
+
* Base64 image bytes for stateless review; reposted unchanged when committing
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof QuestionImportPreviewImage
|
|
68
|
+
*/
|
|
69
|
+
dataBase64: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export const QuestionImportPreviewImageMimeTypeEnum = {
|
|
77
|
+
ImagePng: 'image/png',
|
|
78
|
+
ImageJpeg: 'image/jpeg',
|
|
79
|
+
ImageWebp: 'image/webp',
|
|
80
|
+
ImageGif: 'image/gif'
|
|
81
|
+
} as const;
|
|
82
|
+
export type QuestionImportPreviewImageMimeTypeEnum = typeof QuestionImportPreviewImageMimeTypeEnum[keyof typeof QuestionImportPreviewImageMimeTypeEnum];
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the QuestionImportPreviewImage interface.
|
|
87
|
+
*/
|
|
88
|
+
export function instanceOfQuestionImportPreviewImage(value: object): value is QuestionImportPreviewImage {
|
|
89
|
+
if (!('sourceId' in value) || value['sourceId'] === undefined) return false;
|
|
90
|
+
if (!('filename' in value) || value['filename'] === undefined) return false;
|
|
91
|
+
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
92
|
+
if (!('byteSize' in value) || value['byteSize'] === undefined) return false;
|
|
93
|
+
if (!('sha256' in value) || value['sha256'] === undefined) return false;
|
|
94
|
+
if (!('dataBase64' in value) || value['dataBase64'] === undefined) return false;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function QuestionImportPreviewImageFromJSON(json: any): QuestionImportPreviewImage {
|
|
99
|
+
return QuestionImportPreviewImageFromJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function QuestionImportPreviewImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportPreviewImage {
|
|
103
|
+
if (json == null) {
|
|
104
|
+
return json;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'sourceId': json['source_id'],
|
|
109
|
+
'filename': json['filename'],
|
|
110
|
+
'mimeType': json['mime_type'],
|
|
111
|
+
'byteSize': json['byte_size'],
|
|
112
|
+
'width': json['width'] == null ? undefined : json['width'],
|
|
113
|
+
'height': json['height'] == null ? undefined : json['height'],
|
|
114
|
+
'sha256': json['sha256'],
|
|
115
|
+
'dataBase64': json['data_base64'],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function QuestionImportPreviewImageToJSON(json: any): QuestionImportPreviewImage {
|
|
120
|
+
return QuestionImportPreviewImageToJSONTyped(json, false);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function QuestionImportPreviewImageToJSONTyped(value?: QuestionImportPreviewImage | null, ignoreDiscriminator: boolean = false): any {
|
|
124
|
+
if (value == null) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'source_id': value['sourceId'],
|
|
131
|
+
'filename': value['filename'],
|
|
132
|
+
'mime_type': value['mimeType'],
|
|
133
|
+
'byte_size': value['byteSize'],
|
|
134
|
+
'width': value['width'],
|
|
135
|
+
'height': value['height'],
|
|
136
|
+
'sha256': value['sha256'],
|
|
137
|
+
'data_base64': value['dataBase64'],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|