@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.
Files changed (85) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +14 -2
  3. package/dist/apis/QuestionImportApi.d.ts +51 -0
  4. package/dist/apis/QuestionImportApi.js +135 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/QuestionImportApi.d.ts +51 -0
  8. package/dist/esm/apis/QuestionImportApi.js +131 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/GetQuestion.d.ts +7 -0
  12. package/dist/esm/models/GetQuestion.js +3 -0
  13. package/dist/esm/models/PostQuestionImportCommit.d.ts +58 -0
  14. package/dist/esm/models/PostQuestionImportCommit.js +59 -0
  15. package/dist/esm/models/PostQuestionImportCommitItem.d.ts +72 -0
  16. package/dist/esm/models/PostQuestionImportCommitItem.js +66 -0
  17. package/dist/esm/models/PostQuestionImportCommitResponse.d.ts +51 -0
  18. package/dist/esm/models/PostQuestionImportCommitResponse.js +56 -0
  19. package/dist/esm/models/PostQuestionImportParseResponse.d.ts +71 -0
  20. package/dist/esm/models/PostQuestionImportParseResponse.js +70 -0
  21. package/dist/esm/models/QuestionImportCommitResult.d.ts +53 -0
  22. package/dist/esm/models/QuestionImportCommitResult.js +57 -0
  23. package/dist/esm/models/QuestionImportDraft.d.ts +76 -0
  24. package/dist/esm/models/QuestionImportDraft.js +69 -0
  25. package/dist/esm/models/QuestionImportDuplicate.d.ts +66 -0
  26. package/dist/esm/models/QuestionImportDuplicate.js +62 -0
  27. package/dist/esm/models/QuestionImportPreviewImage.d.ts +84 -0
  28. package/dist/esm/models/QuestionImportPreviewImage.js +76 -0
  29. package/dist/esm/models/QuestionImportSource.d.ts +56 -0
  30. package/dist/esm/models/QuestionImportSource.js +57 -0
  31. package/dist/esm/models/QuestionImportSourceSummary.d.ts +50 -0
  32. package/dist/esm/models/QuestionImportSourceSummary.js +53 -0
  33. package/dist/esm/models/index.d.ts +10 -0
  34. package/dist/esm/models/index.js +10 -0
  35. package/dist/models/GetQuestion.d.ts +7 -0
  36. package/dist/models/GetQuestion.js +3 -0
  37. package/dist/models/PostQuestionImportCommit.d.ts +58 -0
  38. package/dist/models/PostQuestionImportCommit.js +66 -0
  39. package/dist/models/PostQuestionImportCommitItem.d.ts +72 -0
  40. package/dist/models/PostQuestionImportCommitItem.js +74 -0
  41. package/dist/models/PostQuestionImportCommitResponse.d.ts +51 -0
  42. package/dist/models/PostQuestionImportCommitResponse.js +63 -0
  43. package/dist/models/PostQuestionImportParseResponse.d.ts +71 -0
  44. package/dist/models/PostQuestionImportParseResponse.js +77 -0
  45. package/dist/models/QuestionImportCommitResult.d.ts +53 -0
  46. package/dist/models/QuestionImportCommitResult.js +65 -0
  47. package/dist/models/QuestionImportDraft.d.ts +76 -0
  48. package/dist/models/QuestionImportDraft.js +76 -0
  49. package/dist/models/QuestionImportDuplicate.d.ts +66 -0
  50. package/dist/models/QuestionImportDuplicate.js +70 -0
  51. package/dist/models/QuestionImportPreviewImage.d.ts +84 -0
  52. package/dist/models/QuestionImportPreviewImage.js +84 -0
  53. package/dist/models/QuestionImportSource.d.ts +56 -0
  54. package/dist/models/QuestionImportSource.js +64 -0
  55. package/dist/models/QuestionImportSourceSummary.d.ts +50 -0
  56. package/dist/models/QuestionImportSourceSummary.js +60 -0
  57. package/dist/models/index.d.ts +10 -0
  58. package/dist/models/index.js +10 -0
  59. package/docs/GetQuestion.md +2 -0
  60. package/docs/PostQuestionImportCommit.md +42 -0
  61. package/docs/PostQuestionImportCommitItem.md +44 -0
  62. package/docs/PostQuestionImportCommitResponse.md +40 -0
  63. package/docs/PostQuestionImportParseResponse.md +46 -0
  64. package/docs/QuestionImportApi.md +149 -0
  65. package/docs/QuestionImportCommitResult.md +38 -0
  66. package/docs/QuestionImportDraft.md +48 -0
  67. package/docs/QuestionImportDuplicate.md +42 -0
  68. package/docs/QuestionImportPreviewImage.md +48 -0
  69. package/docs/QuestionImportSource.md +42 -0
  70. package/docs/QuestionImportSourceSummary.md +40 -0
  71. package/package.json +1 -1
  72. package/src/apis/QuestionImportApi.ts +162 -0
  73. package/src/apis/index.ts +1 -0
  74. package/src/models/GetQuestion.ts +15 -0
  75. package/src/models/PostQuestionImportCommit.ts +116 -0
  76. package/src/models/PostQuestionImportCommitItem.ts +128 -0
  77. package/src/models/PostQuestionImportCommitResponse.ts +101 -0
  78. package/src/models/PostQuestionImportParseResponse.ts +142 -0
  79. package/src/models/QuestionImportCommitResult.ts +95 -0
  80. package/src/models/QuestionImportDraft.ts +142 -0
  81. package/src/models/QuestionImportDuplicate.ts +112 -0
  82. package/src/models/QuestionImportPreviewImage.ts +140 -0
  83. package/src/models/QuestionImportSource.ts +101 -0
  84. package/src/models/QuestionImportSourceSummary.ts +92 -0
  85. package/src/models/index.ts +10 -0
@@ -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;
@@ -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
+ }
@@ -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;