@easyedu/js-lsm-api 1.80.0 → 1.81.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 (91) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +11 -2
  3. package/dist/apis/RichTextApi.d.ts +67 -0
  4. package/dist/apis/RichTextApi.js +158 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/RichTextApi.d.ts +67 -0
  8. package/dist/esm/apis/RichTextApi.js +154 -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 -6
  12. package/dist/esm/models/GetQuestion.js +5 -4
  13. package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  14. package/dist/esm/models/GetQuestionAnswerChoicesInner.js +3 -2
  15. package/dist/esm/models/GetRichTextAssetUpload.d.ts +50 -0
  16. package/dist/esm/models/GetRichTextAssetUpload.js +55 -0
  17. package/dist/esm/models/PostQuestion.d.ts +7 -6
  18. package/dist/esm/models/PostQuestion.js +5 -4
  19. package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  20. package/dist/esm/models/PostQuestionAnswerChoicesInner.js +3 -2
  21. package/dist/esm/models/PostRichTextAssetComplete.d.ts +44 -0
  22. package/dist/esm/models/PostRichTextAssetComplete.js +47 -0
  23. package/dist/esm/models/PostRichTextAssetUpload.d.ts +69 -0
  24. package/dist/esm/models/PostRichTextAssetUpload.js +65 -0
  25. package/dist/esm/models/PutQuestion.d.ts +7 -6
  26. package/dist/esm/models/PutQuestion.js +5 -4
  27. package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  28. package/dist/esm/models/PutQuestionAnswerChoicesInner.js +3 -2
  29. package/dist/esm/models/RichTextAsset.d.ts +62 -0
  30. package/dist/esm/models/RichTextAsset.js +59 -0
  31. package/dist/esm/models/RichTextDocument.d.ts +60 -0
  32. package/dist/esm/models/RichTextDocument.js +62 -0
  33. package/dist/esm/models/RichTextInput.d.ts +47 -0
  34. package/dist/esm/models/RichTextInput.js +53 -0
  35. package/dist/esm/models/index.d.ts +6 -0
  36. package/dist/esm/models/index.js +6 -0
  37. package/dist/models/GetQuestion.d.ts +7 -6
  38. package/dist/models/GetQuestion.js +5 -4
  39. package/dist/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
  40. package/dist/models/GetQuestionAnswerChoicesInner.js +3 -2
  41. package/dist/models/GetRichTextAssetUpload.d.ts +50 -0
  42. package/dist/models/GetRichTextAssetUpload.js +62 -0
  43. package/dist/models/PostQuestion.d.ts +7 -6
  44. package/dist/models/PostQuestion.js +5 -4
  45. package/dist/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
  46. package/dist/models/PostQuestionAnswerChoicesInner.js +3 -2
  47. package/dist/models/PostRichTextAssetComplete.d.ts +44 -0
  48. package/dist/models/PostRichTextAssetComplete.js +54 -0
  49. package/dist/models/PostRichTextAssetUpload.d.ts +69 -0
  50. package/dist/models/PostRichTextAssetUpload.js +73 -0
  51. package/dist/models/PutQuestion.d.ts +7 -6
  52. package/dist/models/PutQuestion.js +5 -4
  53. package/dist/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
  54. package/dist/models/PutQuestionAnswerChoicesInner.js +3 -2
  55. package/dist/models/RichTextAsset.d.ts +62 -0
  56. package/dist/models/RichTextAsset.js +66 -0
  57. package/dist/models/RichTextDocument.d.ts +60 -0
  58. package/dist/models/RichTextDocument.js +70 -0
  59. package/dist/models/RichTextInput.d.ts +47 -0
  60. package/dist/models/RichTextInput.js +61 -0
  61. package/dist/models/index.d.ts +6 -0
  62. package/dist/models/index.js +6 -0
  63. package/docs/GetQuestion.md +2 -2
  64. package/docs/GetQuestionAnswerChoicesInner.md +1 -1
  65. package/docs/GetRichTextAssetUpload.md +40 -0
  66. package/docs/PostQuestion.md +2 -2
  67. package/docs/PostQuestionAnswerChoicesInner.md +1 -1
  68. package/docs/PostRichTextAssetComplete.md +38 -0
  69. package/docs/PostRichTextAssetUpload.md +44 -0
  70. package/docs/PutQuestion.md +2 -2
  71. package/docs/PutQuestionAnswerChoicesInner.md +1 -1
  72. package/docs/RichTextApi.md +212 -0
  73. package/docs/RichTextAsset.md +44 -0
  74. package/docs/RichTextDocument.md +40 -0
  75. package/docs/RichTextInput.md +36 -0
  76. package/package.json +1 -1
  77. package/src/apis/RichTextApi.ts +201 -0
  78. package/src/apis/index.ts +1 -0
  79. package/src/models/GetQuestion.ts +17 -10
  80. package/src/models/GetQuestionAnswerChoicesInner.ts +12 -4
  81. package/src/models/GetRichTextAssetUpload.ts +93 -0
  82. package/src/models/PostQuestion.ts +17 -10
  83. package/src/models/PostQuestionAnswerChoicesInner.ts +12 -4
  84. package/src/models/PostRichTextAssetComplete.ts +82 -0
  85. package/src/models/PostRichTextAssetUpload.ts +119 -0
  86. package/src/models/PutQuestion.ts +17 -10
  87. package/src/models/PutQuestionAnswerChoicesInner.ts +12 -4
  88. package/src/models/RichTextAsset.ts +109 -0
  89. package/src/models/RichTextDocument.ts +111 -0
  90. package/src/models/RichTextInput.ts +85 -0
  91. package/src/models/index.ts +6 -0
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RichTextDocumentFormatEnum = void 0;
17
+ exports.instanceOfRichTextDocument = instanceOfRichTextDocument;
18
+ exports.RichTextDocumentFromJSON = RichTextDocumentFromJSON;
19
+ exports.RichTextDocumentFromJSONTyped = RichTextDocumentFromJSONTyped;
20
+ exports.RichTextDocumentToJSON = RichTextDocumentToJSON;
21
+ exports.RichTextDocumentToJSONTyped = RichTextDocumentToJSONTyped;
22
+ const RichTextAsset_1 = require("./RichTextAsset");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.RichTextDocumentFormatEnum = {
27
+ TiptapV2: 'tiptap-v2'
28
+ };
29
+ /**
30
+ * Check if a given object implements the RichTextDocument interface.
31
+ */
32
+ function instanceOfRichTextDocument(value) {
33
+ if (!('format' in value) || value['format'] === undefined)
34
+ return false;
35
+ if (!('document' in value) || value['document'] === undefined)
36
+ return false;
37
+ if (!('plainText' in value) || value['plainText'] === undefined)
38
+ return false;
39
+ if (!('assets' in value) || value['assets'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function RichTextDocumentFromJSON(json) {
44
+ return RichTextDocumentFromJSONTyped(json, false);
45
+ }
46
+ function RichTextDocumentFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'format': json['format'],
52
+ 'document': json['document'],
53
+ 'plainText': json['plain_text'],
54
+ 'assets': (json['assets'].map(RichTextAsset_1.RichTextAssetFromJSON)),
55
+ };
56
+ }
57
+ function RichTextDocumentToJSON(json) {
58
+ return RichTextDocumentToJSONTyped(json, false);
59
+ }
60
+ function RichTextDocumentToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'format': value['format'],
66
+ 'document': value['document'],
67
+ 'plain_text': value['plainText'],
68
+ 'assets': (value['assets'].map(RichTextAsset_1.RichTextAssetToJSON)),
69
+ };
70
+ }
@@ -0,0 +1,47 @@
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 RichTextInput
16
+ */
17
+ export interface RichTextInput {
18
+ /**
19
+ * Rich text document format
20
+ * @type {RichTextInputFormatEnum}
21
+ * @memberof RichTextInput
22
+ */
23
+ format: RichTextInputFormatEnum;
24
+ /**
25
+ * TipTap/ProseMirror JSON document
26
+ * @type {{ [key: string]: any; }}
27
+ * @memberof RichTextInput
28
+ */
29
+ document: {
30
+ [key: string]: any;
31
+ };
32
+ }
33
+ /**
34
+ * @export
35
+ */
36
+ export declare const RichTextInputFormatEnum: {
37
+ readonly TiptapV2: "tiptap-v2";
38
+ };
39
+ export type RichTextInputFormatEnum = typeof RichTextInputFormatEnum[keyof typeof RichTextInputFormatEnum];
40
+ /**
41
+ * Check if a given object implements the RichTextInput interface.
42
+ */
43
+ export declare function instanceOfRichTextInput(value: object): value is RichTextInput;
44
+ export declare function RichTextInputFromJSON(json: any): RichTextInput;
45
+ export declare function RichTextInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): RichTextInput;
46
+ export declare function RichTextInputToJSON(json: any): RichTextInput;
47
+ export declare function RichTextInputToJSONTyped(value?: RichTextInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
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.RichTextInputFormatEnum = void 0;
17
+ exports.instanceOfRichTextInput = instanceOfRichTextInput;
18
+ exports.RichTextInputFromJSON = RichTextInputFromJSON;
19
+ exports.RichTextInputFromJSONTyped = RichTextInputFromJSONTyped;
20
+ exports.RichTextInputToJSON = RichTextInputToJSON;
21
+ exports.RichTextInputToJSONTyped = RichTextInputToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.RichTextInputFormatEnum = {
26
+ TiptapV2: 'tiptap-v2'
27
+ };
28
+ /**
29
+ * Check if a given object implements the RichTextInput interface.
30
+ */
31
+ function instanceOfRichTextInput(value) {
32
+ if (!('format' in value) || value['format'] === undefined)
33
+ return false;
34
+ if (!('document' in value) || value['document'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function RichTextInputFromJSON(json) {
39
+ return RichTextInputFromJSONTyped(json, false);
40
+ }
41
+ function RichTextInputFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'format': json['format'],
47
+ 'document': json['document'],
48
+ };
49
+ }
50
+ function RichTextInputToJSON(json) {
51
+ return RichTextInputToJSONTyped(json, false);
52
+ }
53
+ function RichTextInputToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'format': value['format'],
59
+ 'document': value['document'],
60
+ };
61
+ }
@@ -137,6 +137,7 @@ export * from './GetQuizResultsQuestionsInnerStudentAnswer';
137
137
  export * from './GetQuizResultsScore';
138
138
  export * from './GetQuizResultsTiming';
139
139
  export * from './GetQuizStatistics';
140
+ export * from './GetRichTextAssetUpload';
140
141
  export * from './GetRole';
141
142
  export * from './GetScormApiLogItem';
142
143
  export * from './GetScormApiLogs';
@@ -234,6 +235,8 @@ export * from './PostQuizQuestionsQuestionsInner';
234
235
  export * from './PostQuizSettings';
235
236
  export * from './PostResetPassword';
236
237
  export * from './PostRevokeCertificate';
238
+ export * from './PostRichTextAssetComplete';
239
+ export * from './PostRichTextAssetUpload';
237
240
  export * from './PostRole';
238
241
  export * from './PostSendResetPassword';
239
242
  export * from './PostSignupRequest';
@@ -270,6 +273,9 @@ export * from './PutUser';
270
273
  export * from './QuizContent';
271
274
  export * from './QuizContentAssignment';
272
275
  export * from './QuizContentSettings';
276
+ export * from './RichTextAsset';
277
+ export * from './RichTextDocument';
278
+ export * from './RichTextInput';
273
279
  export * from './SCORMContent';
274
280
  export * from './ScormGetValueResponse';
275
281
  export * from './ScormSessionData';
@@ -155,6 +155,7 @@ __exportStar(require("./GetQuizResultsQuestionsInnerStudentAnswer"), exports);
155
155
  __exportStar(require("./GetQuizResultsScore"), exports);
156
156
  __exportStar(require("./GetQuizResultsTiming"), exports);
157
157
  __exportStar(require("./GetQuizStatistics"), exports);
158
+ __exportStar(require("./GetRichTextAssetUpload"), exports);
158
159
  __exportStar(require("./GetRole"), exports);
159
160
  __exportStar(require("./GetScormApiLogItem"), exports);
160
161
  __exportStar(require("./GetScormApiLogs"), exports);
@@ -252,6 +253,8 @@ __exportStar(require("./PostQuizQuestionsQuestionsInner"), exports);
252
253
  __exportStar(require("./PostQuizSettings"), exports);
253
254
  __exportStar(require("./PostResetPassword"), exports);
254
255
  __exportStar(require("./PostRevokeCertificate"), exports);
256
+ __exportStar(require("./PostRichTextAssetComplete"), exports);
257
+ __exportStar(require("./PostRichTextAssetUpload"), exports);
255
258
  __exportStar(require("./PostRole"), exports);
256
259
  __exportStar(require("./PostSendResetPassword"), exports);
257
260
  __exportStar(require("./PostSignupRequest"), exports);
@@ -288,6 +291,9 @@ __exportStar(require("./PutUser"), exports);
288
291
  __exportStar(require("./QuizContent"), exports);
289
292
  __exportStar(require("./QuizContentAssignment"), exports);
290
293
  __exportStar(require("./QuizContentSettings"), exports);
294
+ __exportStar(require("./RichTextAsset"), exports);
295
+ __exportStar(require("./RichTextDocument"), exports);
296
+ __exportStar(require("./RichTextInput"), exports);
291
297
  __exportStar(require("./SCORMContent"), exports);
292
298
  __exportStar(require("./ScormGetValueResponse"), exports);
293
299
  __exportStar(require("./ScormSessionData"), exports);
@@ -7,11 +7,11 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `questionText` | string
10
+ `questionText` | [RichTextDocument](RichTextDocument.md)
11
11
  `questionType` | string
12
12
  `answerChoices` | [Array<GetQuestionAnswerChoicesInner>](GetQuestionAnswerChoicesInner.md)
13
13
  `correctAnswer` | string
14
- `explanation` | string
14
+ `explanation` | [RichTextDocument](RichTextDocument.md)
15
15
  `topic` | string
16
16
  `difficultyLevel` | string
17
17
  `tags` | Array<string>
@@ -7,7 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `text` | string
10
+ `text` | [RichTextDocument](RichTextDocument.md)
11
11
  `isCorrect` | boolean
12
12
 
13
13
  ## Example
@@ -0,0 +1,40 @@
1
+
2
+ # GetRichTextAssetUpload
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `assetId` | string
10
+ `uploadUrl` | string
11
+ `renderUrl` | string
12
+ `expiresInSeconds` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { GetRichTextAssetUpload } from '@easyedu/js-lsm-api'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "assetId": null,
22
+ "uploadUrl": null,
23
+ "renderUrl": null,
24
+ "expiresInSeconds": null,
25
+ } satisfies GetRichTextAssetUpload
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as GetRichTextAssetUpload
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -6,11 +6,11 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `questionText` | string
9
+ `questionText` | [RichTextInput](RichTextInput.md)
10
10
  `questionType` | string
11
11
  `answerChoices` | [Array<PostQuestionAnswerChoicesInner>](PostQuestionAnswerChoicesInner.md)
12
12
  `correctAnswer` | string
13
- `explanation` | string
13
+ `explanation` | [RichTextInput](RichTextInput.md)
14
14
  `topic` | string
15
15
  `difficultyLevel` | string
16
16
  `tags` | Array<string>
@@ -6,7 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `text` | string
9
+ `text` | [RichTextInput](RichTextInput.md)
10
10
  `isCorrect` | boolean
11
11
 
12
12
  ## Example
@@ -0,0 +1,38 @@
1
+
2
+ # PostRichTextAssetComplete
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `byteSize` | number
10
+ `width` | number
11
+ `height` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { PostRichTextAssetComplete } from '@easyedu/js-lsm-api'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "byteSize": null,
21
+ "width": null,
22
+ "height": null,
23
+ } satisfies PostRichTextAssetComplete
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as PostRichTextAssetComplete
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -0,0 +1,44 @@
1
+
2
+ # PostRichTextAssetUpload
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `filename` | string
10
+ `mimeType` | string
11
+ `byteSize` | number
12
+ `width` | number
13
+ `height` | number
14
+ `usageContext` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { PostRichTextAssetUpload } from '@easyedu/js-lsm-api'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "filename": null,
24
+ "mimeType": null,
25
+ "byteSize": null,
26
+ "width": null,
27
+ "height": null,
28
+ "usageContext": null,
29
+ } satisfies PostRichTextAssetUpload
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as PostRichTextAssetUpload
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
+
44
+
@@ -6,11 +6,11 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `questionText` | string
9
+ `questionText` | [RichTextInput](RichTextInput.md)
10
10
  `questionType` | string
11
11
  `answerChoices` | [Array<PutQuestionAnswerChoicesInner>](PutQuestionAnswerChoicesInner.md)
12
12
  `correctAnswer` | string
13
- `explanation` | string
13
+ `explanation` | [RichTextInput](RichTextInput.md)
14
14
  `topic` | string
15
15
  `difficultyLevel` | string
16
16
  `tags` | Array<string>
@@ -7,7 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `text` | string
10
+ `text` | [RichTextInput](RichTextInput.md)
11
11
  `isCorrect` | boolean
12
12
 
13
13
  ## Example
@@ -0,0 +1,212 @@
1
+ # RichTextApi
2
+
3
+ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**getRichTextAsset**](RichTextApi.md#getrichtextasset) | **GET** /rich-text/assets/{assetId} | Redirect to a signed rich text asset URL |
8
+ | [**postRichTextAssetComplete**](RichTextApi.md#postrichtextassetcomplete) | **POST** /rich-text/assets/{assetId}/complete | Complete a pending rich text asset upload |
9
+ | [**postRichTextAssetUpload**](RichTextApi.md#postrichtextassetupload) | **POST** /rich-text/assets/uploads | Create a pending rich text asset upload |
10
+
11
+
12
+
13
+ ## getRichTextAsset
14
+
15
+ > getRichTextAsset(assetId)
16
+
17
+ Redirect to a signed rich text asset URL
18
+
19
+ ### Example
20
+
21
+ ```ts
22
+ import {
23
+ Configuration,
24
+ RichTextApi,
25
+ } from '@easyedu/js-lsm-api';
26
+ import type { GetRichTextAssetRequest } from '@easyedu/js-lsm-api';
27
+
28
+ async function example() {
29
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
30
+ const api = new RichTextApi();
31
+
32
+ const body = {
33
+ // string
34
+ assetId: assetId_example,
35
+ } satisfies GetRichTextAssetRequest;
36
+
37
+ try {
38
+ const data = await api.getRichTextAsset(body);
39
+ console.log(data);
40
+ } catch (error) {
41
+ console.error(error);
42
+ }
43
+ }
44
+
45
+ // Run the test
46
+ example().catch(console.error);
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+
52
+ | Name | Type | Description | Notes |
53
+ |------------- | ------------- | ------------- | -------------|
54
+ | **assetId** | `string` | | [Defaults to `undefined`] |
55
+
56
+ ### Return type
57
+
58
+ `void` (Empty response body)
59
+
60
+ ### Authorization
61
+
62
+ No authorization required
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: Not defined
67
+ - **Accept**: Not defined
68
+
69
+
70
+ ### HTTP response details
71
+ | Status code | Description | Response headers |
72
+ |-------------|-------------|------------------|
73
+ | **302** | redirect to signed asset URL | - |
74
+ | **404** | rich text asset not found | - |
75
+
76
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
77
+
78
+
79
+ ## postRichTextAssetComplete
80
+
81
+ > RichTextAsset postRichTextAssetComplete(assetId, postRichTextAssetComplete)
82
+
83
+ Complete a pending rich text asset upload
84
+
85
+ ### Example
86
+
87
+ ```ts
88
+ import {
89
+ Configuration,
90
+ RichTextApi,
91
+ } from '@easyedu/js-lsm-api';
92
+ import type { PostRichTextAssetCompleteRequest } from '@easyedu/js-lsm-api';
93
+
94
+ async function example() {
95
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
96
+ const api = new RichTextApi();
97
+
98
+ const body = {
99
+ // string
100
+ assetId: assetId_example,
101
+ // PostRichTextAssetComplete
102
+ postRichTextAssetComplete: ...,
103
+ } satisfies PostRichTextAssetCompleteRequest;
104
+
105
+ try {
106
+ const data = await api.postRichTextAssetComplete(body);
107
+ console.log(data);
108
+ } catch (error) {
109
+ console.error(error);
110
+ }
111
+ }
112
+
113
+ // Run the test
114
+ example().catch(console.error);
115
+ ```
116
+
117
+ ### Parameters
118
+
119
+
120
+ | Name | Type | Description | Notes |
121
+ |------------- | ------------- | ------------- | -------------|
122
+ | **assetId** | `string` | | [Defaults to `undefined`] |
123
+ | **postRichTextAssetComplete** | [PostRichTextAssetComplete](PostRichTextAssetComplete.md) | | |
124
+
125
+ ### Return type
126
+
127
+ [**RichTextAsset**](RichTextAsset.md)
128
+
129
+ ### Authorization
130
+
131
+ No authorization required
132
+
133
+ ### HTTP request headers
134
+
135
+ - **Content-Type**: `application/json`
136
+ - **Accept**: `application/json`
137
+
138
+
139
+ ### HTTP response details
140
+ | Status code | Description | Response headers |
141
+ |-------------|-------------|------------------|
142
+ | **200** | rich text asset completed | - |
143
+ | **404** | rich text asset not found | - |
144
+
145
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
146
+
147
+
148
+ ## postRichTextAssetUpload
149
+
150
+ > GetRichTextAssetUpload postRichTextAssetUpload(postRichTextAssetUpload)
151
+
152
+ Create a pending rich text asset upload
153
+
154
+ ### Example
155
+
156
+ ```ts
157
+ import {
158
+ Configuration,
159
+ RichTextApi,
160
+ } from '@easyedu/js-lsm-api';
161
+ import type { PostRichTextAssetUploadRequest } from '@easyedu/js-lsm-api';
162
+
163
+ async function example() {
164
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
165
+ const api = new RichTextApi();
166
+
167
+ const body = {
168
+ // PostRichTextAssetUpload
169
+ postRichTextAssetUpload: ...,
170
+ } satisfies PostRichTextAssetUploadRequest;
171
+
172
+ try {
173
+ const data = await api.postRichTextAssetUpload(body);
174
+ console.log(data);
175
+ } catch (error) {
176
+ console.error(error);
177
+ }
178
+ }
179
+
180
+ // Run the test
181
+ example().catch(console.error);
182
+ ```
183
+
184
+ ### Parameters
185
+
186
+
187
+ | Name | Type | Description | Notes |
188
+ |------------- | ------------- | ------------- | -------------|
189
+ | **postRichTextAssetUpload** | [PostRichTextAssetUpload](PostRichTextAssetUpload.md) | | |
190
+
191
+ ### Return type
192
+
193
+ [**GetRichTextAssetUpload**](GetRichTextAssetUpload.md)
194
+
195
+ ### Authorization
196
+
197
+ No authorization required
198
+
199
+ ### HTTP request headers
200
+
201
+ - **Content-Type**: `application/json`
202
+ - **Accept**: `application/json`
203
+
204
+
205
+ ### HTTP response details
206
+ | Status code | Description | Response headers |
207
+ |-------------|-------------|------------------|
208
+ | **200** | rich text asset upload created | - |
209
+ | **400** | invalid asset upload request | - |
210
+
211
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
212
+
@@ -0,0 +1,44 @@
1
+
2
+ # RichTextAsset
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `mimeType` | string
11
+ `byteSize` | number
12
+ `width` | number
13
+ `height` | number
14
+ `renderUrl` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { RichTextAsset } from '@easyedu/js-lsm-api'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "id": null,
24
+ "mimeType": null,
25
+ "byteSize": null,
26
+ "width": null,
27
+ "height": null,
28
+ "renderUrl": null,
29
+ } satisfies RichTextAsset
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as RichTextAsset
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
+
44
+