@easyedu/js-lsm-api 1.79.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.
- package/.openapi-generator/FILES +26 -0
- package/README.md +18 -2
- package/dist/apis/RichTextApi.d.ts +67 -0
- package/dist/apis/RichTextApi.js +158 -0
- package/dist/apis/UserApi.d.ts +42 -0
- package/dist/apis/UserApi.js +79 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/RichTextApi.d.ts +67 -0
- package/dist/esm/apis/RichTextApi.js +154 -0
- package/dist/esm/apis/UserApi.d.ts +42 -0
- package/dist/esm/apis/UserApi.js +78 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetQuestion.d.ts +7 -6
- package/dist/esm/models/GetQuestion.js +5 -4
- package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/GetQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/GetRichTextAssetUpload.d.ts +50 -0
- package/dist/esm/models/GetRichTextAssetUpload.js +55 -0
- package/dist/esm/models/GetUserCourseList.d.ts +57 -0
- package/dist/esm/models/GetUserCourseList.js +60 -0
- package/dist/esm/models/GetUserCourseListItem.d.ts +54 -0
- package/dist/esm/models/GetUserCourseListItem.js +59 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.d.ts +74 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.js +75 -0
- package/dist/esm/models/GetUserCourseListItemCourse.d.ts +89 -0
- package/dist/esm/models/GetUserCourseListItemCourse.js +82 -0
- package/dist/esm/models/GetUserCourseListItemEnrollment.d.ts +111 -0
- package/dist/esm/models/GetUserCourseListItemEnrollment.js +105 -0
- package/dist/esm/models/GetUserCourseListItemProgress.d.ts +44 -0
- package/dist/esm/models/GetUserCourseListItemProgress.js +51 -0
- package/dist/esm/models/PostQuestion.d.ts +7 -6
- package/dist/esm/models/PostQuestion.js +5 -4
- package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/PostQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/PostRichTextAssetComplete.d.ts +44 -0
- package/dist/esm/models/PostRichTextAssetComplete.js +47 -0
- package/dist/esm/models/PostRichTextAssetUpload.d.ts +69 -0
- package/dist/esm/models/PostRichTextAssetUpload.js +65 -0
- package/dist/esm/models/PutQuestion.d.ts +7 -6
- package/dist/esm/models/PutQuestion.js +5 -4
- package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/esm/models/PutQuestionAnswerChoicesInner.js +3 -2
- package/dist/esm/models/RichTextAsset.d.ts +62 -0
- package/dist/esm/models/RichTextAsset.js +59 -0
- package/dist/esm/models/RichTextDocument.d.ts +60 -0
- package/dist/esm/models/RichTextDocument.js +62 -0
- package/dist/esm/models/RichTextInput.d.ts +47 -0
- package/dist/esm/models/RichTextInput.js +53 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/GetQuestion.d.ts +7 -6
- package/dist/models/GetQuestion.js +5 -4
- package/dist/models/GetQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/GetQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/GetRichTextAssetUpload.d.ts +50 -0
- package/dist/models/GetRichTextAssetUpload.js +62 -0
- package/dist/models/GetUserCourseList.d.ts +57 -0
- package/dist/models/GetUserCourseList.js +67 -0
- package/dist/models/GetUserCourseListItem.d.ts +54 -0
- package/dist/models/GetUserCourseListItem.js +66 -0
- package/dist/models/GetUserCourseListItemCertificate.d.ts +74 -0
- package/dist/models/GetUserCourseListItemCertificate.js +83 -0
- package/dist/models/GetUserCourseListItemCourse.d.ts +89 -0
- package/dist/models/GetUserCourseListItemCourse.js +90 -0
- package/dist/models/GetUserCourseListItemEnrollment.d.ts +111 -0
- package/dist/models/GetUserCourseListItemEnrollment.js +113 -0
- package/dist/models/GetUserCourseListItemProgress.d.ts +44 -0
- package/dist/models/GetUserCourseListItemProgress.js +58 -0
- package/dist/models/PostQuestion.d.ts +7 -6
- package/dist/models/PostQuestion.js +5 -4
- package/dist/models/PostQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/PostQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/PostRichTextAssetComplete.d.ts +44 -0
- package/dist/models/PostRichTextAssetComplete.js +54 -0
- package/dist/models/PostRichTextAssetUpload.d.ts +69 -0
- package/dist/models/PostRichTextAssetUpload.js +73 -0
- package/dist/models/PutQuestion.d.ts +7 -6
- package/dist/models/PutQuestion.js +5 -4
- package/dist/models/PutQuestionAnswerChoicesInner.d.ts +3 -2
- package/dist/models/PutQuestionAnswerChoicesInner.js +3 -2
- package/dist/models/RichTextAsset.d.ts +62 -0
- package/dist/models/RichTextAsset.js +66 -0
- package/dist/models/RichTextDocument.d.ts +60 -0
- package/dist/models/RichTextDocument.js +70 -0
- package/dist/models/RichTextInput.d.ts +47 -0
- package/dist/models/RichTextInput.js +61 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/GetQuestion.md +2 -2
- package/docs/GetQuestionAnswerChoicesInner.md +1 -1
- package/docs/GetRichTextAssetUpload.md +40 -0
- package/docs/GetUserCourseList.md +43 -0
- package/docs/GetUserCourseListItem.md +41 -0
- package/docs/GetUserCourseListItemCertificate.md +43 -0
- package/docs/GetUserCourseListItemCourse.md +51 -0
- package/docs/GetUserCourseListItemEnrollment.md +49 -0
- package/docs/GetUserCourseListItemProgress.md +39 -0
- package/docs/PostQuestion.md +2 -2
- package/docs/PostQuestionAnswerChoicesInner.md +1 -1
- package/docs/PostRichTextAssetComplete.md +38 -0
- package/docs/PostRichTextAssetUpload.md +44 -0
- package/docs/PutQuestion.md +2 -2
- package/docs/PutQuestionAnswerChoicesInner.md +1 -1
- package/docs/RichTextApi.md +212 -0
- package/docs/RichTextAsset.md +44 -0
- package/docs/RichTextDocument.md +40 -0
- package/docs/RichTextInput.md +36 -0
- package/docs/UserApi.md +90 -0
- package/package.json +1 -1
- package/src/apis/RichTextApi.ts +201 -0
- package/src/apis/UserApi.ts +108 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetQuestion.ts +17 -10
- package/src/models/GetQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/GetRichTextAssetUpload.ts +93 -0
- package/src/models/GetUserCourseList.ts +110 -0
- package/src/models/GetUserCourseListItem.ts +122 -0
- package/src/models/GetUserCourseListItemCertificate.ts +124 -0
- package/src/models/GetUserCourseListItemCourse.ts +149 -0
- package/src/models/GetUserCourseListItemEnrollment.ts +171 -0
- package/src/models/GetUserCourseListItemProgress.ts +84 -0
- package/src/models/PostQuestion.ts +17 -10
- package/src/models/PostQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/PostRichTextAssetComplete.ts +82 -0
- package/src/models/PostRichTextAssetUpload.ts +119 -0
- package/src/models/PutQuestion.ts +17 -10
- package/src/models/PutQuestionAnswerChoicesInner.ts +12 -4
- package/src/models/RichTextAsset.ts +109 -0
- package/src/models/RichTextDocument.ts +111 -0
- package/src/models/RichTextInput.ts +85 -0
- package/src/models/index.ts +12 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseList
|
|
3
|
+
|
|
4
|
+
A paginated list of courses the target user is enrolled in.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`page` | number
|
|
11
|
+
`pageSize` | number
|
|
12
|
+
`totalPages` | number
|
|
13
|
+
`totalItems` | number
|
|
14
|
+
`items` | [Array<GetUserCourseListItem>](GetUserCourseListItem.md)
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { GetUserCourseList } from '@easyedu/js-lsm-api'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"page": null,
|
|
24
|
+
"pageSize": null,
|
|
25
|
+
"totalPages": null,
|
|
26
|
+
"totalItems": null,
|
|
27
|
+
"items": null,
|
|
28
|
+
} satisfies GetUserCourseList
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseList
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseListItem
|
|
3
|
+
|
|
4
|
+
A course the target user is enrolled in, grouped by course and selected enrollment.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`course` | [GetUserCourseListItemCourse](GetUserCourseListItemCourse.md)
|
|
11
|
+
`enrollment` | [GetUserCourseListItemEnrollment](GetUserCourseListItemEnrollment.md)
|
|
12
|
+
`progress` | [GetUserCourseListItemProgress](GetUserCourseListItemProgress.md)
|
|
13
|
+
`certificate` | [GetUserCourseListItemCertificate](GetUserCourseListItemCertificate.md)
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { GetUserCourseListItem } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"course": null,
|
|
23
|
+
"enrollment": null,
|
|
24
|
+
"progress": null,
|
|
25
|
+
"certificate": null,
|
|
26
|
+
} satisfies GetUserCourseListItem
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseListItem
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseListItemCertificate
|
|
3
|
+
|
|
4
|
+
Latest certificate for the learner and course, if one exists.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`status` | string
|
|
12
|
+
`issuedAt` | number
|
|
13
|
+
`expiresAt` | number
|
|
14
|
+
`issuanceReason` | string
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { GetUserCourseListItemCertificate } from '@easyedu/js-lsm-api'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"id": null,
|
|
24
|
+
"status": null,
|
|
25
|
+
"issuedAt": null,
|
|
26
|
+
"expiresAt": null,
|
|
27
|
+
"issuanceReason": null,
|
|
28
|
+
} satisfies GetUserCourseListItemCertificate
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseListItemCertificate
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseListItemCourse
|
|
3
|
+
|
|
4
|
+
Course fields for an enrolled user\'s course list item.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`description` | string
|
|
13
|
+
`imageUrl` | string
|
|
14
|
+
`published` | boolean
|
|
15
|
+
`createdAt` | number
|
|
16
|
+
`accessPolicyType` | string
|
|
17
|
+
`accessDurationDays` | number
|
|
18
|
+
`accessFixedEndAt` | number
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { GetUserCourseListItemCourse } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"name": null,
|
|
29
|
+
"description": null,
|
|
30
|
+
"imageUrl": null,
|
|
31
|
+
"published": null,
|
|
32
|
+
"createdAt": null,
|
|
33
|
+
"accessPolicyType": null,
|
|
34
|
+
"accessDurationDays": null,
|
|
35
|
+
"accessFixedEndAt": null,
|
|
36
|
+
} satisfies GetUserCourseListItemCourse
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseListItemCourse
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseListItemEnrollment
|
|
3
|
+
|
|
4
|
+
Selected enrollment fields for an enrolled user\'s course list item.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`status` | string
|
|
12
|
+
`accessState` | string
|
|
13
|
+
`daysUntilExpiry` | number
|
|
14
|
+
`userType` | string
|
|
15
|
+
`enrollmentDateStart` | number
|
|
16
|
+
`enrollmentDateEnd` | number
|
|
17
|
+
`completionDate` | number
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { GetUserCourseListItemEnrollment } from '@easyedu/js-lsm-api'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"id": null,
|
|
27
|
+
"status": null,
|
|
28
|
+
"accessState": null,
|
|
29
|
+
"daysUntilExpiry": null,
|
|
30
|
+
"userType": null,
|
|
31
|
+
"enrollmentDateStart": null,
|
|
32
|
+
"enrollmentDateEnd": null,
|
|
33
|
+
"completionDate": null,
|
|
34
|
+
} satisfies GetUserCourseListItemEnrollment
|
|
35
|
+
|
|
36
|
+
console.log(example)
|
|
37
|
+
|
|
38
|
+
// Convert the instance to a JSON string
|
|
39
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
40
|
+
console.log(exampleJSON)
|
|
41
|
+
|
|
42
|
+
// Parse the JSON string back to an object
|
|
43
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseListItemEnrollment
|
|
44
|
+
console.log(exampleParsed)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# GetUserCourseListItemProgress
|
|
3
|
+
|
|
4
|
+
Learner progress for an enrolled user\'s course list item.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`completionPercentage` | number
|
|
11
|
+
`completedContentCount` | number
|
|
12
|
+
`totalContentCount` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { GetUserCourseListItemProgress } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"completionPercentage": null,
|
|
22
|
+
"completedContentCount": null,
|
|
23
|
+
"totalContentCount": null,
|
|
24
|
+
} satisfies GetUserCourseListItemProgress
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetUserCourseListItemProgress
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/docs/PostQuestion.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`questionText` |
|
|
9
|
+
`questionText` | [RichTextInput](RichTextInput.md)
|
|
10
10
|
`questionType` | string
|
|
11
11
|
`answerChoices` | [Array<PostQuestionAnswerChoicesInner>](PostQuestionAnswerChoicesInner.md)
|
|
12
12
|
`correctAnswer` | string
|
|
13
|
-
`explanation` |
|
|
13
|
+
`explanation` | [RichTextInput](RichTextInput.md)
|
|
14
14
|
`topic` | string
|
|
15
15
|
`difficultyLevel` | string
|
|
16
16
|
`tags` | Array<string>
|
|
@@ -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
|
+
|
package/docs/PutQuestion.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`questionText` |
|
|
9
|
+
`questionText` | [RichTextInput](RichTextInput.md)
|
|
10
10
|
`questionType` | string
|
|
11
11
|
`answerChoices` | [Array<PutQuestionAnswerChoicesInner>](PutQuestionAnswerChoicesInner.md)
|
|
12
12
|
`correctAnswer` | string
|
|
13
|
-
`explanation` |
|
|
13
|
+
`explanation` | [RichTextInput](RichTextInput.md)
|
|
14
14
|
`topic` | string
|
|
15
15
|
`difficultyLevel` | string
|
|
16
16
|
`tags` | Array<string>
|
|
@@ -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
|
+
|