@easyedu/js-lsm-api 1.124.0 → 1.126.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 +4 -0
- package/README.md +7 -5
- package/dist/apis/CertificateTemplateApi.d.ts +10 -5
- package/dist/apis/CertificateTemplateApi.js +17 -12
- package/dist/apis/ContentLibraryApi.d.ts +4 -2
- package/dist/apis/ContentLibraryApi.js +5 -3
- package/dist/apis/CourseApi.d.ts +5 -4
- package/dist/apis/CourseApi.js +7 -4
- package/dist/esm/apis/CertificateTemplateApi.d.ts +10 -5
- package/dist/esm/apis/CertificateTemplateApi.js +17 -12
- package/dist/esm/apis/ContentLibraryApi.d.ts +4 -2
- package/dist/esm/apis/ContentLibraryApi.js +5 -3
- package/dist/esm/apis/CourseApi.d.ts +5 -4
- package/dist/esm/apis/CourseApi.js +7 -4
- package/dist/esm/models/CertificateTemplate.d.ts +7 -0
- package/dist/esm/models/CertificateTemplate.js +5 -0
- package/dist/esm/models/ContentLibraryTag.d.ts +12 -0
- package/dist/esm/models/ContentLibraryTag.js +8 -0
- package/dist/esm/models/ContentLibraryTagItem.d.ts +2 -0
- package/dist/esm/models/ContentLibraryTagItem.js +3 -1
- package/dist/esm/models/GetCourse.d.ts +7 -0
- package/dist/esm/models/GetCourse.js +5 -0
- package/dist/esm/models/PostCourse.d.ts +6 -0
- package/dist/esm/models/PostCourse.js +2 -0
- package/dist/esm/models/PostCourseEnrollment.d.ts +8 -4
- package/dist/esm/models/PostPortalCertificateTemplate.d.ts +57 -0
- package/dist/esm/models/PostPortalCertificateTemplate.js +52 -0
- package/dist/esm/models/PutCourse.d.ts +6 -0
- package/dist/esm/models/PutCourse.js +2 -0
- package/dist/esm/models/PutCourseEnrollment.d.ts +0 -14
- package/dist/esm/models/PutCourseEnrollment.js +0 -9
- package/dist/esm/models/PutPortalCertificateTemplate.d.ts +50 -0
- package/dist/esm/models/PutPortalCertificateTemplate.js +47 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/CertificateTemplate.d.ts +7 -0
- package/dist/models/CertificateTemplate.js +5 -0
- package/dist/models/ContentLibraryTag.d.ts +12 -0
- package/dist/models/ContentLibraryTag.js +8 -0
- package/dist/models/ContentLibraryTagItem.d.ts +2 -0
- package/dist/models/ContentLibraryTagItem.js +3 -1
- package/dist/models/GetCourse.d.ts +7 -0
- package/dist/models/GetCourse.js +5 -0
- package/dist/models/PostCourse.d.ts +6 -0
- package/dist/models/PostCourse.js +2 -0
- package/dist/models/PostCourseEnrollment.d.ts +8 -4
- package/dist/models/PostPortalCertificateTemplate.d.ts +57 -0
- package/dist/models/PostPortalCertificateTemplate.js +59 -0
- package/dist/models/PutCourse.d.ts +6 -0
- package/dist/models/PutCourse.js +2 -0
- package/dist/models/PutCourseEnrollment.d.ts +0 -14
- package/dist/models/PutCourseEnrollment.js +1 -10
- package/dist/models/PutPortalCertificateTemplate.d.ts +50 -0
- package/dist/models/PutPortalCertificateTemplate.js +54 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/CertificateTemplate.md +2 -0
- package/docs/CertificateTemplateApi.md +19 -11
- package/docs/ContentLibraryApi.md +4 -4
- package/docs/ContentLibraryTag.md +4 -0
- package/docs/CourseApi.md +12 -7
- package/docs/GetCourse.md +2 -0
- package/docs/PostCourse.md +2 -0
- package/docs/PostPortalCertificateTemplate.md +42 -0
- package/docs/PutCourse.md +2 -0
- package/docs/PutCourseEnrollment.md +0 -2
- package/docs/PutPortalCertificateTemplate.md +40 -0
- package/package.json +1 -1
- package/src/apis/CertificateTemplateApi.ts +33 -15
- package/src/apis/ContentLibraryApi.ts +5 -3
- package/src/apis/CourseApi.ts +9 -4
- package/src/models/CertificateTemplate.ts +16 -0
- package/src/models/ContentLibraryTag.ts +18 -0
- package/src/models/ContentLibraryTagItem.ts +3 -1
- package/src/models/GetCourse.ts +17 -0
- package/src/models/PostCourse.ts +8 -0
- package/src/models/PostCourseEnrollment.ts +8 -4
- package/src/models/PostPortalCertificateTemplate.ts +106 -0
- package/src/models/PutCourse.ts +8 -0
- package/src/models/PutCourseEnrollment.ts +0 -17
- package/src/models/PutPortalCertificateTemplate.ts +89 -0
- package/src/models/index.ts +2 -0
|
@@ -8,7 +8,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
8
8
|
| [**deleteResourceVersion**](ContentLibraryApi.md#deleteresourceversion) | **DELETE** /content-library/resources/{resourceId}/versions/{versionId} | Discard an unreferenced draft resource version |
|
|
9
9
|
| [**getContentLibraryItemList**](ContentLibraryApi.md#getcontentlibraryitemlist) | **GET** /content-library/items | Search Content Library items |
|
|
10
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, quizzes, and
|
|
11
|
+
| [**getContentLibraryTagItemList**](ContentLibraryApi.md#getcontentlibrarytagitemlist) | **GET** /content-library/tags/{tagId}/items | List resources, quizzes, questions, courses, and certificate designs associated with a tag |
|
|
12
12
|
| [**getContentLibraryTagList**](ContentLibraryApi.md#getcontentlibrarytaglist) | **GET** /content-library/tags | List portal Content Library tags |
|
|
13
13
|
| [**getResource**](ContentLibraryApi.md#getresource) | **GET** /content-library/resources/{resourceId} | Get a resource and all versions |
|
|
14
14
|
| [**getResourceList**](ContentLibraryApi.md#getresourcelist) | **GET** /content-library/resources | List reusable resources |
|
|
@@ -318,7 +318,7 @@ No authorization required
|
|
|
318
318
|
|
|
319
319
|
> GetContentLibraryTagItemList getContentLibraryTagItemList(tagId, kind, search, includeArchived, page, pageSize)
|
|
320
320
|
|
|
321
|
-
List resources, quizzes, and
|
|
321
|
+
List resources, quizzes, questions, courses, and certificate designs associated with a tag
|
|
322
322
|
|
|
323
323
|
### Example
|
|
324
324
|
|
|
@@ -336,7 +336,7 @@ async function example() {
|
|
|
336
336
|
const body = {
|
|
337
337
|
// string
|
|
338
338
|
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
339
|
-
// 'resource' | 'quiz' | 'question' (optional)
|
|
339
|
+
// 'resource' | 'quiz' | 'question' | 'course' | 'certificate_template' (optional)
|
|
340
340
|
kind: kind_example,
|
|
341
341
|
// string (optional)
|
|
342
342
|
search: search_example,
|
|
@@ -366,7 +366,7 @@ example().catch(console.error);
|
|
|
366
366
|
| Name | Type | Description | Notes |
|
|
367
367
|
|------------- | ------------- | ------------- | -------------|
|
|
368
368
|
| **tagId** | `string` | | [Defaults to `undefined`] |
|
|
369
|
-
| **kind** | `resource`, `quiz`, `question` | | [Optional] [Defaults to `undefined`] [Enum: resource, quiz, question] |
|
|
369
|
+
| **kind** | `resource`, `quiz`, `question`, `course`, `certificate_template` | | [Optional] [Defaults to `undefined`] [Enum: resource, quiz, question, course, certificate_template] |
|
|
370
370
|
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
371
371
|
| **includeArchived** | `boolean` | | [Optional] [Defaults to `false`] |
|
|
372
372
|
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
@@ -18,6 +18,8 @@ Name | Type
|
|
|
18
18
|
`resourceCount` | number
|
|
19
19
|
`quizCount` | number
|
|
20
20
|
`questionCount` | number
|
|
21
|
+
`courseCount` | number
|
|
22
|
+
`certificateTemplateCount` | number
|
|
21
23
|
`createdAt` | number
|
|
22
24
|
`updatedAt` | number
|
|
23
25
|
|
|
@@ -40,6 +42,8 @@ const example = {
|
|
|
40
42
|
"resourceCount": null,
|
|
41
43
|
"quizCount": null,
|
|
42
44
|
"questionCount": null,
|
|
45
|
+
"courseCount": null,
|
|
46
|
+
"certificateTemplateCount": null,
|
|
43
47
|
"createdAt": null,
|
|
44
48
|
"updatedAt": null,
|
|
45
49
|
} satisfies ContentLibraryTag
|
package/docs/CourseApi.md
CHANGED
|
@@ -29,7 +29,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
29
29
|
| [**postCourseDraft**](CourseApi.md#postcoursedraft) | **POST** /courses/{courseId}/draft | Create or return the single editable course draft |
|
|
30
30
|
| [**postCourseDraftResourceUpdateAll**](CourseApi.md#postcoursedraftresourceupdateall) | **POST** /courses/{courseId}/draft/resources/update-all | Update all draft resource placements to their latest published versions |
|
|
31
31
|
| [**postCourseDuplicate**](CourseApi.md#postcourseduplicate) | **POST** /courses/{courseId}/duplicate | Duplicate a course |
|
|
32
|
-
| [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment |
|
|
32
|
+
| [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new single-role course enrollment |
|
|
33
33
|
| [**postCourseExport**](CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course |
|
|
34
34
|
| [**postCourseImageUpload**](CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image |
|
|
35
35
|
| [**postCourseItemLearnerSessionsClear**](CourseApi.md#postcourseitemlearnersessionsclear) | **POST** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/sessions/clear | Clear all live sessions for a learner and course item |
|
|
@@ -40,7 +40,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
40
40
|
| [**postCourseVersionSection**](CourseApi.md#postcourseversionsection) | **POST** /courses/{courseId}/draft/sections | Add a root or nested section to the editable course draft |
|
|
41
41
|
| [**postCourseVersionSectionDuplicate**](CourseApi.md#postcourseversionsectionduplicate) | **POST** /courses/{courseId}/draft/sections/{sectionId}/duplicate | Recursively duplicate a draft section and reuse its pinned library items |
|
|
42
42
|
| [**putCourse**](CourseApi.md#putcourse) | **PUT** /courses/{courseId} | Update a course by id |
|
|
43
|
-
| [**putCourseEnrollment**](CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update
|
|
43
|
+
| [**putCourseEnrollment**](CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update an enrollment without changing its user type |
|
|
44
44
|
| [**putCourseItemLearnerAttemptAllowance**](CourseApi.md#putcourseitemlearnerattemptallowance) | **PUT** /courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/attempt-allowance | Set extra attempts for a learner on a course item |
|
|
45
45
|
| [**putCourseVersionDraft**](CourseApi.md#putcourseversiondraft) | **PUT** /courses/{courseId}/draft | Update progression settings on the editable course draft |
|
|
46
46
|
| [**putCourseVersionItem**](CourseApi.md#putcourseversionitem) | **PUT** /courses/{courseId}/draft/sections/{sectionId}/items/{itemId} | Update a draft placement; use the outline move endpoint to change its parent or position |
|
|
@@ -1034,7 +1034,7 @@ No authorization required
|
|
|
1034
1034
|
|
|
1035
1035
|
## getCourseList
|
|
1036
1036
|
|
|
1037
|
-
> GetCourseList getCourseList(page, pageSize, enrolled, search, recentActivitySince)
|
|
1037
|
+
> GetCourseList getCourseList(page, pageSize, enrolled, search, recentActivitySince, tagId)
|
|
1038
1038
|
|
|
1039
1039
|
get course list
|
|
1040
1040
|
|
|
@@ -1062,6 +1062,8 @@ async function example() {
|
|
|
1062
1062
|
search: search_example,
|
|
1063
1063
|
// number | Unix timestamp in seconds. Filters to courses with live content activity updated at or after this time in the selected portal. (optional)
|
|
1064
1064
|
recentActivitySince: 789,
|
|
1065
|
+
// string | Return portal-owned courses assigned to this portal tag. (optional)
|
|
1066
|
+
tagId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1065
1067
|
} satisfies GetCourseListRequest;
|
|
1066
1068
|
|
|
1067
1069
|
try {
|
|
@@ -1086,6 +1088,7 @@ example().catch(console.error);
|
|
|
1086
1088
|
| **enrolled** | `boolean` | Filter to only courses the authenticated user is enrolled in | [Optional] [Defaults to `undefined`] |
|
|
1087
1089
|
| **search** | `string` | Case-insensitive substring match against course name or description | [Optional] [Defaults to `undefined`] |
|
|
1088
1090
|
| **recentActivitySince** | `number` | Unix timestamp in seconds. Filters to courses with live content activity updated at or after this time in the selected portal. | [Optional] [Defaults to `undefined`] |
|
|
1091
|
+
| **tagId** | `string` | Return portal-owned courses assigned to this portal tag. | [Optional] [Defaults to `undefined`] |
|
|
1089
1092
|
|
|
1090
1093
|
### Return type
|
|
1091
1094
|
|
|
@@ -1610,7 +1613,7 @@ No authorization required
|
|
|
1610
1613
|
### HTTP response details
|
|
1611
1614
|
| Status code | Description | Response headers |
|
|
1612
1615
|
|-------------|-------------|------------------|
|
|
1613
|
-
| **
|
|
1616
|
+
| **201** | post course response OK | - |
|
|
1614
1617
|
|
|
1615
1618
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1616
1619
|
|
|
@@ -1823,7 +1826,7 @@ No authorization required
|
|
|
1823
1826
|
|
|
1824
1827
|
> GetCourseEnrollment postCourseEnrollment(courseId, postCourseEnrollment)
|
|
1825
1828
|
|
|
1826
|
-
Create a new course enrollment
|
|
1829
|
+
Create a new single-role course enrollment
|
|
1827
1830
|
|
|
1828
1831
|
### Example
|
|
1829
1832
|
|
|
@@ -1882,7 +1885,9 @@ No authorization required
|
|
|
1882
1885
|
### HTTP response details
|
|
1883
1886
|
| Status code | Description | Response headers |
|
|
1884
1887
|
|-------------|-------------|------------------|
|
|
1885
|
-
| **200** |
|
|
1888
|
+
| **200** | A prior terminal enrollment of the requested type was resumed | - |
|
|
1889
|
+
| **201** | A new enrollment of the requested type was created | - |
|
|
1890
|
+
| **409** | A current enrollment of the requested type already exists, or an enrollment limit was reached | - |
|
|
1886
1891
|
|
|
1887
1892
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1888
1893
|
|
|
@@ -2613,7 +2618,7 @@ No authorization required
|
|
|
2613
2618
|
|
|
2614
2619
|
> GetCourseEnrollment putCourseEnrollment(courseId, enrollmentId, putCourseEnrollment)
|
|
2615
2620
|
|
|
2616
|
-
Update
|
|
2621
|
+
Update an enrollment without changing its user type
|
|
2617
2622
|
|
|
2618
2623
|
### Example
|
|
2619
2624
|
|
package/docs/GetCourse.md
CHANGED
|
@@ -15,6 +15,7 @@ Name | Type
|
|
|
15
15
|
`accessPolicyType` | string
|
|
16
16
|
`accessDurationDays` | number
|
|
17
17
|
`accessFixedEndAt` | number
|
|
18
|
+
`tags` | [Array<ContentLibraryTag>](ContentLibraryTag.md)
|
|
18
19
|
|
|
19
20
|
## Example
|
|
20
21
|
|
|
@@ -32,6 +33,7 @@ const example = {
|
|
|
32
33
|
"accessPolicyType": null,
|
|
33
34
|
"accessDurationDays": null,
|
|
34
35
|
"accessFixedEndAt": null,
|
|
36
|
+
"tags": null,
|
|
35
37
|
} satisfies GetCourse
|
|
36
38
|
|
|
37
39
|
console.log(example)
|
package/docs/PostCourse.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`accessPolicyType` | string
|
|
12
12
|
`accessDurationDays` | number
|
|
13
13
|
`accessFixedEndAt` | number
|
|
14
|
+
`tags` | Set<string>
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"accessPolicyType": null,
|
|
25
26
|
"accessDurationDays": null,
|
|
26
27
|
"accessFixedEndAt": null,
|
|
28
|
+
"tags": null,
|
|
27
29
|
} satisfies PostCourse
|
|
28
30
|
|
|
29
31
|
console.log(example)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# PostPortalCertificateTemplate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`description` | string
|
|
11
|
+
`isDefault` | boolean
|
|
12
|
+
`designDocument` | [CertificateCanvasDocument](CertificateCanvasDocument.md)
|
|
13
|
+
`tags` | Set<string>
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PostPortalCertificateTemplate } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"name": null,
|
|
23
|
+
"description": null,
|
|
24
|
+
"isDefault": null,
|
|
25
|
+
"designDocument": null,
|
|
26
|
+
"tags": null,
|
|
27
|
+
} satisfies PostPortalCertificateTemplate
|
|
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 PostPortalCertificateTemplate
|
|
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
|
+
|
package/docs/PutCourse.md
CHANGED
|
@@ -13,6 +13,7 @@ Name | Type
|
|
|
13
13
|
`accessPolicyType` | string
|
|
14
14
|
`accessDurationDays` | number
|
|
15
15
|
`accessFixedEndAt` | number
|
|
16
|
+
`tags` | Set<string>
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"accessPolicyType": null,
|
|
29
30
|
"accessDurationDays": null,
|
|
30
31
|
"accessFixedEndAt": null,
|
|
32
|
+
"tags": null,
|
|
31
33
|
} satisfies PutCourse
|
|
32
34
|
|
|
33
35
|
console.log(example)
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`status` | string
|
|
10
|
-
`userType` | string
|
|
11
10
|
`enrollmentDateEnd` | number
|
|
12
11
|
`extensionDays` | number
|
|
13
12
|
`notes` | string
|
|
@@ -21,7 +20,6 @@ import type { PutCourseEnrollment } from '@easyedu/js-lsm-api'
|
|
|
21
20
|
// TODO: Update the object below with actual values
|
|
22
21
|
const example = {
|
|
23
22
|
"status": null,
|
|
24
|
-
"userType": null,
|
|
25
23
|
"enrollmentDateEnd": null,
|
|
26
24
|
"extensionDays": null,
|
|
27
25
|
"notes": null,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# PutPortalCertificateTemplate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`description` | string
|
|
11
|
+
`isDefault` | boolean
|
|
12
|
+
`tags` | Set<string>
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PutPortalCertificateTemplate } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"description": null,
|
|
23
|
+
"isDefault": null,
|
|
24
|
+
"tags": null,
|
|
25
|
+
} satisfies PutPortalCertificateTemplate
|
|
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 PutPortalCertificateTemplate
|
|
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
|
+
|
package/package.json
CHANGED
|
@@ -58,6 +58,11 @@ import {
|
|
|
58
58
|
PostCertificateTemplatePreviewFromJSON,
|
|
59
59
|
PostCertificateTemplatePreviewToJSON,
|
|
60
60
|
} from '../models/PostCertificateTemplatePreview';
|
|
61
|
+
import {
|
|
62
|
+
type PostPortalCertificateTemplate,
|
|
63
|
+
PostPortalCertificateTemplateFromJSON,
|
|
64
|
+
PostPortalCertificateTemplateToJSON,
|
|
65
|
+
} from '../models/PostPortalCertificateTemplate';
|
|
61
66
|
import {
|
|
62
67
|
type PutCertificateTemplate,
|
|
63
68
|
PutCertificateTemplateFromJSON,
|
|
@@ -68,6 +73,11 @@ import {
|
|
|
68
73
|
PutCertificateTemplateDraftFromJSON,
|
|
69
74
|
PutCertificateTemplateDraftToJSON,
|
|
70
75
|
} from '../models/PutCertificateTemplateDraft';
|
|
76
|
+
import {
|
|
77
|
+
type PutPortalCertificateTemplate,
|
|
78
|
+
PutPortalCertificateTemplateFromJSON,
|
|
79
|
+
PutPortalCertificateTemplateToJSON,
|
|
80
|
+
} from '../models/PutPortalCertificateTemplate';
|
|
71
81
|
|
|
72
82
|
export interface DeleteCertificateTemplateDraftRequest {
|
|
73
83
|
templateId: string;
|
|
@@ -85,6 +95,10 @@ export interface GetCertificateTemplateRequest {
|
|
|
85
95
|
templateId: string;
|
|
86
96
|
}
|
|
87
97
|
|
|
98
|
+
export interface GetCertificateTemplateListRequest {
|
|
99
|
+
tagId?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
88
102
|
export interface GetCertificateTemplateVersionsRequest {
|
|
89
103
|
templateId: string;
|
|
90
104
|
}
|
|
@@ -115,7 +129,7 @@ export interface PostCertificateAssetUploadRequest {
|
|
|
115
129
|
}
|
|
116
130
|
|
|
117
131
|
export interface PostCertificateTemplateRequest {
|
|
118
|
-
|
|
132
|
+
postPortalCertificateTemplate: PostPortalCertificateTemplate;
|
|
119
133
|
}
|
|
120
134
|
|
|
121
135
|
export interface PostCertificateTemplateArchiveRequest {
|
|
@@ -200,7 +214,7 @@ export interface PutCertificateAssetFileRequest {
|
|
|
200
214
|
|
|
201
215
|
export interface PutCertificateTemplateRequest {
|
|
202
216
|
templateId: string;
|
|
203
|
-
|
|
217
|
+
putPortalCertificateTemplate: PutPortalCertificateTemplate;
|
|
204
218
|
}
|
|
205
219
|
|
|
206
220
|
export interface PutCertificateTemplateDraftRequest {
|
|
@@ -409,9 +423,13 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
409
423
|
/**
|
|
410
424
|
* Creates request options for getCertificateTemplateList without sending the request
|
|
411
425
|
*/
|
|
412
|
-
async getCertificateTemplateListRequestOpts(): Promise<runtime.RequestOpts> {
|
|
426
|
+
async getCertificateTemplateListRequestOpts(requestParameters: GetCertificateTemplateListRequest): Promise<runtime.RequestOpts> {
|
|
413
427
|
const queryParameters: any = {};
|
|
414
428
|
|
|
429
|
+
if (requestParameters['tagId'] != null) {
|
|
430
|
+
queryParameters['tag_id'] = requestParameters['tagId'];
|
|
431
|
+
}
|
|
432
|
+
|
|
415
433
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
416
434
|
|
|
417
435
|
|
|
@@ -428,8 +446,8 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
428
446
|
/**
|
|
429
447
|
* List local and inherited certificate designs
|
|
430
448
|
*/
|
|
431
|
-
async getCertificateTemplateListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCertificateTemplateList>> {
|
|
432
|
-
const requestOptions = await this.getCertificateTemplateListRequestOpts();
|
|
449
|
+
async getCertificateTemplateListRaw(requestParameters: GetCertificateTemplateListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCertificateTemplateList>> {
|
|
450
|
+
const requestOptions = await this.getCertificateTemplateListRequestOpts(requestParameters);
|
|
433
451
|
const response = await this.request(requestOptions, initOverrides);
|
|
434
452
|
|
|
435
453
|
return new runtime.JSONApiResponse(response, (jsonValue) => GetCertificateTemplateListFromJSON(jsonValue));
|
|
@@ -438,8 +456,8 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
438
456
|
/**
|
|
439
457
|
* List local and inherited certificate designs
|
|
440
458
|
*/
|
|
441
|
-
async getCertificateTemplateList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCertificateTemplateList> {
|
|
442
|
-
const response = await this.getCertificateTemplateListRaw(initOverrides);
|
|
459
|
+
async getCertificateTemplateList(requestParameters: GetCertificateTemplateListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCertificateTemplateList> {
|
|
460
|
+
const response = await this.getCertificateTemplateListRaw(requestParameters, initOverrides);
|
|
443
461
|
return await response.value();
|
|
444
462
|
}
|
|
445
463
|
|
|
@@ -811,10 +829,10 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
811
829
|
* Creates request options for postCertificateTemplate without sending the request
|
|
812
830
|
*/
|
|
813
831
|
async postCertificateTemplateRequestOpts(requestParameters: PostCertificateTemplateRequest): Promise<runtime.RequestOpts> {
|
|
814
|
-
if (requestParameters['
|
|
832
|
+
if (requestParameters['postPortalCertificateTemplate'] == null) {
|
|
815
833
|
throw new runtime.RequiredError(
|
|
816
|
-
'
|
|
817
|
-
'Required parameter "
|
|
834
|
+
'postPortalCertificateTemplate',
|
|
835
|
+
'Required parameter "postPortalCertificateTemplate" was null or undefined when calling postCertificateTemplate().'
|
|
818
836
|
);
|
|
819
837
|
}
|
|
820
838
|
|
|
@@ -832,7 +850,7 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
832
850
|
method: 'POST',
|
|
833
851
|
headers: headerParameters,
|
|
834
852
|
query: queryParameters,
|
|
835
|
-
body:
|
|
853
|
+
body: PostPortalCertificateTemplateToJSON(requestParameters['postPortalCertificateTemplate']),
|
|
836
854
|
};
|
|
837
855
|
}
|
|
838
856
|
|
|
@@ -1754,10 +1772,10 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
1754
1772
|
);
|
|
1755
1773
|
}
|
|
1756
1774
|
|
|
1757
|
-
if (requestParameters['
|
|
1775
|
+
if (requestParameters['putPortalCertificateTemplate'] == null) {
|
|
1758
1776
|
throw new runtime.RequiredError(
|
|
1759
|
-
'
|
|
1760
|
-
'Required parameter "
|
|
1777
|
+
'putPortalCertificateTemplate',
|
|
1778
|
+
'Required parameter "putPortalCertificateTemplate" was null or undefined when calling putCertificateTemplate().'
|
|
1761
1779
|
);
|
|
1762
1780
|
}
|
|
1763
1781
|
|
|
@@ -1776,7 +1794,7 @@ export class CertificateTemplateApi extends runtime.BaseAPI {
|
|
|
1776
1794
|
method: 'PUT',
|
|
1777
1795
|
headers: headerParameters,
|
|
1778
1796
|
query: queryParameters,
|
|
1779
|
-
body:
|
|
1797
|
+
body: PutPortalCertificateTemplateToJSON(requestParameters['putPortalCertificateTemplate']),
|
|
1780
1798
|
};
|
|
1781
1799
|
}
|
|
1782
1800
|
|
|
@@ -510,7 +510,7 @@ export class ContentLibraryApi extends runtime.BaseAPI {
|
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
/**
|
|
513
|
-
* List resources, quizzes, and
|
|
513
|
+
* List resources, quizzes, questions, courses, and certificate designs associated with a tag
|
|
514
514
|
*/
|
|
515
515
|
async getContentLibraryTagItemListRaw(requestParameters: GetContentLibraryTagItemListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentLibraryTagItemList>> {
|
|
516
516
|
const requestOptions = await this.getContentLibraryTagItemListRequestOpts(requestParameters);
|
|
@@ -520,7 +520,7 @@ export class ContentLibraryApi extends runtime.BaseAPI {
|
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
/**
|
|
523
|
-
* List resources, quizzes, and
|
|
523
|
+
* List resources, quizzes, questions, courses, and certificate designs associated with a tag
|
|
524
524
|
*/
|
|
525
525
|
async getContentLibraryTagItemList(requestParameters: GetContentLibraryTagItemListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentLibraryTagItemList> {
|
|
526
526
|
const response = await this.getContentLibraryTagItemListRaw(requestParameters, initOverrides);
|
|
@@ -1651,7 +1651,9 @@ export class ContentLibraryApi extends runtime.BaseAPI {
|
|
|
1651
1651
|
export const GetContentLibraryTagItemListKindEnum = {
|
|
1652
1652
|
Resource: 'resource',
|
|
1653
1653
|
Quiz: 'quiz',
|
|
1654
|
-
Question: 'question'
|
|
1654
|
+
Question: 'question',
|
|
1655
|
+
Course: 'course',
|
|
1656
|
+
CertificateTemplate: 'certificate_template'
|
|
1655
1657
|
} as const;
|
|
1656
1658
|
export type GetContentLibraryTagItemListKindEnum = typeof GetContentLibraryTagItemListKindEnum[keyof typeof GetContentLibraryTagItemListKindEnum];
|
|
1657
1659
|
/**
|
package/src/apis/CourseApi.ts
CHANGED
|
@@ -289,6 +289,7 @@ export interface GetCourseListRequest {
|
|
|
289
289
|
enrolled?: boolean;
|
|
290
290
|
search?: string;
|
|
291
291
|
recentActivitySince?: number;
|
|
292
|
+
tagId?: string;
|
|
292
293
|
}
|
|
293
294
|
|
|
294
295
|
export interface GetCourseVersionRequest {
|
|
@@ -1232,6 +1233,10 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1232
1233
|
queryParameters['recentActivitySince'] = requestParameters['recentActivitySince'];
|
|
1233
1234
|
}
|
|
1234
1235
|
|
|
1236
|
+
if (requestParameters['tagId'] != null) {
|
|
1237
|
+
queryParameters['tag_id'] = requestParameters['tagId'];
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1235
1240
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1236
1241
|
|
|
1237
1242
|
|
|
@@ -1833,7 +1838,7 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1833
1838
|
}
|
|
1834
1839
|
|
|
1835
1840
|
/**
|
|
1836
|
-
* Create a new course enrollment
|
|
1841
|
+
* Create a new single-role course enrollment
|
|
1837
1842
|
*/
|
|
1838
1843
|
async postCourseEnrollmentRaw(requestParameters: PostCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseEnrollment>> {
|
|
1839
1844
|
const requestOptions = await this.postCourseEnrollmentRequestOpts(requestParameters);
|
|
@@ -1843,7 +1848,7 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1843
1848
|
}
|
|
1844
1849
|
|
|
1845
1850
|
/**
|
|
1846
|
-
* Create a new course enrollment
|
|
1851
|
+
* Create a new single-role course enrollment
|
|
1847
1852
|
*/
|
|
1848
1853
|
async postCourseEnrollment(requestParameters: PostCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollment> {
|
|
1849
1854
|
const response = await this.postCourseEnrollmentRaw(requestParameters, initOverrides);
|
|
@@ -2512,7 +2517,7 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2512
2517
|
}
|
|
2513
2518
|
|
|
2514
2519
|
/**
|
|
2515
|
-
* Update
|
|
2520
|
+
* Update an enrollment without changing its user type
|
|
2516
2521
|
*/
|
|
2517
2522
|
async putCourseEnrollmentRaw(requestParameters: PutCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseEnrollment>> {
|
|
2518
2523
|
const requestOptions = await this.putCourseEnrollmentRequestOpts(requestParameters);
|
|
@@ -2522,7 +2527,7 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2522
2527
|
}
|
|
2523
2528
|
|
|
2524
2529
|
/**
|
|
2525
|
-
* Update
|
|
2530
|
+
* Update an enrollment without changing its user type
|
|
2526
2531
|
*/
|
|
2527
2532
|
async putCourseEnrollment(requestParameters: PutCourseEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollment> {
|
|
2528
2533
|
const response = await this.putCourseEnrollmentRaw(requestParameters, initOverrides);
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ContentLibraryTag } from './ContentLibraryTag';
|
|
17
|
+
import {
|
|
18
|
+
ContentLibraryTagFromJSON,
|
|
19
|
+
ContentLibraryTagFromJSONTyped,
|
|
20
|
+
ContentLibraryTagToJSON,
|
|
21
|
+
ContentLibraryTagToJSONTyped,
|
|
22
|
+
} from './ContentLibraryTag';
|
|
16
23
|
import type { CertificateTemplateVersion } from './CertificateTemplateVersion';
|
|
17
24
|
import {
|
|
18
25
|
CertificateTemplateVersionFromJSON,
|
|
@@ -75,6 +82,12 @@ export interface CertificateTemplate {
|
|
|
75
82
|
* @memberof CertificateTemplate
|
|
76
83
|
*/
|
|
77
84
|
effectiveSourcePortalId?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<ContentLibraryTag>}
|
|
88
|
+
* @memberof CertificateTemplate
|
|
89
|
+
*/
|
|
90
|
+
tags: Array<ContentLibraryTag>;
|
|
78
91
|
/**
|
|
79
92
|
*
|
|
80
93
|
* @type {CertificateTemplateVersion}
|
|
@@ -136,6 +149,7 @@ export function instanceOfCertificateTemplate(value: object): value is Certifica
|
|
|
136
149
|
if (!('isDefault' in value) || value['isDefault'] === undefined) return false;
|
|
137
150
|
if (!('isInherited' in value) || value['isInherited'] === undefined) return false;
|
|
138
151
|
if (!('effectiveSource' in value) || value['effectiveSource'] === undefined) return false;
|
|
152
|
+
if (!('tags' in value) || value['tags'] === undefined) return false;
|
|
139
153
|
if (!('activeVersion' in value) || value['activeVersion'] === undefined) return false;
|
|
140
154
|
if (!('versions' in value) || value['versions'] === undefined) return false;
|
|
141
155
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
@@ -161,6 +175,7 @@ export function CertificateTemplateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
161
175
|
'isInherited': json['is_inherited'],
|
|
162
176
|
'effectiveSource': json['effective_source'],
|
|
163
177
|
'effectiveSourcePortalId': json['effective_source_portal_id'] == null ? undefined : json['effective_source_portal_id'],
|
|
178
|
+
'tags': ((json['tags'] as Array<any>).map(ContentLibraryTagFromJSON)),
|
|
164
179
|
'activeVersion': CertificateTemplateVersionFromJSON(json['active_version']),
|
|
165
180
|
'draftVersion': json['draft_version'] == null ? undefined : CertificateTemplateVersionFromJSON(json['draft_version']),
|
|
166
181
|
'versions': ((json['versions'] as Array<any>).map(CertificateTemplateVersionFromJSON)),
|
|
@@ -189,6 +204,7 @@ export function CertificateTemplateToJSONTyped(value?: CertificateTemplate | nul
|
|
|
189
204
|
'is_inherited': value['isInherited'],
|
|
190
205
|
'effective_source': value['effectiveSource'],
|
|
191
206
|
'effective_source_portal_id': value['effectiveSourcePortalId'],
|
|
207
|
+
'tags': ((value['tags'] as Array<any>).map(ContentLibraryTagToJSON)),
|
|
192
208
|
'active_version': CertificateTemplateVersionToJSON(value['activeVersion']),
|
|
193
209
|
'draft_version': CertificateTemplateVersionToJSON(value['draftVersion']),
|
|
194
210
|
'versions': ((value['versions'] as Array<any>).map(CertificateTemplateVersionToJSON)),
|
|
@@ -91,6 +91,18 @@ export interface ContentLibraryTag {
|
|
|
91
91
|
* @memberof ContentLibraryTag
|
|
92
92
|
*/
|
|
93
93
|
questionCount: number;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof ContentLibraryTag
|
|
98
|
+
*/
|
|
99
|
+
courseCount: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof ContentLibraryTag
|
|
104
|
+
*/
|
|
105
|
+
certificateTemplateCount: number;
|
|
94
106
|
/**
|
|
95
107
|
*
|
|
96
108
|
* @type {number}
|
|
@@ -118,6 +130,8 @@ export function instanceOfContentLibraryTag(value: object): value is ContentLibr
|
|
|
118
130
|
if (!('resourceCount' in value) || value['resourceCount'] === undefined) return false;
|
|
119
131
|
if (!('quizCount' in value) || value['quizCount'] === undefined) return false;
|
|
120
132
|
if (!('questionCount' in value) || value['questionCount'] === undefined) return false;
|
|
133
|
+
if (!('courseCount' in value) || value['courseCount'] === undefined) return false;
|
|
134
|
+
if (!('certificateTemplateCount' in value) || value['certificateTemplateCount'] === undefined) return false;
|
|
121
135
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
122
136
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
123
137
|
return true;
|
|
@@ -145,6 +159,8 @@ export function ContentLibraryTagFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
145
159
|
'resourceCount': json['resource_count'],
|
|
146
160
|
'quizCount': json['quiz_count'],
|
|
147
161
|
'questionCount': json['question_count'],
|
|
162
|
+
'courseCount': json['course_count'],
|
|
163
|
+
'certificateTemplateCount': json['certificate_template_count'],
|
|
148
164
|
'createdAt': json['created_at'],
|
|
149
165
|
'updatedAt': json['updated_at'],
|
|
150
166
|
};
|
|
@@ -173,6 +189,8 @@ export function ContentLibraryTagToJSONTyped(value?: ContentLibraryTag | null, i
|
|
|
173
189
|
'resource_count': value['resourceCount'],
|
|
174
190
|
'quiz_count': value['quizCount'],
|
|
175
191
|
'question_count': value['questionCount'],
|
|
192
|
+
'course_count': value['courseCount'],
|
|
193
|
+
'certificate_template_count': value['certificateTemplateCount'],
|
|
176
194
|
'created_at': value['createdAt'],
|
|
177
195
|
'updated_at': value['updatedAt'],
|
|
178
196
|
};
|
|
@@ -91,7 +91,9 @@ export interface ContentLibraryTagItem {
|
|
|
91
91
|
export const ContentLibraryTagItemKindEnum = {
|
|
92
92
|
Resource: 'resource',
|
|
93
93
|
Quiz: 'quiz',
|
|
94
|
-
Question: 'question'
|
|
94
|
+
Question: 'question',
|
|
95
|
+
Course: 'course',
|
|
96
|
+
CertificateTemplate: 'certificate_template'
|
|
95
97
|
} as const;
|
|
96
98
|
export type ContentLibraryTagItemKindEnum = typeof ContentLibraryTagItemKindEnum[keyof typeof ContentLibraryTagItemKindEnum];
|
|
97
99
|
|