@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.
Files changed (97) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +16 -3
  3. package/dist/apis/QuestionApi.d.ts +17 -2
  4. package/dist/apis/QuestionApi.js +41 -2
  5. package/dist/apis/QuestionImportApi.d.ts +51 -0
  6. package/dist/apis/QuestionImportApi.js +135 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/QuestionApi.d.ts +17 -2
  10. package/dist/esm/apis/QuestionApi.js +41 -2
  11. package/dist/esm/apis/QuestionImportApi.d.ts +51 -0
  12. package/dist/esm/apis/QuestionImportApi.js +131 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/GetQuestion.d.ts +20 -1
  16. package/dist/esm/models/GetQuestion.js +8 -0
  17. package/dist/esm/models/PostQuestionImportCommit.d.ts +58 -0
  18. package/dist/esm/models/PostQuestionImportCommit.js +59 -0
  19. package/dist/esm/models/PostQuestionImportCommitItem.d.ts +72 -0
  20. package/dist/esm/models/PostQuestionImportCommitItem.js +66 -0
  21. package/dist/esm/models/PostQuestionImportCommitResponse.d.ts +51 -0
  22. package/dist/esm/models/PostQuestionImportCommitResponse.js +56 -0
  23. package/dist/esm/models/PostQuestionImportParseResponse.d.ts +71 -0
  24. package/dist/esm/models/PostQuestionImportParseResponse.js +70 -0
  25. package/dist/esm/models/PutQuestion.d.ts +6 -0
  26. package/dist/esm/models/PutQuestion.js +2 -0
  27. package/dist/esm/models/QuestionImportCommitResult.d.ts +53 -0
  28. package/dist/esm/models/QuestionImportCommitResult.js +57 -0
  29. package/dist/esm/models/QuestionImportDraft.d.ts +76 -0
  30. package/dist/esm/models/QuestionImportDraft.js +69 -0
  31. package/dist/esm/models/QuestionImportDuplicate.d.ts +66 -0
  32. package/dist/esm/models/QuestionImportDuplicate.js +62 -0
  33. package/dist/esm/models/QuestionImportPreviewImage.d.ts +84 -0
  34. package/dist/esm/models/QuestionImportPreviewImage.js +76 -0
  35. package/dist/esm/models/QuestionImportSource.d.ts +56 -0
  36. package/dist/esm/models/QuestionImportSource.js +57 -0
  37. package/dist/esm/models/QuestionImportSourceSummary.d.ts +50 -0
  38. package/dist/esm/models/QuestionImportSourceSummary.js +53 -0
  39. package/dist/esm/models/index.d.ts +10 -0
  40. package/dist/esm/models/index.js +10 -0
  41. package/dist/models/GetQuestion.d.ts +20 -1
  42. package/dist/models/GetQuestion.js +8 -0
  43. package/dist/models/PostQuestionImportCommit.d.ts +58 -0
  44. package/dist/models/PostQuestionImportCommit.js +66 -0
  45. package/dist/models/PostQuestionImportCommitItem.d.ts +72 -0
  46. package/dist/models/PostQuestionImportCommitItem.js +74 -0
  47. package/dist/models/PostQuestionImportCommitResponse.d.ts +51 -0
  48. package/dist/models/PostQuestionImportCommitResponse.js +63 -0
  49. package/dist/models/PostQuestionImportParseResponse.d.ts +71 -0
  50. package/dist/models/PostQuestionImportParseResponse.js +77 -0
  51. package/dist/models/PutQuestion.d.ts +6 -0
  52. package/dist/models/PutQuestion.js +2 -0
  53. package/dist/models/QuestionImportCommitResult.d.ts +53 -0
  54. package/dist/models/QuestionImportCommitResult.js +65 -0
  55. package/dist/models/QuestionImportDraft.d.ts +76 -0
  56. package/dist/models/QuestionImportDraft.js +76 -0
  57. package/dist/models/QuestionImportDuplicate.d.ts +66 -0
  58. package/dist/models/QuestionImportDuplicate.js +70 -0
  59. package/dist/models/QuestionImportPreviewImage.d.ts +84 -0
  60. package/dist/models/QuestionImportPreviewImage.js +84 -0
  61. package/dist/models/QuestionImportSource.d.ts +56 -0
  62. package/dist/models/QuestionImportSource.js +64 -0
  63. package/dist/models/QuestionImportSourceSummary.d.ts +50 -0
  64. package/dist/models/QuestionImportSourceSummary.js +60 -0
  65. package/dist/models/index.d.ts +10 -0
  66. package/dist/models/index.js +10 -0
  67. package/docs/GetQuestion.md +6 -0
  68. package/docs/PostQuestionImportCommit.md +42 -0
  69. package/docs/PostQuestionImportCommitItem.md +44 -0
  70. package/docs/PostQuestionImportCommitResponse.md +40 -0
  71. package/docs/PostQuestionImportParseResponse.md +46 -0
  72. package/docs/PutQuestion.md +2 -0
  73. package/docs/QuestionApi.md +70 -2
  74. package/docs/QuestionImportApi.md +149 -0
  75. package/docs/QuestionImportCommitResult.md +38 -0
  76. package/docs/QuestionImportDraft.md +48 -0
  77. package/docs/QuestionImportDuplicate.md +42 -0
  78. package/docs/QuestionImportPreviewImage.md +48 -0
  79. package/docs/QuestionImportSource.md +42 -0
  80. package/docs/QuestionImportSourceSummary.md +40 -0
  81. package/package.json +1 -1
  82. package/src/apis/QuestionApi.ts +51 -2
  83. package/src/apis/QuestionImportApi.ts +162 -0
  84. package/src/apis/index.ts +1 -0
  85. package/src/models/GetQuestion.ts +32 -1
  86. package/src/models/PostQuestionImportCommit.ts +116 -0
  87. package/src/models/PostQuestionImportCommitItem.ts +128 -0
  88. package/src/models/PostQuestionImportCommitResponse.ts +101 -0
  89. package/src/models/PostQuestionImportParseResponse.ts +142 -0
  90. package/src/models/PutQuestion.ts +8 -0
  91. package/src/models/QuestionImportCommitResult.ts +95 -0
  92. package/src/models/QuestionImportDraft.ts +142 -0
  93. package/src/models/QuestionImportDuplicate.ts +112 -0
  94. package/src/models/QuestionImportPreviewImage.ts +140 -0
  95. package/src/models/QuestionImportSource.ts +101 -0
  96. package/src/models/QuestionImportSourceSummary.ts +92 -0
  97. package/src/models/index.ts +10 -0
@@ -0,0 +1,70 @@
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 { QuestionImportDraftFromJSON, QuestionImportDraftToJSON, } from './QuestionImportDraft';
15
+ import { QuestionImportSourceFromJSON, QuestionImportSourceToJSON, } from './QuestionImportSource';
16
+ import { QuestionImportPreviewImageFromJSON, QuestionImportPreviewImageToJSON, } from './QuestionImportPreviewImage';
17
+ /**
18
+ * Check if a given object implements the PostQuestionImportParseResponse interface.
19
+ */
20
+ export function instanceOfPostQuestionImportParseResponse(value) {
21
+ if (!('importToken' in value) || value['importToken'] === undefined)
22
+ return false;
23
+ if (!('expiresAt' in value) || value['expiresAt'] === undefined)
24
+ return false;
25
+ if (!('source' in value) || value['source'] === undefined)
26
+ return false;
27
+ if (!('questions' in value) || value['questions'] === undefined)
28
+ return false;
29
+ if (!('images' in value) || value['images'] === undefined)
30
+ return false;
31
+ if (!('parser' in value) || value['parser'] === undefined)
32
+ return false;
33
+ if (!('warnings' in value) || value['warnings'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ export function PostQuestionImportParseResponseFromJSON(json) {
38
+ return PostQuestionImportParseResponseFromJSONTyped(json, false);
39
+ }
40
+ export function PostQuestionImportParseResponseFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'importToken': json['import_token'],
46
+ 'expiresAt': (new Date(json['expires_at'])),
47
+ 'source': QuestionImportSourceFromJSON(json['source']),
48
+ 'questions': (json['questions'].map(QuestionImportDraftFromJSON)),
49
+ 'images': (json['images'].map(QuestionImportPreviewImageFromJSON)),
50
+ 'parser': json['parser'],
51
+ 'warnings': json['warnings'],
52
+ };
53
+ }
54
+ export function PostQuestionImportParseResponseToJSON(json) {
55
+ return PostQuestionImportParseResponseToJSONTyped(json, false);
56
+ }
57
+ export function PostQuestionImportParseResponseToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'import_token': value['importToken'],
63
+ 'expires_at': value['expiresAt'].toISOString(),
64
+ 'source': QuestionImportSourceToJSON(value['source']),
65
+ 'questions': (value['questions'].map(QuestionImportDraftToJSON)),
66
+ 'images': (value['images'].map(QuestionImportPreviewImageToJSON)),
67
+ 'parser': value['parser'],
68
+ 'warnings': value['warnings'],
69
+ };
70
+ }
@@ -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
@@ -45,6 +45,7 @@ export function PutQuestionFromJSONTyped(json, ignoreDiscriminator) {
45
45
  'explanation': json['explanation'] == null ? undefined : RichTextInputFromJSON(json['explanation']),
46
46
  'tags': json['tags'] == null ? undefined : json['tags'],
47
47
  'version': json['version'] == null ? undefined : json['version'],
48
+ 'versionReason': json['version_reason'] == null ? undefined : json['version_reason'],
48
49
  };
49
50
  }
50
51
  export function PutQuestionToJSON(json) {
@@ -62,5 +63,6 @@ export function PutQuestionToJSONTyped(value, ignoreDiscriminator = false) {
62
63
  'explanation': RichTextInputToJSON(value['explanation']),
63
64
  'tags': value['tags'],
64
65
  'version': value['version'],
66
+ 'version_reason': value['versionReason'],
65
67
  };
66
68
  }
@@ -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,57 @@
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
+ * @export
16
+ */
17
+ export const QuestionImportCommitResultActionEnum = {
18
+ Created: 'created',
19
+ Versioned: 'versioned',
20
+ Skipped: 'skipped'
21
+ };
22
+ /**
23
+ * Check if a given object implements the QuestionImportCommitResult interface.
24
+ */
25
+ export function instanceOfQuestionImportCommitResult(value) {
26
+ if (!('draftId' in value) || value['draftId'] === undefined)
27
+ return false;
28
+ if (!('action' in value) || value['action'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ export function QuestionImportCommitResultFromJSON(json) {
33
+ return QuestionImportCommitResultFromJSONTyped(json, false);
34
+ }
35
+ export function QuestionImportCommitResultFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'draftId': json['draft_id'],
41
+ 'action': json['action'],
42
+ 'questionId': json['question_id'] == null ? undefined : json['question_id'],
43
+ };
44
+ }
45
+ export function QuestionImportCommitResultToJSON(json) {
46
+ return QuestionImportCommitResultToJSONTyped(json, false);
47
+ }
48
+ export function QuestionImportCommitResultToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'draft_id': value['draftId'],
54
+ 'action': value['action'],
55
+ 'question_id': value['questionId'],
56
+ };
57
+ }
@@ -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,69 @@
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 { QuestionImportDuplicateFromJSON, QuestionImportDuplicateToJSON, } from './QuestionImportDuplicate';
15
+ import { PostQuestionFromJSON, PostQuestionToJSON, } from './PostQuestion';
16
+ /**
17
+ * Check if a given object implements the QuestionImportDraft interface.
18
+ */
19
+ export function instanceOfQuestionImportDraft(value) {
20
+ if (!('draftId' in value) || value['draftId'] === undefined)
21
+ return false;
22
+ if (!('question' in value) || value['question'] === undefined)
23
+ return false;
24
+ if (!('duplicate' in value) || value['duplicate'] === undefined)
25
+ return false;
26
+ if (!('warnings' in value) || value['warnings'] === undefined)
27
+ return false;
28
+ if (!('confidence' in value) || value['confidence'] === undefined)
29
+ return false;
30
+ if (!('included' in value) || value['included'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ export function QuestionImportDraftFromJSON(json) {
35
+ return QuestionImportDraftFromJSONTyped(json, false);
36
+ }
37
+ export function QuestionImportDraftFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'draftId': json['draft_id'],
43
+ 'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
44
+ 'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
45
+ 'question': PostQuestionFromJSON(json['question']),
46
+ 'duplicate': QuestionImportDuplicateFromJSON(json['duplicate']),
47
+ 'warnings': json['warnings'],
48
+ 'confidence': json['confidence'],
49
+ 'included': json['included'],
50
+ };
51
+ }
52
+ export function QuestionImportDraftToJSON(json) {
53
+ return QuestionImportDraftToJSONTyped(json, false);
54
+ }
55
+ export function QuestionImportDraftToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'draft_id': value['draftId'],
61
+ 'source_key': value['sourceKey'],
62
+ 'source_location': value['sourceLocation'],
63
+ 'question': PostQuestionToJSON(value['question']),
64
+ 'duplicate': QuestionImportDuplicateToJSON(value['duplicate']),
65
+ 'warnings': value['warnings'],
66
+ 'confidence': value['confidence'],
67
+ 'included': value['included'],
68
+ };
69
+ }
@@ -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,62 @@
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
+ * @export
16
+ */
17
+ export const QuestionImportDuplicateStatusEnum = {
18
+ New: 'new',
19
+ Exact: 'exact',
20
+ Possible: 'possible',
21
+ WithinUpload: 'within_upload'
22
+ };
23
+ /**
24
+ * Check if a given object implements the QuestionImportDuplicate interface.
25
+ */
26
+ export function instanceOfQuestionImportDuplicate(value) {
27
+ if (!('status' in value) || value['status'] === undefined)
28
+ return false;
29
+ if (!('similarity' in value) || value['similarity'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function QuestionImportDuplicateFromJSON(json) {
34
+ return QuestionImportDuplicateFromJSONTyped(json, false);
35
+ }
36
+ export function QuestionImportDuplicateFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'status': json['status'],
42
+ 'matchedQuestionId': json['matched_question_id'] == null ? undefined : json['matched_question_id'],
43
+ 'matchedDraftId': json['matched_draft_id'] == null ? undefined : json['matched_draft_id'],
44
+ 'matchedQuestionText': json['matched_question_text'] == null ? undefined : json['matched_question_text'],
45
+ 'similarity': json['similarity'],
46
+ };
47
+ }
48
+ export function QuestionImportDuplicateToJSON(json) {
49
+ return QuestionImportDuplicateToJSONTyped(json, false);
50
+ }
51
+ export function QuestionImportDuplicateToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'status': value['status'],
57
+ 'matched_question_id': value['matchedQuestionId'],
58
+ 'matched_draft_id': value['matchedDraftId'],
59
+ 'matched_question_text': value['matchedQuestionText'],
60
+ 'similarity': value['similarity'],
61
+ };
62
+ }
@@ -0,0 +1,84 @@
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 QuestionImportPreviewImage
16
+ */
17
+ export interface QuestionImportPreviewImage {
18
+ /**
19
+ * Import-scoped image identifier used by source: image placeholders
20
+ * @type {string}
21
+ * @memberof QuestionImportPreviewImage
22
+ */
23
+ sourceId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof QuestionImportPreviewImage
28
+ */
29
+ filename: string;
30
+ /**
31
+ *
32
+ * @type {QuestionImportPreviewImageMimeTypeEnum}
33
+ * @memberof QuestionImportPreviewImage
34
+ */
35
+ mimeType: QuestionImportPreviewImageMimeTypeEnum;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof QuestionImportPreviewImage
40
+ */
41
+ byteSize: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof QuestionImportPreviewImage
46
+ */
47
+ width?: number | null;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof QuestionImportPreviewImage
52
+ */
53
+ height?: number | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof QuestionImportPreviewImage
58
+ */
59
+ sha256: string;
60
+ /**
61
+ * Base64 image bytes for stateless review; reposted unchanged when committing
62
+ * @type {string}
63
+ * @memberof QuestionImportPreviewImage
64
+ */
65
+ dataBase64: string;
66
+ }
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const QuestionImportPreviewImageMimeTypeEnum: {
71
+ readonly ImagePng: "image/png";
72
+ readonly ImageJpeg: "image/jpeg";
73
+ readonly ImageWebp: "image/webp";
74
+ readonly ImageGif: "image/gif";
75
+ };
76
+ export type QuestionImportPreviewImageMimeTypeEnum = typeof QuestionImportPreviewImageMimeTypeEnum[keyof typeof QuestionImportPreviewImageMimeTypeEnum];
77
+ /**
78
+ * Check if a given object implements the QuestionImportPreviewImage interface.
79
+ */
80
+ export declare function instanceOfQuestionImportPreviewImage(value: object): value is QuestionImportPreviewImage;
81
+ export declare function QuestionImportPreviewImageFromJSON(json: any): QuestionImportPreviewImage;
82
+ export declare function QuestionImportPreviewImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuestionImportPreviewImage;
83
+ export declare function QuestionImportPreviewImageToJSON(json: any): QuestionImportPreviewImage;
84
+ export declare function QuestionImportPreviewImageToJSONTyped(value?: QuestionImportPreviewImage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,76 @@
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
+ * @export
16
+ */
17
+ export const QuestionImportPreviewImageMimeTypeEnum = {
18
+ ImagePng: 'image/png',
19
+ ImageJpeg: 'image/jpeg',
20
+ ImageWebp: 'image/webp',
21
+ ImageGif: 'image/gif'
22
+ };
23
+ /**
24
+ * Check if a given object implements the QuestionImportPreviewImage interface.
25
+ */
26
+ export function instanceOfQuestionImportPreviewImage(value) {
27
+ if (!('sourceId' in value) || value['sourceId'] === undefined)
28
+ return false;
29
+ if (!('filename' in value) || value['filename'] === undefined)
30
+ return false;
31
+ if (!('mimeType' in value) || value['mimeType'] === undefined)
32
+ return false;
33
+ if (!('byteSize' in value) || value['byteSize'] === undefined)
34
+ return false;
35
+ if (!('sha256' in value) || value['sha256'] === undefined)
36
+ return false;
37
+ if (!('dataBase64' in value) || value['dataBase64'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ export function QuestionImportPreviewImageFromJSON(json) {
42
+ return QuestionImportPreviewImageFromJSONTyped(json, false);
43
+ }
44
+ export function QuestionImportPreviewImageFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'sourceId': json['source_id'],
50
+ 'filename': json['filename'],
51
+ 'mimeType': json['mime_type'],
52
+ 'byteSize': json['byte_size'],
53
+ 'width': json['width'] == null ? undefined : json['width'],
54
+ 'height': json['height'] == null ? undefined : json['height'],
55
+ 'sha256': json['sha256'],
56
+ 'dataBase64': json['data_base64'],
57
+ };
58
+ }
59
+ export function QuestionImportPreviewImageToJSON(json) {
60
+ return QuestionImportPreviewImageToJSONTyped(json, false);
61
+ }
62
+ export function QuestionImportPreviewImageToJSONTyped(value, ignoreDiscriminator = false) {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+ return {
67
+ 'source_id': value['sourceId'],
68
+ 'filename': value['filename'],
69
+ 'mime_type': value['mimeType'],
70
+ 'byte_size': value['byteSize'],
71
+ 'width': value['width'],
72
+ 'height': value['height'],
73
+ 'sha256': value['sha256'],
74
+ 'data_base64': value['dataBase64'],
75
+ };
76
+ }