@easyedu/js-lsm-api 1.107.0 → 1.109.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 +20 -0
- package/README.md +21 -2
- package/dist/apis/ContentLibraryApi.d.ts +179 -0
- package/dist/apis/ContentLibraryApi.js +424 -1
- package/dist/apis/ContentLibraryQuizApi.d.ts +1 -0
- package/dist/apis/ContentLibraryQuizApi.js +3 -0
- package/dist/apis/CourseApi.d.ts +2 -2
- package/dist/apis/CourseApi.js +2 -2
- package/dist/apis/CourseCatalogApi.d.ts +8 -3
- package/dist/apis/CourseCatalogApi.js +14 -7
- package/dist/apis/CourseShareApi.d.ts +12 -7
- package/dist/apis/CourseShareApi.js +20 -5
- package/dist/apis/QuestionApi.d.ts +0 -1
- package/dist/apis/QuestionApi.js +0 -3
- package/dist/esm/apis/ContentLibraryApi.d.ts +179 -0
- package/dist/esm/apis/ContentLibraryApi.js +423 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +1 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +3 -0
- package/dist/esm/apis/CourseApi.d.ts +2 -2
- package/dist/esm/apis/CourseApi.js +2 -2
- package/dist/esm/apis/CourseCatalogApi.d.ts +8 -3
- package/dist/esm/apis/CourseCatalogApi.js +14 -7
- package/dist/esm/apis/CourseShareApi.d.ts +12 -7
- package/dist/esm/apis/CourseShareApi.js +20 -5
- package/dist/esm/apis/QuestionApi.d.ts +0 -1
- package/dist/esm/apis/QuestionApi.js +0 -3
- package/dist/esm/models/ContentLibraryTag.d.ts +104 -0
- package/dist/esm/models/ContentLibraryTag.js +85 -0
- package/dist/esm/models/ContentLibraryTagItem.d.ts +84 -0
- package/dist/esm/models/ContentLibraryTagItem.js +76 -0
- package/dist/esm/models/CourseShareAcceptError.d.ts +54 -0
- package/dist/esm/models/CourseShareAcceptError.js +62 -0
- package/dist/esm/models/GetContentLibraryTagItemList.d.ts +57 -0
- package/dist/esm/models/GetContentLibraryTagItemList.js +60 -0
- package/dist/esm/models/GetContentLibraryTagList.d.ts +57 -0
- package/dist/esm/models/GetContentLibraryTagList.js +60 -0
- package/dist/esm/models/GetCourseCatalogList.d.ts +57 -0
- package/dist/esm/models/GetCourseCatalogList.js +60 -0
- package/dist/esm/models/GetCourseShareList.d.ts +57 -0
- package/dist/esm/models/GetCourseShareList.js +60 -0
- package/dist/esm/models/GetLibraryQuiz.d.ts +7 -0
- package/dist/esm/models/GetLibraryQuiz.js +5 -0
- package/dist/esm/models/GetQuestion.d.ts +0 -6
- package/dist/esm/models/GetQuestion.js +0 -4
- package/dist/esm/models/GetQuestionListFilters.d.ts +0 -6
- package/dist/esm/models/GetQuestionListFilters.js +0 -2
- package/dist/esm/models/GetResource.d.ts +7 -0
- package/dist/esm/models/GetResource.js +5 -0
- package/dist/esm/models/LibraryQuizCriteriaPreviewQuestion.d.ts +0 -6
- package/dist/esm/models/LibraryQuizCriteriaPreviewQuestion.js +0 -4
- package/dist/esm/models/LibraryQuizCriterion.d.ts +0 -6
- package/dist/esm/models/LibraryQuizCriterion.js +0 -2
- package/dist/esm/models/PostContentLibraryTag.d.ts +32 -0
- package/dist/esm/models/PostContentLibraryTag.js +43 -0
- package/dist/esm/models/PostContentLibraryTagMerge.d.ts +32 -0
- package/dist/esm/models/PostContentLibraryTagMerge.js +43 -0
- package/dist/esm/models/PostLibraryQuiz.d.ts +6 -0
- package/dist/esm/models/PostLibraryQuiz.js +2 -0
- package/dist/esm/models/PostQuestion.d.ts +0 -6
- package/dist/esm/models/PostQuestion.js +0 -4
- package/dist/esm/models/PostResource.d.ts +6 -0
- package/dist/esm/models/PostResource.js +2 -0
- package/dist/esm/models/PutContentLibraryTag.d.ts +32 -0
- package/dist/esm/models/PutContentLibraryTag.js +43 -0
- package/dist/esm/models/PutLibraryQuiz.d.ts +6 -0
- package/dist/esm/models/PutLibraryQuiz.js +2 -0
- package/dist/esm/models/PutQuestion.d.ts +0 -6
- package/dist/esm/models/PutQuestion.js +0 -2
- package/dist/esm/models/PutResource.d.ts +6 -0
- package/dist/esm/models/PutResource.js +2 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/ContentLibraryTag.d.ts +104 -0
- package/dist/models/ContentLibraryTag.js +92 -0
- package/dist/models/ContentLibraryTagItem.d.ts +84 -0
- package/dist/models/ContentLibraryTagItem.js +84 -0
- package/dist/models/CourseShareAcceptError.d.ts +54 -0
- package/dist/models/CourseShareAcceptError.js +70 -0
- package/dist/models/GetContentLibraryTagItemList.d.ts +57 -0
- package/dist/models/GetContentLibraryTagItemList.js +67 -0
- package/dist/models/GetContentLibraryTagList.d.ts +57 -0
- package/dist/models/GetContentLibraryTagList.js +67 -0
- package/dist/models/GetCourseCatalogList.d.ts +57 -0
- package/dist/models/GetCourseCatalogList.js +67 -0
- package/dist/models/GetCourseShareList.d.ts +57 -0
- package/dist/models/GetCourseShareList.js +67 -0
- package/dist/models/GetLibraryQuiz.d.ts +7 -0
- package/dist/models/GetLibraryQuiz.js +5 -0
- package/dist/models/GetQuestion.d.ts +0 -6
- package/dist/models/GetQuestion.js +0 -4
- package/dist/models/GetQuestionListFilters.d.ts +0 -6
- package/dist/models/GetQuestionListFilters.js +0 -2
- package/dist/models/GetResource.d.ts +7 -0
- package/dist/models/GetResource.js +5 -0
- package/dist/models/LibraryQuizCriteriaPreviewQuestion.d.ts +0 -6
- package/dist/models/LibraryQuizCriteriaPreviewQuestion.js +0 -4
- package/dist/models/LibraryQuizCriterion.d.ts +0 -6
- package/dist/models/LibraryQuizCriterion.js +0 -2
- package/dist/models/PostContentLibraryTag.d.ts +32 -0
- package/dist/models/PostContentLibraryTag.js +50 -0
- package/dist/models/PostContentLibraryTagMerge.d.ts +32 -0
- package/dist/models/PostContentLibraryTagMerge.js +50 -0
- package/dist/models/PostLibraryQuiz.d.ts +6 -0
- package/dist/models/PostLibraryQuiz.js +2 -0
- package/dist/models/PostQuestion.d.ts +0 -6
- package/dist/models/PostQuestion.js +0 -4
- package/dist/models/PostResource.d.ts +6 -0
- package/dist/models/PostResource.js +2 -0
- package/dist/models/PutContentLibraryTag.d.ts +32 -0
- package/dist/models/PutContentLibraryTag.js +50 -0
- package/dist/models/PutLibraryQuiz.d.ts +6 -0
- package/dist/models/PutLibraryQuiz.js +2 -0
- package/dist/models/PutQuestion.d.ts +0 -6
- package/dist/models/PutQuestion.js +0 -2
- package/dist/models/PutResource.d.ts +6 -0
- package/dist/models/PutResource.js +2 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/ContentLibraryApi.md +732 -90
- package/docs/ContentLibraryQuizApi.md +4 -1
- package/docs/ContentLibraryTag.md +58 -0
- package/docs/ContentLibraryTagItem.md +48 -0
- package/docs/CourseApi.md +1 -1
- package/docs/CourseCatalogApi.md +15 -4
- package/docs/CourseShareAcceptError.md +37 -0
- package/docs/CourseShareApi.md +29 -7
- package/docs/GetContentLibraryTagItemList.md +42 -0
- package/docs/GetContentLibraryTagList.md +42 -0
- package/docs/GetCourseCatalogList.md +42 -0
- package/docs/GetCourseShareList.md +42 -0
- package/docs/GetLibraryQuiz.md +2 -0
- package/docs/GetQuestion.md +0 -2
- package/docs/GetQuestionListFilters.md +0 -2
- package/docs/GetResource.md +2 -0
- package/docs/LibraryQuizCriteriaPreviewQuestion.md +0 -2
- package/docs/LibraryQuizCriterion.md +0 -2
- package/docs/PostContentLibraryTag.md +34 -0
- package/docs/PostContentLibraryTagMerge.md +34 -0
- package/docs/PostLibraryQuiz.md +2 -0
- package/docs/PostQuestion.md +0 -2
- package/docs/PostResource.md +2 -0
- package/docs/PutContentLibraryTag.md +34 -0
- package/docs/PutLibraryQuiz.md +2 -0
- package/docs/PutQuestion.md +0 -2
- package/docs/PutResource.md +2 -0
- package/docs/QuestionApi.md +1 -4
- package/package.json +1 -1
- package/src/apis/ContentLibraryApi.ts +575 -0
- package/src/apis/ContentLibraryQuizApi.ts +5 -0
- package/src/apis/CourseApi.ts +2 -2
- package/src/apis/CourseCatalogApi.ts +24 -6
- package/src/apis/CourseShareApi.ts +42 -12
- package/src/apis/QuestionApi.ts +0 -5
- package/src/models/ContentLibraryTag.ts +171 -0
- package/src/models/ContentLibraryTagItem.ts +153 -0
- package/src/models/CourseShareAcceptError.ts +94 -0
- package/src/models/GetContentLibraryTagItemList.ts +110 -0
- package/src/models/GetContentLibraryTagList.ts +110 -0
- package/src/models/GetCourseCatalogList.ts +110 -0
- package/src/models/GetCourseShareList.ts +110 -0
- package/src/models/GetLibraryQuiz.ts +16 -0
- package/src/models/GetQuestion.ts +0 -9
- package/src/models/GetQuestionListFilters.ts +0 -8
- package/src/models/GetResource.ts +16 -0
- package/src/models/LibraryQuizCriteriaPreviewQuestion.ts +0 -9
- package/src/models/LibraryQuizCriterion.ts +0 -8
- package/src/models/PostContentLibraryTag.ts +66 -0
- package/src/models/PostContentLibraryTagMerge.ts +66 -0
- package/src/models/PostLibraryQuiz.ts +8 -0
- package/src/models/PostQuestion.ts +0 -9
- package/src/models/PostResource.ts +8 -0
- package/src/models/PutContentLibraryTag.ts +66 -0
- package/src/models/PutLibraryQuiz.ts +8 -0
- package/src/models/PutQuestion.ts +0 -8
- package/src/models/PutResource.ts +8 -0
- package/src/models/index.ts +10 -0
|
@@ -4,12 +4,20 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deleteContentLibraryTag**](ContentLibraryApi.md#deletecontentlibrarytag) | **DELETE** /content-library/tags/{tagId} | Delete an archived, unused Content Library tag |
|
|
7
8
|
| [**deleteResourceVersion**](ContentLibraryApi.md#deleteresourceversion) | **DELETE** /content-library/resources/{resourceId}/versions/{versionId} | Discard an unreferenced draft resource version |
|
|
8
9
|
| [**getContentLibraryItemList**](ContentLibraryApi.md#getcontentlibraryitemlist) | **GET** /content-library/items | Search Content Library items |
|
|
10
|
+
| [**getContentLibraryTag**](ContentLibraryApi.md#getcontentlibrarytag) | **GET** /content-library/tags/{tagId} | Get a Content Library tag |
|
|
11
|
+
| [**getContentLibraryTagItemList**](ContentLibraryApi.md#getcontentlibrarytagitemlist) | **GET** /content-library/tags/{tagId}/items | List resources and quizzes associated with a tag |
|
|
12
|
+
| [**getContentLibraryTagList**](ContentLibraryApi.md#getcontentlibrarytaglist) | **GET** /content-library/tags | List portal Content Library tags |
|
|
9
13
|
| [**getResource**](ContentLibraryApi.md#getresource) | **GET** /content-library/resources/{resourceId} | Get a resource and all versions |
|
|
10
14
|
| [**getResourceList**](ContentLibraryApi.md#getresourcelist) | **GET** /content-library/resources | List reusable resources |
|
|
11
15
|
| [**getResourceUsage**](ContentLibraryApi.md#getresourceusage) | **GET** /content-library/resources/{resourceId}/usage | Get course and learner usage for a resource |
|
|
12
16
|
| [**getResourceVersion**](ContentLibraryApi.md#getresourceversion) | **GET** /content-library/resources/{resourceId}/versions/{versionId} | Get a resource version |
|
|
17
|
+
| [**postContentLibraryTag**](ContentLibraryApi.md#postcontentlibrarytag) | **POST** /content-library/tags | Create a portal Content Library tag |
|
|
18
|
+
| [**postContentLibraryTagArchive**](ContentLibraryApi.md#postcontentlibrarytagarchive) | **POST** /content-library/tags/{tagId}/archive | Archive a Content Library tag |
|
|
19
|
+
| [**postContentLibraryTagMerge**](ContentLibraryApi.md#postcontentlibrarytagmerge) | **POST** /content-library/tags/{tagId}/merge | Merge a Content Library tag into another tag |
|
|
20
|
+
| [**postContentLibraryTagRestore**](ContentLibraryApi.md#postcontentlibrarytagrestore) | **POST** /content-library/tags/{tagId}/restore | Restore a Content Library tag |
|
|
13
21
|
| [**postResource**](ContentLibraryApi.md#postresource) | **POST** /content-library/resources | Create a resource and its first draft version |
|
|
14
22
|
| [**postResourceArchive**](ContentLibraryApi.md#postresourcearchive) | **POST** /content-library/resources/{resourceId}/archive | Archive a logical resource |
|
|
15
23
|
| [**postResourceVersion**](ContentLibraryApi.md#postresourceversion) | **POST** /content-library/resources/{resourceId}/versions | Create the next draft resource version |
|
|
@@ -18,17 +26,526 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
18
26
|
| [**postResourceVersionSession**](ContentLibraryApi.md#postresourceversionsession) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/sessions | Start or resume a demo session for an exact resource version |
|
|
19
27
|
| [**postResourceVersionUpload**](ContentLibraryApi.md#postresourceversionupload) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/upload | Initialize a version-scoped file upload |
|
|
20
28
|
| [**postResourceVersionUploadComplete**](ContentLibraryApi.md#postresourceversionuploadcomplete) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/upload/complete | Verify and complete a resource upload |
|
|
29
|
+
| [**putContentLibraryTag**](ContentLibraryApi.md#putcontentlibrarytag) | **PUT** /content-library/tags/{tagId} | Rename a Content Library tag |
|
|
21
30
|
| [**putResource**](ContentLibraryApi.md#putresource) | **PUT** /content-library/resources/{resourceId} | Update resource library metadata |
|
|
22
31
|
| [**putResourceVersion**](ContentLibraryApi.md#putresourceversion) | **PUT** /content-library/resources/{resourceId}/versions/{versionId} | Edit a draft resource version |
|
|
23
32
|
| [**putResourceVersionUploadFile**](ContentLibraryApi.md#putresourceversionuploadfile) | **PUT** /content-library/resources/{resourceId}/versions/{versionId}/upload | Upload bytes for a draft resource version |
|
|
24
33
|
|
|
25
34
|
|
|
26
35
|
|
|
36
|
+
## deleteContentLibraryTag
|
|
37
|
+
|
|
38
|
+
> deleteContentLibraryTag(tagId)
|
|
39
|
+
|
|
40
|
+
Delete an archived, unused Content Library tag
|
|
41
|
+
|
|
42
|
+
### Example
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import {
|
|
46
|
+
Configuration,
|
|
47
|
+
ContentLibraryApi,
|
|
48
|
+
} from '@easyedu/js-lsm-api';
|
|
49
|
+
import type { DeleteContentLibraryTagRequest } from '@easyedu/js-lsm-api';
|
|
50
|
+
|
|
51
|
+
async function example() {
|
|
52
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
53
|
+
const api = new ContentLibraryApi();
|
|
54
|
+
|
|
55
|
+
const body = {
|
|
56
|
+
// string
|
|
57
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
58
|
+
} satisfies DeleteContentLibraryTagRequest;
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
const data = await api.deleteContentLibraryTag(body);
|
|
62
|
+
console.log(data);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error(error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Run the test
|
|
69
|
+
example().catch(console.error);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
| Name | Type | Description | Notes |
|
|
76
|
+
|------------- | ------------- | ------------- | -------------|
|
|
77
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
78
|
+
|
|
79
|
+
### Return type
|
|
80
|
+
|
|
81
|
+
`void` (Empty response body)
|
|
82
|
+
|
|
83
|
+
### Authorization
|
|
84
|
+
|
|
85
|
+
No authorization required
|
|
86
|
+
|
|
87
|
+
### HTTP request headers
|
|
88
|
+
|
|
89
|
+
- **Content-Type**: Not defined
|
|
90
|
+
- **Accept**: Not defined
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### HTTP response details
|
|
94
|
+
| Status code | Description | Response headers |
|
|
95
|
+
|-------------|-------------|------------------|
|
|
96
|
+
| **204** | Tag deleted | - |
|
|
97
|
+
| **409** | Tag is active, used, or retained as a merge alias | - |
|
|
98
|
+
|
|
99
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
100
|
+
|
|
101
|
+
|
|
27
102
|
## deleteResourceVersion
|
|
28
103
|
|
|
29
|
-
> deleteResourceVersion(resourceId, versionId)
|
|
104
|
+
> deleteResourceVersion(resourceId, versionId)
|
|
105
|
+
|
|
106
|
+
Discard an unreferenced draft resource version
|
|
107
|
+
|
|
108
|
+
### Example
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import {
|
|
112
|
+
Configuration,
|
|
113
|
+
ContentLibraryApi,
|
|
114
|
+
} from '@easyedu/js-lsm-api';
|
|
115
|
+
import type { DeleteResourceVersionRequest } from '@easyedu/js-lsm-api';
|
|
116
|
+
|
|
117
|
+
async function example() {
|
|
118
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
119
|
+
const api = new ContentLibraryApi();
|
|
120
|
+
|
|
121
|
+
const body = {
|
|
122
|
+
// string
|
|
123
|
+
resourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
124
|
+
// string
|
|
125
|
+
versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
126
|
+
} satisfies DeleteResourceVersionRequest;
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const data = await api.deleteResourceVersion(body);
|
|
130
|
+
console.log(data);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
console.error(error);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Run the test
|
|
137
|
+
example().catch(console.error);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Parameters
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
| Name | Type | Description | Notes |
|
|
144
|
+
|------------- | ------------- | ------------- | -------------|
|
|
145
|
+
| **resourceId** | `string` | | [Defaults to `undefined`] |
|
|
146
|
+
| **versionId** | `string` | | [Defaults to `undefined`] |
|
|
147
|
+
|
|
148
|
+
### Return type
|
|
149
|
+
|
|
150
|
+
`void` (Empty response body)
|
|
151
|
+
|
|
152
|
+
### Authorization
|
|
153
|
+
|
|
154
|
+
No authorization required
|
|
155
|
+
|
|
156
|
+
### HTTP request headers
|
|
157
|
+
|
|
158
|
+
- **Content-Type**: Not defined
|
|
159
|
+
- **Accept**: Not defined
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### HTTP response details
|
|
163
|
+
| Status code | Description | Response headers |
|
|
164
|
+
|-------------|-------------|------------------|
|
|
165
|
+
| **204** | Draft discarded | - |
|
|
166
|
+
| **409** | Only unreferenced drafts may be discarded | - |
|
|
167
|
+
|
|
168
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## getContentLibraryItemList
|
|
172
|
+
|
|
173
|
+
> GetResourceList getContentLibraryItemList(kind, search, resourceType, tagId, page, pageSize)
|
|
174
|
+
|
|
175
|
+
Search Content Library items
|
|
176
|
+
|
|
177
|
+
### Example
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import {
|
|
181
|
+
Configuration,
|
|
182
|
+
ContentLibraryApi,
|
|
183
|
+
} from '@easyedu/js-lsm-api';
|
|
184
|
+
import type { GetContentLibraryItemListRequest } from '@easyedu/js-lsm-api';
|
|
185
|
+
|
|
186
|
+
async function example() {
|
|
187
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
188
|
+
const api = new ContentLibraryApi();
|
|
189
|
+
|
|
190
|
+
const body = {
|
|
191
|
+
// string (optional)
|
|
192
|
+
kind: kind_example,
|
|
193
|
+
// string (optional)
|
|
194
|
+
search: search_example,
|
|
195
|
+
// ResourceType (optional)
|
|
196
|
+
resourceType: ...,
|
|
197
|
+
// string (optional)
|
|
198
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
199
|
+
// number (optional)
|
|
200
|
+
page: 56,
|
|
201
|
+
// number (optional)
|
|
202
|
+
pageSize: 56,
|
|
203
|
+
} satisfies GetContentLibraryItemListRequest;
|
|
204
|
+
|
|
205
|
+
try {
|
|
206
|
+
const data = await api.getContentLibraryItemList(body);
|
|
207
|
+
console.log(data);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
console.error(error);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Run the test
|
|
214
|
+
example().catch(console.error);
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Parameters
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
| Name | Type | Description | Notes |
|
|
221
|
+
|------------- | ------------- | ------------- | -------------|
|
|
222
|
+
| **kind** | `string` | | [Optional] [Defaults to `'resource'`] |
|
|
223
|
+
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
224
|
+
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text] |
|
|
225
|
+
| **tagId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
226
|
+
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
227
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
228
|
+
|
|
229
|
+
### Return type
|
|
230
|
+
|
|
231
|
+
[**GetResourceList**](GetResourceList.md)
|
|
232
|
+
|
|
233
|
+
### Authorization
|
|
234
|
+
|
|
235
|
+
No authorization required
|
|
236
|
+
|
|
237
|
+
### HTTP request headers
|
|
238
|
+
|
|
239
|
+
- **Content-Type**: Not defined
|
|
240
|
+
- **Accept**: `application/json`
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### HTTP response details
|
|
244
|
+
| Status code | Description | Response headers |
|
|
245
|
+
|-------------|-------------|------------------|
|
|
246
|
+
| **200** | Content Library items | - |
|
|
247
|
+
|
|
248
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## getContentLibraryTag
|
|
252
|
+
|
|
253
|
+
> ContentLibraryTag getContentLibraryTag(tagId)
|
|
254
|
+
|
|
255
|
+
Get a Content Library tag
|
|
256
|
+
|
|
257
|
+
### Example
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
import {
|
|
261
|
+
Configuration,
|
|
262
|
+
ContentLibraryApi,
|
|
263
|
+
} from '@easyedu/js-lsm-api';
|
|
264
|
+
import type { GetContentLibraryTagRequest } from '@easyedu/js-lsm-api';
|
|
265
|
+
|
|
266
|
+
async function example() {
|
|
267
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
268
|
+
const api = new ContentLibraryApi();
|
|
269
|
+
|
|
270
|
+
const body = {
|
|
271
|
+
// string
|
|
272
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
273
|
+
} satisfies GetContentLibraryTagRequest;
|
|
274
|
+
|
|
275
|
+
try {
|
|
276
|
+
const data = await api.getContentLibraryTag(body);
|
|
277
|
+
console.log(data);
|
|
278
|
+
} catch (error) {
|
|
279
|
+
console.error(error);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Run the test
|
|
284
|
+
example().catch(console.error);
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Parameters
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
| Name | Type | Description | Notes |
|
|
291
|
+
|------------- | ------------- | ------------- | -------------|
|
|
292
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
293
|
+
|
|
294
|
+
### Return type
|
|
295
|
+
|
|
296
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
297
|
+
|
|
298
|
+
### Authorization
|
|
299
|
+
|
|
300
|
+
No authorization required
|
|
301
|
+
|
|
302
|
+
### HTTP request headers
|
|
303
|
+
|
|
304
|
+
- **Content-Type**: Not defined
|
|
305
|
+
- **Accept**: `application/json`
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
### HTTP response details
|
|
309
|
+
| Status code | Description | Response headers |
|
|
310
|
+
|-------------|-------------|------------------|
|
|
311
|
+
| **200** | Tag detail | - |
|
|
312
|
+
| **404** | Tag not found | - |
|
|
313
|
+
|
|
314
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
## getContentLibraryTagItemList
|
|
318
|
+
|
|
319
|
+
> GetContentLibraryTagItemList getContentLibraryTagItemList(tagId, kind, search, includeArchived, page, pageSize)
|
|
320
|
+
|
|
321
|
+
List resources and quizzes associated with a tag
|
|
322
|
+
|
|
323
|
+
### Example
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
import {
|
|
327
|
+
Configuration,
|
|
328
|
+
ContentLibraryApi,
|
|
329
|
+
} from '@easyedu/js-lsm-api';
|
|
330
|
+
import type { GetContentLibraryTagItemListRequest } from '@easyedu/js-lsm-api';
|
|
331
|
+
|
|
332
|
+
async function example() {
|
|
333
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
334
|
+
const api = new ContentLibraryApi();
|
|
335
|
+
|
|
336
|
+
const body = {
|
|
337
|
+
// string
|
|
338
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
339
|
+
// 'resource' | 'quiz' (optional)
|
|
340
|
+
kind: kind_example,
|
|
341
|
+
// string (optional)
|
|
342
|
+
search: search_example,
|
|
343
|
+
// boolean (optional)
|
|
344
|
+
includeArchived: true,
|
|
345
|
+
// number (optional)
|
|
346
|
+
page: 56,
|
|
347
|
+
// number (optional)
|
|
348
|
+
pageSize: 56,
|
|
349
|
+
} satisfies GetContentLibraryTagItemListRequest;
|
|
350
|
+
|
|
351
|
+
try {
|
|
352
|
+
const data = await api.getContentLibraryTagItemList(body);
|
|
353
|
+
console.log(data);
|
|
354
|
+
} catch (error) {
|
|
355
|
+
console.error(error);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Run the test
|
|
360
|
+
example().catch(console.error);
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Parameters
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
| Name | Type | Description | Notes |
|
|
367
|
+
|------------- | ------------- | ------------- | -------------|
|
|
368
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
369
|
+
| **kind** | `resource`, `quiz` | | [Optional] [Defaults to `undefined`] [Enum: resource, quiz] |
|
|
370
|
+
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
371
|
+
| **includeArchived** | `boolean` | | [Optional] [Defaults to `false`] |
|
|
372
|
+
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
373
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
374
|
+
|
|
375
|
+
### Return type
|
|
376
|
+
|
|
377
|
+
[**GetContentLibraryTagItemList**](GetContentLibraryTagItemList.md)
|
|
378
|
+
|
|
379
|
+
### Authorization
|
|
380
|
+
|
|
381
|
+
No authorization required
|
|
382
|
+
|
|
383
|
+
### HTTP request headers
|
|
384
|
+
|
|
385
|
+
- **Content-Type**: Not defined
|
|
386
|
+
- **Accept**: `application/json`
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
### HTTP response details
|
|
390
|
+
| Status code | Description | Response headers |
|
|
391
|
+
|-------------|-------------|------------------|
|
|
392
|
+
| **200** | Tagged Content Library items | - |
|
|
393
|
+
| **404** | Tag not found | - |
|
|
394
|
+
|
|
395
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
## getContentLibraryTagList
|
|
399
|
+
|
|
400
|
+
> GetContentLibraryTagList getContentLibraryTagList(search, includeArchived, orderBy, order, page, pageSize)
|
|
401
|
+
|
|
402
|
+
List portal Content Library tags
|
|
403
|
+
|
|
404
|
+
### Example
|
|
405
|
+
|
|
406
|
+
```ts
|
|
407
|
+
import {
|
|
408
|
+
Configuration,
|
|
409
|
+
ContentLibraryApi,
|
|
410
|
+
} from '@easyedu/js-lsm-api';
|
|
411
|
+
import type { GetContentLibraryTagListRequest } from '@easyedu/js-lsm-api';
|
|
412
|
+
|
|
413
|
+
async function example() {
|
|
414
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
415
|
+
const api = new ContentLibraryApi();
|
|
416
|
+
|
|
417
|
+
const body = {
|
|
418
|
+
// string (optional)
|
|
419
|
+
search: search_example,
|
|
420
|
+
// boolean (optional)
|
|
421
|
+
includeArchived: true,
|
|
422
|
+
// 'name' | 'usage_count' (optional)
|
|
423
|
+
orderBy: orderBy_example,
|
|
424
|
+
// 'asc' | 'desc' (optional)
|
|
425
|
+
order: order_example,
|
|
426
|
+
// number (optional)
|
|
427
|
+
page: 56,
|
|
428
|
+
// number (optional)
|
|
429
|
+
pageSize: 56,
|
|
430
|
+
} satisfies GetContentLibraryTagListRequest;
|
|
431
|
+
|
|
432
|
+
try {
|
|
433
|
+
const data = await api.getContentLibraryTagList(body);
|
|
434
|
+
console.log(data);
|
|
435
|
+
} catch (error) {
|
|
436
|
+
console.error(error);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// Run the test
|
|
441
|
+
example().catch(console.error);
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Parameters
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
| Name | Type | Description | Notes |
|
|
448
|
+
|------------- | ------------- | ------------- | -------------|
|
|
449
|
+
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
450
|
+
| **includeArchived** | `boolean` | | [Optional] [Defaults to `false`] |
|
|
451
|
+
| **orderBy** | `name`, `usage_count` | | [Optional] [Defaults to `'name'`] [Enum: name, usage_count] |
|
|
452
|
+
| **order** | `asc`, `desc` | | [Optional] [Defaults to `'asc'`] [Enum: asc, desc] |
|
|
453
|
+
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
454
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
455
|
+
|
|
456
|
+
### Return type
|
|
457
|
+
|
|
458
|
+
[**GetContentLibraryTagList**](GetContentLibraryTagList.md)
|
|
459
|
+
|
|
460
|
+
### Authorization
|
|
461
|
+
|
|
462
|
+
No authorization required
|
|
463
|
+
|
|
464
|
+
### HTTP request headers
|
|
465
|
+
|
|
466
|
+
- **Content-Type**: Not defined
|
|
467
|
+
- **Accept**: `application/json`
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
### HTTP response details
|
|
471
|
+
| Status code | Description | Response headers |
|
|
472
|
+
|-------------|-------------|------------------|
|
|
473
|
+
| **200** | Portal tags | - |
|
|
474
|
+
|
|
475
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
## getResource
|
|
479
|
+
|
|
480
|
+
> GetResource getResource(resourceId)
|
|
481
|
+
|
|
482
|
+
Get a resource and all versions
|
|
483
|
+
|
|
484
|
+
### Example
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
import {
|
|
488
|
+
Configuration,
|
|
489
|
+
ContentLibraryApi,
|
|
490
|
+
} from '@easyedu/js-lsm-api';
|
|
491
|
+
import type { GetResourceRequest } from '@easyedu/js-lsm-api';
|
|
492
|
+
|
|
493
|
+
async function example() {
|
|
494
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
495
|
+
const api = new ContentLibraryApi();
|
|
496
|
+
|
|
497
|
+
const body = {
|
|
498
|
+
// string
|
|
499
|
+
resourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
500
|
+
} satisfies GetResourceRequest;
|
|
501
|
+
|
|
502
|
+
try {
|
|
503
|
+
const data = await api.getResource(body);
|
|
504
|
+
console.log(data);
|
|
505
|
+
} catch (error) {
|
|
506
|
+
console.error(error);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// Run the test
|
|
511
|
+
example().catch(console.error);
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### Parameters
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
| Name | Type | Description | Notes |
|
|
518
|
+
|------------- | ------------- | ------------- | -------------|
|
|
519
|
+
| **resourceId** | `string` | | [Defaults to `undefined`] |
|
|
520
|
+
|
|
521
|
+
### Return type
|
|
522
|
+
|
|
523
|
+
[**GetResource**](GetResource.md)
|
|
524
|
+
|
|
525
|
+
### Authorization
|
|
526
|
+
|
|
527
|
+
No authorization required
|
|
528
|
+
|
|
529
|
+
### HTTP request headers
|
|
530
|
+
|
|
531
|
+
- **Content-Type**: Not defined
|
|
532
|
+
- **Accept**: `application/json`
|
|
30
533
|
|
|
31
|
-
|
|
534
|
+
|
|
535
|
+
### HTTP response details
|
|
536
|
+
| Status code | Description | Response headers |
|
|
537
|
+
|-------------|-------------|------------------|
|
|
538
|
+
| **200** | Resource detail | - |
|
|
539
|
+
| **404** | Resource not found | - |
|
|
540
|
+
|
|
541
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
## getResourceList
|
|
545
|
+
|
|
546
|
+
> GetResourceList getResourceList(search, resourceType, tagId, page, pageSize)
|
|
547
|
+
|
|
548
|
+
List reusable resources
|
|
32
549
|
|
|
33
550
|
### Example
|
|
34
551
|
|
|
@@ -37,21 +554,27 @@ import {
|
|
|
37
554
|
Configuration,
|
|
38
555
|
ContentLibraryApi,
|
|
39
556
|
} from '@easyedu/js-lsm-api';
|
|
40
|
-
import type {
|
|
557
|
+
import type { GetResourceListRequest } from '@easyedu/js-lsm-api';
|
|
41
558
|
|
|
42
559
|
async function example() {
|
|
43
560
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
44
561
|
const api = new ContentLibraryApi();
|
|
45
562
|
|
|
46
563
|
const body = {
|
|
47
|
-
// string
|
|
48
|
-
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
564
|
+
// string (optional)
|
|
565
|
+
search: search_example,
|
|
566
|
+
// ResourceType (optional)
|
|
567
|
+
resourceType: ...,
|
|
568
|
+
// string (optional)
|
|
569
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
570
|
+
// number (optional)
|
|
571
|
+
page: 56,
|
|
572
|
+
// number (optional)
|
|
573
|
+
pageSize: 56,
|
|
574
|
+
} satisfies GetResourceListRequest;
|
|
52
575
|
|
|
53
576
|
try {
|
|
54
|
-
const data = await api.
|
|
577
|
+
const data = await api.getResourceList(body);
|
|
55
578
|
console.log(data);
|
|
56
579
|
} catch (error) {
|
|
57
580
|
console.error(error);
|
|
@@ -67,12 +590,15 @@ example().catch(console.error);
|
|
|
67
590
|
|
|
68
591
|
| Name | Type | Description | Notes |
|
|
69
592
|
|------------- | ------------- | ------------- | -------------|
|
|
70
|
-
| **
|
|
71
|
-
| **
|
|
593
|
+
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
594
|
+
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text] |
|
|
595
|
+
| **tagId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
596
|
+
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
597
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
72
598
|
|
|
73
599
|
### Return type
|
|
74
600
|
|
|
75
|
-
|
|
601
|
+
[**GetResourceList**](GetResourceList.md)
|
|
76
602
|
|
|
77
603
|
### Authorization
|
|
78
604
|
|
|
@@ -81,23 +607,22 @@ No authorization required
|
|
|
81
607
|
### HTTP request headers
|
|
82
608
|
|
|
83
609
|
- **Content-Type**: Not defined
|
|
84
|
-
- **Accept**:
|
|
610
|
+
- **Accept**: `application/json`
|
|
85
611
|
|
|
86
612
|
|
|
87
613
|
### HTTP response details
|
|
88
614
|
| Status code | Description | Response headers |
|
|
89
615
|
|-------------|-------------|------------------|
|
|
90
|
-
| **
|
|
91
|
-
| **409** | Only unreferenced drafts may be discarded | - |
|
|
616
|
+
| **200** | Reusable resources | - |
|
|
92
617
|
|
|
93
618
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
94
619
|
|
|
95
620
|
|
|
96
|
-
##
|
|
621
|
+
## getResourceUsage
|
|
97
622
|
|
|
98
|
-
>
|
|
623
|
+
> GetResourceUsage getResourceUsage(resourceId)
|
|
99
624
|
|
|
100
|
-
|
|
625
|
+
Get course and learner usage for a resource
|
|
101
626
|
|
|
102
627
|
### Example
|
|
103
628
|
|
|
@@ -106,27 +631,19 @@ import {
|
|
|
106
631
|
Configuration,
|
|
107
632
|
ContentLibraryApi,
|
|
108
633
|
} from '@easyedu/js-lsm-api';
|
|
109
|
-
import type {
|
|
634
|
+
import type { GetResourceUsageRequest } from '@easyedu/js-lsm-api';
|
|
110
635
|
|
|
111
636
|
async function example() {
|
|
112
637
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
113
638
|
const api = new ContentLibraryApi();
|
|
114
639
|
|
|
115
640
|
const body = {
|
|
116
|
-
// string
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
search: search_example,
|
|
120
|
-
// ResourceType (optional)
|
|
121
|
-
resourceType: ...,
|
|
122
|
-
// number (optional)
|
|
123
|
-
page: 56,
|
|
124
|
-
// number (optional)
|
|
125
|
-
pageSize: 56,
|
|
126
|
-
} satisfies GetContentLibraryItemListRequest;
|
|
641
|
+
// string
|
|
642
|
+
resourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
643
|
+
} satisfies GetResourceUsageRequest;
|
|
127
644
|
|
|
128
645
|
try {
|
|
129
|
-
const data = await api.
|
|
646
|
+
const data = await api.getResourceUsage(body);
|
|
130
647
|
console.log(data);
|
|
131
648
|
} catch (error) {
|
|
132
649
|
console.error(error);
|
|
@@ -142,15 +659,11 @@ example().catch(console.error);
|
|
|
142
659
|
|
|
143
660
|
| Name | Type | Description | Notes |
|
|
144
661
|
|------------- | ------------- | ------------- | -------------|
|
|
145
|
-
| **
|
|
146
|
-
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
147
|
-
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text] |
|
|
148
|
-
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
149
|
-
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
662
|
+
| **resourceId** | `string` | | [Defaults to `undefined`] |
|
|
150
663
|
|
|
151
664
|
### Return type
|
|
152
665
|
|
|
153
|
-
[**
|
|
666
|
+
[**GetResourceUsage**](GetResourceUsage.md)
|
|
154
667
|
|
|
155
668
|
### Authorization
|
|
156
669
|
|
|
@@ -165,16 +678,16 @@ No authorization required
|
|
|
165
678
|
### HTTP response details
|
|
166
679
|
| Status code | Description | Response headers |
|
|
167
680
|
|-------------|-------------|------------------|
|
|
168
|
-
| **200** |
|
|
681
|
+
| **200** | Resource usage | - |
|
|
169
682
|
|
|
170
683
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
171
684
|
|
|
172
685
|
|
|
173
|
-
##
|
|
686
|
+
## getResourceVersion
|
|
174
687
|
|
|
175
|
-
>
|
|
688
|
+
> GetContentLibraryVersion getResourceVersion(resourceId, versionId)
|
|
176
689
|
|
|
177
|
-
Get a resource
|
|
690
|
+
Get a resource version
|
|
178
691
|
|
|
179
692
|
### Example
|
|
180
693
|
|
|
@@ -183,7 +696,7 @@ import {
|
|
|
183
696
|
Configuration,
|
|
184
697
|
ContentLibraryApi,
|
|
185
698
|
} from '@easyedu/js-lsm-api';
|
|
186
|
-
import type {
|
|
699
|
+
import type { GetResourceVersionRequest } from '@easyedu/js-lsm-api';
|
|
187
700
|
|
|
188
701
|
async function example() {
|
|
189
702
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
@@ -192,10 +705,12 @@ async function example() {
|
|
|
192
705
|
const body = {
|
|
193
706
|
// string
|
|
194
707
|
resourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
195
|
-
|
|
708
|
+
// string
|
|
709
|
+
versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
710
|
+
} satisfies GetResourceVersionRequest;
|
|
196
711
|
|
|
197
712
|
try {
|
|
198
|
-
const data = await api.
|
|
713
|
+
const data = await api.getResourceVersion(body);
|
|
199
714
|
console.log(data);
|
|
200
715
|
} catch (error) {
|
|
201
716
|
console.error(error);
|
|
@@ -212,10 +727,11 @@ example().catch(console.error);
|
|
|
212
727
|
| Name | Type | Description | Notes |
|
|
213
728
|
|------------- | ------------- | ------------- | -------------|
|
|
214
729
|
| **resourceId** | `string` | | [Defaults to `undefined`] |
|
|
730
|
+
| **versionId** | `string` | | [Defaults to `undefined`] |
|
|
215
731
|
|
|
216
732
|
### Return type
|
|
217
733
|
|
|
218
|
-
[**
|
|
734
|
+
[**GetContentLibraryVersion**](GetContentLibraryVersion.md)
|
|
219
735
|
|
|
220
736
|
### Authorization
|
|
221
737
|
|
|
@@ -230,17 +746,16 @@ No authorization required
|
|
|
230
746
|
### HTTP response details
|
|
231
747
|
| Status code | Description | Response headers |
|
|
232
748
|
|-------------|-------------|------------------|
|
|
233
|
-
| **200** | Resource
|
|
234
|
-
| **404** | Resource not found | - |
|
|
749
|
+
| **200** | Resource version | - |
|
|
235
750
|
|
|
236
751
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
237
752
|
|
|
238
753
|
|
|
239
|
-
##
|
|
754
|
+
## postContentLibraryTag
|
|
240
755
|
|
|
241
|
-
>
|
|
756
|
+
> ContentLibraryTag postContentLibraryTag(postContentLibraryTag)
|
|
242
757
|
|
|
243
|
-
|
|
758
|
+
Create a portal Content Library tag
|
|
244
759
|
|
|
245
760
|
### Example
|
|
246
761
|
|
|
@@ -249,25 +764,19 @@ import {
|
|
|
249
764
|
Configuration,
|
|
250
765
|
ContentLibraryApi,
|
|
251
766
|
} from '@easyedu/js-lsm-api';
|
|
252
|
-
import type {
|
|
767
|
+
import type { PostContentLibraryTagRequest } from '@easyedu/js-lsm-api';
|
|
253
768
|
|
|
254
769
|
async function example() {
|
|
255
770
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
256
771
|
const api = new ContentLibraryApi();
|
|
257
772
|
|
|
258
773
|
const body = {
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
resourceType: ...,
|
|
263
|
-
// number (optional)
|
|
264
|
-
page: 56,
|
|
265
|
-
// number (optional)
|
|
266
|
-
pageSize: 56,
|
|
267
|
-
} satisfies GetResourceListRequest;
|
|
774
|
+
// PostContentLibraryTag
|
|
775
|
+
postContentLibraryTag: ...,
|
|
776
|
+
} satisfies PostContentLibraryTagRequest;
|
|
268
777
|
|
|
269
778
|
try {
|
|
270
|
-
const data = await api.
|
|
779
|
+
const data = await api.postContentLibraryTag(body);
|
|
271
780
|
console.log(data);
|
|
272
781
|
} catch (error) {
|
|
273
782
|
console.error(error);
|
|
@@ -283,14 +792,11 @@ example().catch(console.error);
|
|
|
283
792
|
|
|
284
793
|
| Name | Type | Description | Notes |
|
|
285
794
|
|------------- | ------------- | ------------- | -------------|
|
|
286
|
-
| **
|
|
287
|
-
| **resourceType** | `ResourceType` | | [Optional] [Defaults to `undefined`] [Enum: scorm, video, audio, image, pdf, powerpoint, file, link, rich_text] |
|
|
288
|
-
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
289
|
-
| **pageSize** | `number` | | [Optional] [Defaults to `20`] |
|
|
795
|
+
| **postContentLibraryTag** | [PostContentLibraryTag](PostContentLibraryTag.md) | | |
|
|
290
796
|
|
|
291
797
|
### Return type
|
|
292
798
|
|
|
293
|
-
[**
|
|
799
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
294
800
|
|
|
295
801
|
### Authorization
|
|
296
802
|
|
|
@@ -298,23 +804,24 @@ No authorization required
|
|
|
298
804
|
|
|
299
805
|
### HTTP request headers
|
|
300
806
|
|
|
301
|
-
- **Content-Type**:
|
|
807
|
+
- **Content-Type**: `application/json`
|
|
302
808
|
- **Accept**: `application/json`
|
|
303
809
|
|
|
304
810
|
|
|
305
811
|
### HTTP response details
|
|
306
812
|
| Status code | Description | Response headers |
|
|
307
813
|
|-------------|-------------|------------------|
|
|
308
|
-
| **
|
|
814
|
+
| **201** | Tag created | - |
|
|
815
|
+
| **409** | A tag with the normalized name already exists | - |
|
|
309
816
|
|
|
310
817
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
311
818
|
|
|
312
819
|
|
|
313
|
-
##
|
|
820
|
+
## postContentLibraryTagArchive
|
|
314
821
|
|
|
315
|
-
>
|
|
822
|
+
> ContentLibraryTag postContentLibraryTagArchive(tagId)
|
|
316
823
|
|
|
317
|
-
|
|
824
|
+
Archive a Content Library tag
|
|
318
825
|
|
|
319
826
|
### Example
|
|
320
827
|
|
|
@@ -323,7 +830,7 @@ import {
|
|
|
323
830
|
Configuration,
|
|
324
831
|
ContentLibraryApi,
|
|
325
832
|
} from '@easyedu/js-lsm-api';
|
|
326
|
-
import type {
|
|
833
|
+
import type { PostContentLibraryTagArchiveRequest } from '@easyedu/js-lsm-api';
|
|
327
834
|
|
|
328
835
|
async function example() {
|
|
329
836
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
@@ -331,11 +838,11 @@ async function example() {
|
|
|
331
838
|
|
|
332
839
|
const body = {
|
|
333
840
|
// string
|
|
334
|
-
|
|
335
|
-
} satisfies
|
|
841
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
842
|
+
} satisfies PostContentLibraryTagArchiveRequest;
|
|
336
843
|
|
|
337
844
|
try {
|
|
338
|
-
const data = await api.
|
|
845
|
+
const data = await api.postContentLibraryTagArchive(body);
|
|
339
846
|
console.log(data);
|
|
340
847
|
} catch (error) {
|
|
341
848
|
console.error(error);
|
|
@@ -351,11 +858,11 @@ example().catch(console.error);
|
|
|
351
858
|
|
|
352
859
|
| Name | Type | Description | Notes |
|
|
353
860
|
|------------- | ------------- | ------------- | -------------|
|
|
354
|
-
| **
|
|
861
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
355
862
|
|
|
356
863
|
### Return type
|
|
357
864
|
|
|
358
|
-
[**
|
|
865
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
359
866
|
|
|
360
867
|
### Authorization
|
|
361
868
|
|
|
@@ -370,16 +877,16 @@ No authorization required
|
|
|
370
877
|
### HTTP response details
|
|
371
878
|
| Status code | Description | Response headers |
|
|
372
879
|
|-------------|-------------|------------------|
|
|
373
|
-
| **200** |
|
|
880
|
+
| **200** | Tag archived | - |
|
|
374
881
|
|
|
375
882
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
376
883
|
|
|
377
884
|
|
|
378
|
-
##
|
|
885
|
+
## postContentLibraryTagMerge
|
|
379
886
|
|
|
380
|
-
>
|
|
887
|
+
> ContentLibraryTag postContentLibraryTagMerge(tagId, postContentLibraryTagMerge)
|
|
381
888
|
|
|
382
|
-
|
|
889
|
+
Merge a Content Library tag into another tag
|
|
383
890
|
|
|
384
891
|
### Example
|
|
385
892
|
|
|
@@ -388,7 +895,7 @@ import {
|
|
|
388
895
|
Configuration,
|
|
389
896
|
ContentLibraryApi,
|
|
390
897
|
} from '@easyedu/js-lsm-api';
|
|
391
|
-
import type {
|
|
898
|
+
import type { PostContentLibraryTagMergeRequest } from '@easyedu/js-lsm-api';
|
|
392
899
|
|
|
393
900
|
async function example() {
|
|
394
901
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
@@ -396,13 +903,80 @@ async function example() {
|
|
|
396
903
|
|
|
397
904
|
const body = {
|
|
398
905
|
// string
|
|
399
|
-
|
|
906
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
907
|
+
// PostContentLibraryTagMerge
|
|
908
|
+
postContentLibraryTagMerge: ...,
|
|
909
|
+
} satisfies PostContentLibraryTagMergeRequest;
|
|
910
|
+
|
|
911
|
+
try {
|
|
912
|
+
const data = await api.postContentLibraryTagMerge(body);
|
|
913
|
+
console.log(data);
|
|
914
|
+
} catch (error) {
|
|
915
|
+
console.error(error);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// Run the test
|
|
920
|
+
example().catch(console.error);
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
### Parameters
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
| Name | Type | Description | Notes |
|
|
927
|
+
|------------- | ------------- | ------------- | -------------|
|
|
928
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
929
|
+
| **postContentLibraryTagMerge** | [PostContentLibraryTagMerge](PostContentLibraryTagMerge.md) | | |
|
|
930
|
+
|
|
931
|
+
### Return type
|
|
932
|
+
|
|
933
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
934
|
+
|
|
935
|
+
### Authorization
|
|
936
|
+
|
|
937
|
+
No authorization required
|
|
938
|
+
|
|
939
|
+
### HTTP request headers
|
|
940
|
+
|
|
941
|
+
- **Content-Type**: `application/json`
|
|
942
|
+
- **Accept**: `application/json`
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
### HTTP response details
|
|
946
|
+
| Status code | Description | Response headers |
|
|
947
|
+
|-------------|-------------|------------------|
|
|
948
|
+
| **200** | Target tag after merge | - |
|
|
949
|
+
| **409** | Source and target cannot be merged | - |
|
|
950
|
+
|
|
951
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
## postContentLibraryTagRestore
|
|
955
|
+
|
|
956
|
+
> ContentLibraryTag postContentLibraryTagRestore(tagId)
|
|
957
|
+
|
|
958
|
+
Restore a Content Library tag
|
|
959
|
+
|
|
960
|
+
### Example
|
|
961
|
+
|
|
962
|
+
```ts
|
|
963
|
+
import {
|
|
964
|
+
Configuration,
|
|
965
|
+
ContentLibraryApi,
|
|
966
|
+
} from '@easyedu/js-lsm-api';
|
|
967
|
+
import type { PostContentLibraryTagRestoreRequest } from '@easyedu/js-lsm-api';
|
|
968
|
+
|
|
969
|
+
async function example() {
|
|
970
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
971
|
+
const api = new ContentLibraryApi();
|
|
972
|
+
|
|
973
|
+
const body = {
|
|
400
974
|
// string
|
|
401
|
-
|
|
402
|
-
} satisfies
|
|
975
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
976
|
+
} satisfies PostContentLibraryTagRestoreRequest;
|
|
403
977
|
|
|
404
978
|
try {
|
|
405
|
-
const data = await api.
|
|
979
|
+
const data = await api.postContentLibraryTagRestore(body);
|
|
406
980
|
console.log(data);
|
|
407
981
|
} catch (error) {
|
|
408
982
|
console.error(error);
|
|
@@ -418,12 +992,11 @@ example().catch(console.error);
|
|
|
418
992
|
|
|
419
993
|
| Name | Type | Description | Notes |
|
|
420
994
|
|------------- | ------------- | ------------- | -------------|
|
|
421
|
-
| **
|
|
422
|
-
| **versionId** | `string` | | [Defaults to `undefined`] |
|
|
995
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
423
996
|
|
|
424
997
|
### Return type
|
|
425
998
|
|
|
426
|
-
[**
|
|
999
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
427
1000
|
|
|
428
1001
|
### Authorization
|
|
429
1002
|
|
|
@@ -438,7 +1011,7 @@ No authorization required
|
|
|
438
1011
|
### HTTP response details
|
|
439
1012
|
| Status code | Description | Response headers |
|
|
440
1013
|
|-------------|-------------|------------------|
|
|
441
|
-
| **200** |
|
|
1014
|
+
| **200** | Tag restored | - |
|
|
442
1015
|
|
|
443
1016
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
444
1017
|
|
|
@@ -993,6 +1566,75 @@ No authorization required
|
|
|
993
1566
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
994
1567
|
|
|
995
1568
|
|
|
1569
|
+
## putContentLibraryTag
|
|
1570
|
+
|
|
1571
|
+
> ContentLibraryTag putContentLibraryTag(tagId, putContentLibraryTag)
|
|
1572
|
+
|
|
1573
|
+
Rename a Content Library tag
|
|
1574
|
+
|
|
1575
|
+
### Example
|
|
1576
|
+
|
|
1577
|
+
```ts
|
|
1578
|
+
import {
|
|
1579
|
+
Configuration,
|
|
1580
|
+
ContentLibraryApi,
|
|
1581
|
+
} from '@easyedu/js-lsm-api';
|
|
1582
|
+
import type { PutContentLibraryTagRequest } from '@easyedu/js-lsm-api';
|
|
1583
|
+
|
|
1584
|
+
async function example() {
|
|
1585
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1586
|
+
const api = new ContentLibraryApi();
|
|
1587
|
+
|
|
1588
|
+
const body = {
|
|
1589
|
+
// string
|
|
1590
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1591
|
+
// PutContentLibraryTag
|
|
1592
|
+
putContentLibraryTag: ...,
|
|
1593
|
+
} satisfies PutContentLibraryTagRequest;
|
|
1594
|
+
|
|
1595
|
+
try {
|
|
1596
|
+
const data = await api.putContentLibraryTag(body);
|
|
1597
|
+
console.log(data);
|
|
1598
|
+
} catch (error) {
|
|
1599
|
+
console.error(error);
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
// Run the test
|
|
1604
|
+
example().catch(console.error);
|
|
1605
|
+
```
|
|
1606
|
+
|
|
1607
|
+
### Parameters
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
| Name | Type | Description | Notes |
|
|
1611
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1612
|
+
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
1613
|
+
| **putContentLibraryTag** | [PutContentLibraryTag](PutContentLibraryTag.md) | | |
|
|
1614
|
+
|
|
1615
|
+
### Return type
|
|
1616
|
+
|
|
1617
|
+
[**ContentLibraryTag**](ContentLibraryTag.md)
|
|
1618
|
+
|
|
1619
|
+
### Authorization
|
|
1620
|
+
|
|
1621
|
+
No authorization required
|
|
1622
|
+
|
|
1623
|
+
### HTTP request headers
|
|
1624
|
+
|
|
1625
|
+
- **Content-Type**: `application/json`
|
|
1626
|
+
- **Accept**: `application/json`
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
### HTTP response details
|
|
1630
|
+
| Status code | Description | Response headers |
|
|
1631
|
+
|-------------|-------------|------------------|
|
|
1632
|
+
| **200** | Tag renamed | - |
|
|
1633
|
+
| **409** | The normalized name is already in use | - |
|
|
1634
|
+
|
|
1635
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1636
|
+
|
|
1637
|
+
|
|
996
1638
|
## putResource
|
|
997
1639
|
|
|
998
1640
|
> GetResource putResource(resourceId, putResource)
|