@easyedu/js-lsm-api 1.50.0 → 1.52.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 +29 -2
- package/dist/apis/CourseCatalogApi.d.ts +123 -0
- package/dist/apis/CourseCatalogApi.js +313 -0
- package/dist/apis/CourseShareApi.d.ts +153 -0
- package/dist/apis/CourseShareApi.js +385 -0
- package/dist/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/apis/PortalSublicenseApi.js +79 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/CourseCatalogApi.d.ts +123 -0
- package/dist/esm/apis/CourseCatalogApi.js +309 -0
- package/dist/esm/apis/CourseShareApi.d.ts +153 -0
- package/dist/esm/apis/CourseShareApi.js +381 -0
- package/dist/esm/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/esm/apis/PortalSublicenseApi.js +75 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/CourseCatalog.d.ts +44 -0
- package/dist/esm/models/CourseCatalog.js +51 -0
- package/dist/esm/models/CourseShare.d.ts +88 -0
- package/dist/esm/models/CourseShare.js +85 -0
- package/dist/esm/models/PortalSublicense.d.ts +65 -0
- package/dist/esm/models/PortalSublicense.js +61 -0
- package/dist/esm/models/PostCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PostCourseCatalog.js +45 -0
- package/dist/esm/models/PostOfferCatalog.d.ts +59 -0
- package/dist/esm/models/PostOfferCatalog.js +59 -0
- package/dist/esm/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/esm/models/PostOfferCatalogResponse.js +43 -0
- package/dist/esm/models/PostOfferCourse.d.ts +59 -0
- package/dist/esm/models/PostOfferCourse.js +59 -0
- package/dist/esm/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/esm/models/PostOfferCourseResponse.js +57 -0
- package/dist/esm/models/PutCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PutCourseCatalog.js +43 -0
- package/dist/esm/models/PutPortalSublicense.d.ts +46 -0
- package/dist/esm/models/PutPortalSublicense.js +45 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/CourseCatalog.d.ts +44 -0
- package/dist/models/CourseCatalog.js +58 -0
- package/dist/models/CourseShare.d.ts +88 -0
- package/dist/models/CourseShare.js +93 -0
- package/dist/models/PortalSublicense.d.ts +65 -0
- package/dist/models/PortalSublicense.js +69 -0
- package/dist/models/PostCourseCatalog.d.ts +38 -0
- package/dist/models/PostCourseCatalog.js +52 -0
- package/dist/models/PostOfferCatalog.d.ts +59 -0
- package/dist/models/PostOfferCatalog.js +67 -0
- package/dist/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/models/PostOfferCatalogResponse.js +50 -0
- package/dist/models/PostOfferCourse.d.ts +59 -0
- package/dist/models/PostOfferCourse.js +67 -0
- package/dist/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/models/PostOfferCourseResponse.js +65 -0
- package/dist/models/PutCourseCatalog.d.ts +38 -0
- package/dist/models/PutCourseCatalog.js +50 -0
- package/dist/models/PutPortalSublicense.d.ts +46 -0
- package/dist/models/PutPortalSublicense.js +52 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/CourseCatalog.md +38 -0
- package/docs/CourseCatalogApi.md +476 -0
- package/docs/CourseShare.md +46 -0
- package/docs/CourseShareApi.md +609 -0
- package/docs/PortalSublicense.md +42 -0
- package/docs/PortalSublicenseApi.md +81 -0
- package/docs/PostCourseCatalog.md +36 -0
- package/docs/PostOfferCatalog.md +40 -0
- package/docs/PostOfferCatalogResponse.md +34 -0
- package/docs/PostOfferCourse.md +40 -0
- package/docs/PostOfferCourseResponse.md +36 -0
- package/docs/PutCourseCatalog.md +36 -0
- package/docs/PutPortalSublicense.md +39 -0
- package/package.json +1 -1
- package/src/apis/CourseCatalogApi.ts +395 -0
- package/src/apis/CourseShareApi.ts +480 -0
- package/src/apis/PortalSublicenseApi.ts +95 -0
- package/src/apis/index.ts +3 -0
- package/src/models/CourseCatalog.ts +84 -0
- package/src/models/CourseShare.ts +144 -0
- package/src/models/PortalSublicense.ts +111 -0
- package/src/models/PostCourseCatalog.ts +74 -0
- package/src/models/PostOfferCatalog.ts +103 -0
- package/src/models/PostOfferCatalogResponse.ts +66 -0
- package/src/models/PostOfferCourse.ts +103 -0
- package/src/models/PostOfferCourseResponse.ts +89 -0
- package/src/models/PutCourseCatalog.ts +73 -0
- package/src/models/PutPortalSublicense.ts +83 -0
- package/src/models/index.ts +10 -0
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
# CourseShareApi
|
|
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
|
+
| [**deleteCourseShare**](CourseShareApi.md#deletecourseshare) | **DELETE** /course-shares/{shareId} | Revoke a share |
|
|
8
|
+
| [**getCourseSharesOfferedByMe**](CourseShareApi.md#getcoursesharesofferedbyme) | **GET** /course-shares/offered-by-me | List shares the current portal has offered out |
|
|
9
|
+
| [**getCourseSharesOfferedToMe**](CourseShareApi.md#getcoursesharesofferedtome) | **GET** /course-shares/offered-to-me | List shares offered to the current portal |
|
|
10
|
+
| [**postOfferCatalog**](CourseShareApi.md#postoffercatalog) | **POST** /catalogs/{catalogId}/shares | Offer every course in a catalog to a descendant portal |
|
|
11
|
+
| [**postOfferCourse**](CourseShareApi.md#postoffercourse) | **POST** /courses/{courseId}/shares | Offer a single course to a descendant portal |
|
|
12
|
+
| [**postUnrevokeShare**](CourseShareApi.md#postunrevokeshare) | **POST** /course-shares/{shareId}/unrevoke | Restore a previously revoked share |
|
|
13
|
+
| [**putAcceptClone**](CourseShareApi.md#putacceptclone) | **PUT** /course-shares/{shareId}/accept-clone | Accept an offer as a clone (deep copy into your portal) |
|
|
14
|
+
| [**putAcceptMirror**](CourseShareApi.md#putacceptmirror) | **PUT** /course-shares/{shareId}/accept-mirror | Accept an offer as a mirror (no copy, live link to source) |
|
|
15
|
+
| [**putDeclineShare**](CourseShareApi.md#putdeclineshare) | **PUT** /course-shares/{shareId}/decline | Decline an offer |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## deleteCourseShare
|
|
20
|
+
|
|
21
|
+
> deleteCourseShare(shareId)
|
|
22
|
+
|
|
23
|
+
Revoke a share
|
|
24
|
+
|
|
25
|
+
Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
CourseShareApi,
|
|
33
|
+
} from '@easyedu/js-lsm-api';
|
|
34
|
+
import type { DeleteCourseShareRequest } from '@easyedu/js-lsm-api';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
38
|
+
const api = new CourseShareApi();
|
|
39
|
+
|
|
40
|
+
const body = {
|
|
41
|
+
// string
|
|
42
|
+
shareId: shareId_example,
|
|
43
|
+
} satisfies DeleteCourseShareRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.deleteCourseShare(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **shareId** | `string` | | [Defaults to `undefined`] |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
`void` (Empty response body)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
No authorization required
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: Not defined
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### HTTP response details
|
|
79
|
+
| Status code | Description | Response headers |
|
|
80
|
+
|-------------|-------------|------------------|
|
|
81
|
+
| **200** | Revoked | - |
|
|
82
|
+
| **403** | Share not owned by your portal | - |
|
|
83
|
+
| **404** | Share not found | - |
|
|
84
|
+
|
|
85
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## getCourseSharesOfferedByMe
|
|
89
|
+
|
|
90
|
+
> Array<CourseShare> getCourseSharesOfferedByMe()
|
|
91
|
+
|
|
92
|
+
List shares the current portal has offered out
|
|
93
|
+
|
|
94
|
+
### Example
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import {
|
|
98
|
+
Configuration,
|
|
99
|
+
CourseShareApi,
|
|
100
|
+
} from '@easyedu/js-lsm-api';
|
|
101
|
+
import type { GetCourseSharesOfferedByMeRequest } from '@easyedu/js-lsm-api';
|
|
102
|
+
|
|
103
|
+
async function example() {
|
|
104
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
105
|
+
const api = new CourseShareApi();
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
const data = await api.getCourseSharesOfferedByMe();
|
|
109
|
+
console.log(data);
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error(error);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Run the test
|
|
116
|
+
example().catch(console.error);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Parameters
|
|
120
|
+
|
|
121
|
+
This endpoint does not need any parameter.
|
|
122
|
+
|
|
123
|
+
### Return type
|
|
124
|
+
|
|
125
|
+
[**Array<CourseShare>**](CourseShare.md)
|
|
126
|
+
|
|
127
|
+
### Authorization
|
|
128
|
+
|
|
129
|
+
No authorization required
|
|
130
|
+
|
|
131
|
+
### HTTP request headers
|
|
132
|
+
|
|
133
|
+
- **Content-Type**: Not defined
|
|
134
|
+
- **Accept**: `application/json`
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### HTTP response details
|
|
138
|
+
| Status code | Description | Response headers |
|
|
139
|
+
|-------------|-------------|------------------|
|
|
140
|
+
| **200** | Shares | - |
|
|
141
|
+
|
|
142
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## getCourseSharesOfferedToMe
|
|
146
|
+
|
|
147
|
+
> Array<CourseShare> getCourseSharesOfferedToMe()
|
|
148
|
+
|
|
149
|
+
List shares offered to the current portal
|
|
150
|
+
|
|
151
|
+
### Example
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import {
|
|
155
|
+
Configuration,
|
|
156
|
+
CourseShareApi,
|
|
157
|
+
} from '@easyedu/js-lsm-api';
|
|
158
|
+
import type { GetCourseSharesOfferedToMeRequest } from '@easyedu/js-lsm-api';
|
|
159
|
+
|
|
160
|
+
async function example() {
|
|
161
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
162
|
+
const api = new CourseShareApi();
|
|
163
|
+
|
|
164
|
+
try {
|
|
165
|
+
const data = await api.getCourseSharesOfferedToMe();
|
|
166
|
+
console.log(data);
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error(error);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Run the test
|
|
173
|
+
example().catch(console.error);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Parameters
|
|
177
|
+
|
|
178
|
+
This endpoint does not need any parameter.
|
|
179
|
+
|
|
180
|
+
### Return type
|
|
181
|
+
|
|
182
|
+
[**Array<CourseShare>**](CourseShare.md)
|
|
183
|
+
|
|
184
|
+
### Authorization
|
|
185
|
+
|
|
186
|
+
No authorization required
|
|
187
|
+
|
|
188
|
+
### HTTP request headers
|
|
189
|
+
|
|
190
|
+
- **Content-Type**: Not defined
|
|
191
|
+
- **Accept**: `application/json`
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### HTTP response details
|
|
195
|
+
| Status code | Description | Response headers |
|
|
196
|
+
|-------------|-------------|------------------|
|
|
197
|
+
| **200** | Shares | - |
|
|
198
|
+
|
|
199
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## postOfferCatalog
|
|
203
|
+
|
|
204
|
+
> PostOfferCatalogResponse postOfferCatalog(catalogId, postOfferCatalog)
|
|
205
|
+
|
|
206
|
+
Offer every course in a catalog to a descendant portal
|
|
207
|
+
|
|
208
|
+
Fans out one `course_share` per catalog member. Duplicates are silently skipped. The catalog link is preserved on each generated share via `origin_catalog_id`.
|
|
209
|
+
|
|
210
|
+
### Example
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
import {
|
|
214
|
+
Configuration,
|
|
215
|
+
CourseShareApi,
|
|
216
|
+
} from '@easyedu/js-lsm-api';
|
|
217
|
+
import type { PostOfferCatalogRequest } from '@easyedu/js-lsm-api';
|
|
218
|
+
|
|
219
|
+
async function example() {
|
|
220
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
221
|
+
const api = new CourseShareApi();
|
|
222
|
+
|
|
223
|
+
const body = {
|
|
224
|
+
// string
|
|
225
|
+
catalogId: catalogId_example,
|
|
226
|
+
// PostOfferCatalog
|
|
227
|
+
postOfferCatalog: ...,
|
|
228
|
+
} satisfies PostOfferCatalogRequest;
|
|
229
|
+
|
|
230
|
+
try {
|
|
231
|
+
const data = await api.postOfferCatalog(body);
|
|
232
|
+
console.log(data);
|
|
233
|
+
} catch (error) {
|
|
234
|
+
console.error(error);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Run the test
|
|
239
|
+
example().catch(console.error);
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Parameters
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
| Name | Type | Description | Notes |
|
|
246
|
+
|------------- | ------------- | ------------- | -------------|
|
|
247
|
+
| **catalogId** | `string` | | [Defaults to `undefined`] |
|
|
248
|
+
| **postOfferCatalog** | [PostOfferCatalog](PostOfferCatalog.md) | | |
|
|
249
|
+
|
|
250
|
+
### Return type
|
|
251
|
+
|
|
252
|
+
[**PostOfferCatalogResponse**](PostOfferCatalogResponse.md)
|
|
253
|
+
|
|
254
|
+
### Authorization
|
|
255
|
+
|
|
256
|
+
No authorization required
|
|
257
|
+
|
|
258
|
+
### HTTP request headers
|
|
259
|
+
|
|
260
|
+
- **Content-Type**: `application/json`
|
|
261
|
+
- **Accept**: `application/json`
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
### HTTP response details
|
|
265
|
+
| Status code | Description | Response headers |
|
|
266
|
+
|-------------|-------------|------------------|
|
|
267
|
+
| **201** | Catalog offered | - |
|
|
268
|
+
| **403** | Catalog not owned by your portal, or target is not a descendant | - |
|
|
269
|
+
| **404** | Catalog or target portal not found | - |
|
|
270
|
+
|
|
271
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## postOfferCourse
|
|
275
|
+
|
|
276
|
+
> PostOfferCourseResponse postOfferCourse(courseId, postOfferCourse)
|
|
277
|
+
|
|
278
|
+
Offer a single course to a descendant portal
|
|
279
|
+
|
|
280
|
+
### Example
|
|
281
|
+
|
|
282
|
+
```ts
|
|
283
|
+
import {
|
|
284
|
+
Configuration,
|
|
285
|
+
CourseShareApi,
|
|
286
|
+
} from '@easyedu/js-lsm-api';
|
|
287
|
+
import type { PostOfferCourseRequest } from '@easyedu/js-lsm-api';
|
|
288
|
+
|
|
289
|
+
async function example() {
|
|
290
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
291
|
+
const api = new CourseShareApi();
|
|
292
|
+
|
|
293
|
+
const body = {
|
|
294
|
+
// string
|
|
295
|
+
courseId: courseId_example,
|
|
296
|
+
// PostOfferCourse
|
|
297
|
+
postOfferCourse: ...,
|
|
298
|
+
} satisfies PostOfferCourseRequest;
|
|
299
|
+
|
|
300
|
+
try {
|
|
301
|
+
const data = await api.postOfferCourse(body);
|
|
302
|
+
console.log(data);
|
|
303
|
+
} catch (error) {
|
|
304
|
+
console.error(error);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Run the test
|
|
309
|
+
example().catch(console.error);
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Parameters
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
| Name | Type | Description | Notes |
|
|
316
|
+
|------------- | ------------- | ------------- | -------------|
|
|
317
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
318
|
+
| **postOfferCourse** | [PostOfferCourse](PostOfferCourse.md) | | |
|
|
319
|
+
|
|
320
|
+
### Return type
|
|
321
|
+
|
|
322
|
+
[**PostOfferCourseResponse**](PostOfferCourseResponse.md)
|
|
323
|
+
|
|
324
|
+
### Authorization
|
|
325
|
+
|
|
326
|
+
No authorization required
|
|
327
|
+
|
|
328
|
+
### HTTP request headers
|
|
329
|
+
|
|
330
|
+
- **Content-Type**: `application/json`
|
|
331
|
+
- **Accept**: `application/json`
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
### HTTP response details
|
|
335
|
+
| Status code | Description | Response headers |
|
|
336
|
+
|-------------|-------------|------------------|
|
|
337
|
+
| **201** | Share created | - |
|
|
338
|
+
| **403** | Course not owned by your portal, or target is not a descendant | - |
|
|
339
|
+
| **404** | Course or target portal not found | - |
|
|
340
|
+
|
|
341
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
## postUnrevokeShare
|
|
345
|
+
|
|
346
|
+
> postUnrevokeShare(shareId)
|
|
347
|
+
|
|
348
|
+
Restore a previously revoked share
|
|
349
|
+
|
|
350
|
+
### Example
|
|
351
|
+
|
|
352
|
+
```ts
|
|
353
|
+
import {
|
|
354
|
+
Configuration,
|
|
355
|
+
CourseShareApi,
|
|
356
|
+
} from '@easyedu/js-lsm-api';
|
|
357
|
+
import type { PostUnrevokeShareRequest } from '@easyedu/js-lsm-api';
|
|
358
|
+
|
|
359
|
+
async function example() {
|
|
360
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
361
|
+
const api = new CourseShareApi();
|
|
362
|
+
|
|
363
|
+
const body = {
|
|
364
|
+
// string
|
|
365
|
+
shareId: shareId_example,
|
|
366
|
+
} satisfies PostUnrevokeShareRequest;
|
|
367
|
+
|
|
368
|
+
try {
|
|
369
|
+
const data = await api.postUnrevokeShare(body);
|
|
370
|
+
console.log(data);
|
|
371
|
+
} catch (error) {
|
|
372
|
+
console.error(error);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Run the test
|
|
377
|
+
example().catch(console.error);
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Parameters
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
| Name | Type | Description | Notes |
|
|
384
|
+
|------------- | ------------- | ------------- | -------------|
|
|
385
|
+
| **shareId** | `string` | | [Defaults to `undefined`] |
|
|
386
|
+
|
|
387
|
+
### Return type
|
|
388
|
+
|
|
389
|
+
`void` (Empty response body)
|
|
390
|
+
|
|
391
|
+
### Authorization
|
|
392
|
+
|
|
393
|
+
No authorization required
|
|
394
|
+
|
|
395
|
+
### HTTP request headers
|
|
396
|
+
|
|
397
|
+
- **Content-Type**: Not defined
|
|
398
|
+
- **Accept**: Not defined
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
### HTTP response details
|
|
402
|
+
| Status code | Description | Response headers |
|
|
403
|
+
|-------------|-------------|------------------|
|
|
404
|
+
| **200** | Restored | - |
|
|
405
|
+
| **403** | Share not owned by your portal | - |
|
|
406
|
+
| **404** | Share not found | - |
|
|
407
|
+
|
|
408
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
## putAcceptClone
|
|
412
|
+
|
|
413
|
+
> putAcceptClone(shareId)
|
|
414
|
+
|
|
415
|
+
Accept an offer as a clone (deep copy into your portal)
|
|
416
|
+
|
|
417
|
+
### Example
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
import {
|
|
421
|
+
Configuration,
|
|
422
|
+
CourseShareApi,
|
|
423
|
+
} from '@easyedu/js-lsm-api';
|
|
424
|
+
import type { PutAcceptCloneRequest } from '@easyedu/js-lsm-api';
|
|
425
|
+
|
|
426
|
+
async function example() {
|
|
427
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
428
|
+
const api = new CourseShareApi();
|
|
429
|
+
|
|
430
|
+
const body = {
|
|
431
|
+
// string
|
|
432
|
+
shareId: shareId_example,
|
|
433
|
+
} satisfies PutAcceptCloneRequest;
|
|
434
|
+
|
|
435
|
+
try {
|
|
436
|
+
const data = await api.putAcceptClone(body);
|
|
437
|
+
console.log(data);
|
|
438
|
+
} catch (error) {
|
|
439
|
+
console.error(error);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// Run the test
|
|
444
|
+
example().catch(console.error);
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Parameters
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
| Name | Type | Description | Notes |
|
|
451
|
+
|------------- | ------------- | ------------- | -------------|
|
|
452
|
+
| **shareId** | `string` | | [Defaults to `undefined`] |
|
|
453
|
+
|
|
454
|
+
### Return type
|
|
455
|
+
|
|
456
|
+
`void` (Empty response body)
|
|
457
|
+
|
|
458
|
+
### Authorization
|
|
459
|
+
|
|
460
|
+
No authorization required
|
|
461
|
+
|
|
462
|
+
### HTTP request headers
|
|
463
|
+
|
|
464
|
+
- **Content-Type**: Not defined
|
|
465
|
+
- **Accept**: Not defined
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
### HTTP response details
|
|
469
|
+
| Status code | Description | Response headers |
|
|
470
|
+
|-------------|-------------|------------------|
|
|
471
|
+
| **200** | Accepted, course cloned | - |
|
|
472
|
+
| **403** | Share not addressed to your portal, or mode not allowed | - |
|
|
473
|
+
| **404** | Share not found | - |
|
|
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
|
+
## putAcceptMirror
|
|
479
|
+
|
|
480
|
+
> putAcceptMirror(shareId)
|
|
481
|
+
|
|
482
|
+
Accept an offer as a mirror (no copy, live link to source)
|
|
483
|
+
|
|
484
|
+
### Example
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
import {
|
|
488
|
+
Configuration,
|
|
489
|
+
CourseShareApi,
|
|
490
|
+
} from '@easyedu/js-lsm-api';
|
|
491
|
+
import type { PutAcceptMirrorRequest } from '@easyedu/js-lsm-api';
|
|
492
|
+
|
|
493
|
+
async function example() {
|
|
494
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
495
|
+
const api = new CourseShareApi();
|
|
496
|
+
|
|
497
|
+
const body = {
|
|
498
|
+
// string
|
|
499
|
+
shareId: shareId_example,
|
|
500
|
+
} satisfies PutAcceptMirrorRequest;
|
|
501
|
+
|
|
502
|
+
try {
|
|
503
|
+
const data = await api.putAcceptMirror(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
|
+
| **shareId** | `string` | | [Defaults to `undefined`] |
|
|
520
|
+
|
|
521
|
+
### Return type
|
|
522
|
+
|
|
523
|
+
`void` (Empty response body)
|
|
524
|
+
|
|
525
|
+
### Authorization
|
|
526
|
+
|
|
527
|
+
No authorization required
|
|
528
|
+
|
|
529
|
+
### HTTP request headers
|
|
530
|
+
|
|
531
|
+
- **Content-Type**: Not defined
|
|
532
|
+
- **Accept**: Not defined
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
### HTTP response details
|
|
536
|
+
| Status code | Description | Response headers |
|
|
537
|
+
|-------------|-------------|------------------|
|
|
538
|
+
| **200** | Accepted | - |
|
|
539
|
+
| **403** | Share not addressed to your portal, or mode not allowed | - |
|
|
540
|
+
| **404** | Share not found | - |
|
|
541
|
+
|
|
542
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
## putDeclineShare
|
|
546
|
+
|
|
547
|
+
> putDeclineShare(shareId)
|
|
548
|
+
|
|
549
|
+
Decline an offer
|
|
550
|
+
|
|
551
|
+
### Example
|
|
552
|
+
|
|
553
|
+
```ts
|
|
554
|
+
import {
|
|
555
|
+
Configuration,
|
|
556
|
+
CourseShareApi,
|
|
557
|
+
} from '@easyedu/js-lsm-api';
|
|
558
|
+
import type { PutDeclineShareRequest } from '@easyedu/js-lsm-api';
|
|
559
|
+
|
|
560
|
+
async function example() {
|
|
561
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
562
|
+
const api = new CourseShareApi();
|
|
563
|
+
|
|
564
|
+
const body = {
|
|
565
|
+
// string
|
|
566
|
+
shareId: shareId_example,
|
|
567
|
+
} satisfies PutDeclineShareRequest;
|
|
568
|
+
|
|
569
|
+
try {
|
|
570
|
+
const data = await api.putDeclineShare(body);
|
|
571
|
+
console.log(data);
|
|
572
|
+
} catch (error) {
|
|
573
|
+
console.error(error);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// Run the test
|
|
578
|
+
example().catch(console.error);
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### Parameters
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
| Name | Type | Description | Notes |
|
|
585
|
+
|------------- | ------------- | ------------- | -------------|
|
|
586
|
+
| **shareId** | `string` | | [Defaults to `undefined`] |
|
|
587
|
+
|
|
588
|
+
### Return type
|
|
589
|
+
|
|
590
|
+
`void` (Empty response body)
|
|
591
|
+
|
|
592
|
+
### Authorization
|
|
593
|
+
|
|
594
|
+
No authorization required
|
|
595
|
+
|
|
596
|
+
### HTTP request headers
|
|
597
|
+
|
|
598
|
+
- **Content-Type**: Not defined
|
|
599
|
+
- **Accept**: Not defined
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
### HTTP response details
|
|
603
|
+
| Status code | Description | Response headers |
|
|
604
|
+
|-------------|-------------|------------------|
|
|
605
|
+
| **200** | Declined | - |
|
|
606
|
+
| **404** | Share not found | - |
|
|
607
|
+
|
|
608
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
609
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# PortalSublicense
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`seatLimit` | number
|
|
10
|
+
`licenseStartAt` | number
|
|
11
|
+
`licenseEndAt` | number
|
|
12
|
+
`licenseState` | string
|
|
13
|
+
`activeEnrollmentCount` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PortalSublicense } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"seatLimit": null,
|
|
23
|
+
"licenseStartAt": null,
|
|
24
|
+
"licenseEndAt": null,
|
|
25
|
+
"licenseState": null,
|
|
26
|
+
"activeEnrollmentCount": null,
|
|
27
|
+
} satisfies PortalSublicense
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as PortalSublicense
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|