@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,58 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PostQuestionImportCommitItem } from './PostQuestionImportCommitItem';
13
+ import type { QuestionImportPreviewImage } from './QuestionImportPreviewImage';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface PostQuestionImportCommit
18
+ */
19
+ export interface PostQuestionImportCommit {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof PostQuestionImportCommit
24
+ */
25
+ importToken: string;
26
+ /**
27
+ *
28
+ * @type {string}
29
+ * @memberof PostQuestionImportCommit
30
+ */
31
+ sourceLabel: string;
32
+ /**
33
+ * Tags applied to every created question in addition to per-question tags
34
+ * @type {Array<string>}
35
+ * @memberof PostQuestionImportCommit
36
+ */
37
+ tags?: Array<string>;
38
+ /**
39
+ *
40
+ * @type {Array<PostQuestionImportCommitItem>}
41
+ * @memberof PostQuestionImportCommit
42
+ */
43
+ questions: Array<PostQuestionImportCommitItem>;
44
+ /**
45
+ *
46
+ * @type {Array<QuestionImportPreviewImage>}
47
+ * @memberof PostQuestionImportCommit
48
+ */
49
+ images: Array<QuestionImportPreviewImage>;
50
+ }
51
+ /**
52
+ * Check if a given object implements the PostQuestionImportCommit interface.
53
+ */
54
+ export declare function instanceOfPostQuestionImportCommit(value: object): value is PostQuestionImportCommit;
55
+ export declare function PostQuestionImportCommitFromJSON(json: any): PostQuestionImportCommit;
56
+ export declare function PostQuestionImportCommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostQuestionImportCommit;
57
+ export declare function PostQuestionImportCommitToJSON(json: any): PostQuestionImportCommit;
58
+ export declare function PostQuestionImportCommitToJSONTyped(value?: PostQuestionImportCommit | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.instanceOfPostQuestionImportCommit = instanceOfPostQuestionImportCommit;
17
+ exports.PostQuestionImportCommitFromJSON = PostQuestionImportCommitFromJSON;
18
+ exports.PostQuestionImportCommitFromJSONTyped = PostQuestionImportCommitFromJSONTyped;
19
+ exports.PostQuestionImportCommitToJSON = PostQuestionImportCommitToJSON;
20
+ exports.PostQuestionImportCommitToJSONTyped = PostQuestionImportCommitToJSONTyped;
21
+ const PostQuestionImportCommitItem_1 = require("./PostQuestionImportCommitItem");
22
+ const QuestionImportPreviewImage_1 = require("./QuestionImportPreviewImage");
23
+ /**
24
+ * Check if a given object implements the PostQuestionImportCommit interface.
25
+ */
26
+ function instanceOfPostQuestionImportCommit(value) {
27
+ if (!('importToken' in value) || value['importToken'] === undefined)
28
+ return false;
29
+ if (!('sourceLabel' in value) || value['sourceLabel'] === undefined)
30
+ return false;
31
+ if (!('questions' in value) || value['questions'] === undefined)
32
+ return false;
33
+ if (!('images' in value) || value['images'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function PostQuestionImportCommitFromJSON(json) {
38
+ return PostQuestionImportCommitFromJSONTyped(json, false);
39
+ }
40
+ function PostQuestionImportCommitFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'importToken': json['import_token'],
46
+ 'sourceLabel': json['source_label'],
47
+ 'tags': json['tags'] == null ? undefined : json['tags'],
48
+ 'questions': (json['questions'].map(PostQuestionImportCommitItem_1.PostQuestionImportCommitItemFromJSON)),
49
+ 'images': (json['images'].map(QuestionImportPreviewImage_1.QuestionImportPreviewImageFromJSON)),
50
+ };
51
+ }
52
+ function PostQuestionImportCommitToJSON(json) {
53
+ return PostQuestionImportCommitToJSONTyped(json, false);
54
+ }
55
+ function PostQuestionImportCommitToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'import_token': value['importToken'],
61
+ 'source_label': value['sourceLabel'],
62
+ 'tags': value['tags'],
63
+ 'questions': (value['questions'].map(PostQuestionImportCommitItem_1.PostQuestionImportCommitItemToJSON)),
64
+ 'images': (value['images'].map(QuestionImportPreviewImage_1.QuestionImportPreviewImageToJSON)),
65
+ };
66
+ }
@@ -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,74 @@
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.PostQuestionImportCommitItemActionEnum = void 0;
17
+ exports.instanceOfPostQuestionImportCommitItem = instanceOfPostQuestionImportCommitItem;
18
+ exports.PostQuestionImportCommitItemFromJSON = PostQuestionImportCommitItemFromJSON;
19
+ exports.PostQuestionImportCommitItemFromJSONTyped = PostQuestionImportCommitItemFromJSONTyped;
20
+ exports.PostQuestionImportCommitItemToJSON = PostQuestionImportCommitItemToJSON;
21
+ exports.PostQuestionImportCommitItemToJSONTyped = PostQuestionImportCommitItemToJSONTyped;
22
+ const PostQuestion_1 = require("./PostQuestion");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.PostQuestionImportCommitItemActionEnum = {
27
+ Create: 'create',
28
+ CreateVersion: 'create_version',
29
+ Skip: 'skip'
30
+ };
31
+ /**
32
+ * Check if a given object implements the PostQuestionImportCommitItem interface.
33
+ */
34
+ function instanceOfPostQuestionImportCommitItem(value) {
35
+ if (!('draftId' in value) || value['draftId'] === undefined)
36
+ return false;
37
+ if (!('action' in value) || value['action'] === undefined)
38
+ return false;
39
+ if (!('question' in value) || value['question'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function PostQuestionImportCommitItemFromJSON(json) {
44
+ return PostQuestionImportCommitItemFromJSONTyped(json, false);
45
+ }
46
+ function PostQuestionImportCommitItemFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'draftId': json['draft_id'],
52
+ 'action': json['action'],
53
+ 'targetQuestionId': json['target_question_id'] == null ? undefined : json['target_question_id'],
54
+ 'sourceKey': json['source_key'] == null ? undefined : json['source_key'],
55
+ 'sourceLocation': json['source_location'] == null ? undefined : json['source_location'],
56
+ 'question': (0, PostQuestion_1.PostQuestionFromJSON)(json['question']),
57
+ };
58
+ }
59
+ function PostQuestionImportCommitItemToJSON(json) {
60
+ return PostQuestionImportCommitItemToJSONTyped(json, false);
61
+ }
62
+ function PostQuestionImportCommitItemToJSONTyped(value, ignoreDiscriminator = false) {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+ return {
67
+ 'draft_id': value['draftId'],
68
+ 'action': value['action'],
69
+ 'target_question_id': value['targetQuestionId'],
70
+ 'source_key': value['sourceKey'],
71
+ 'source_location': value['sourceLocation'],
72
+ 'question': (0, PostQuestion_1.PostQuestionToJSON)(value['question']),
73
+ };
74
+ }
@@ -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,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
+ }
@@ -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
+ }