@easyedu/js-lsm-api 1.30.0 → 1.32.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 +209 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +378 -28
- package/dist/apis/ContentApi.d.ts +94 -4
- package/dist/apis/ContentApi.js +292 -20
- package/dist/apis/CourseApi.js +37 -12
- package/dist/apis/ModuleApi.js +14 -4
- package/dist/apis/OtherApi.js +2 -1
- package/dist/apis/PortalApi.js +19 -7
- package/dist/apis/QuestionApi.js +13 -5
- package/dist/apis/QuizApi.js +79 -25
- package/dist/apis/ReportingApi.js +39 -9
- package/dist/apis/UserApi.js +16 -7
- package/dist/esm/apis/ContentApi.d.ts +94 -4
- package/dist/esm/apis/ContentApi.js +292 -20
- package/dist/esm/apis/CourseApi.js +37 -12
- package/dist/esm/apis/ModuleApi.js +14 -4
- package/dist/esm/apis/OtherApi.js +2 -1
- package/dist/esm/apis/PortalApi.js +19 -7
- package/dist/esm/apis/QuestionApi.js +13 -5
- package/dist/esm/apis/QuizApi.js +79 -25
- package/dist/esm/apis/ReportingApi.js +39 -9
- package/dist/esm/apis/UserApi.js +16 -7
- package/dist/esm/models/GetContentContentData.js +6 -0
- package/dist/esm/models/GetContentVersion.js +2 -2
- package/dist/esm/models/GetContentVersionListItemsInner.js +2 -2
- package/dist/esm/models/GetManualQuestionSelectionItem.js +1 -1
- package/dist/esm/models/GetQuestionListFilters.js +2 -2
- package/dist/esm/models/GetQuiz.js +2 -2
- package/dist/esm/models/GetQuizAttemptAnalyticsBasicInfo.js +2 -2
- package/dist/esm/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.js +1 -1
- package/dist/esm/models/GetQuizAttemptAttempt.js +3 -3
- package/dist/esm/models/GetQuizAttemptListAllOfAttempts.js +2 -2
- package/dist/esm/models/GetQuizAttemptListAllOfFiltersDateRange.js +2 -2
- package/dist/esm/models/GetQuizAttemptQuestionsInner.js +1 -1
- package/dist/esm/models/GetQuizAttemptQuestionsInnerCurrentAnswer.js +1 -1
- package/dist/esm/models/GetQuizCriteriaItem.js +2 -2
- package/dist/esm/models/GetQuizCriteriaListItemsInner.js +2 -2
- package/dist/esm/models/GetQuizListAllOfQuizzes.js +2 -2
- package/dist/esm/models/GetQuizQuestionsItemsInner.js +1 -1
- package/dist/esm/models/GetQuizResultsTiming.js +2 -2
- package/dist/esm/models/GetScormPackagePackageInfo.js +2 -2
- package/dist/esm/models/GetUserQuizAttemptsAllOfAttempts.js +2 -2
- package/dist/esm/models/PostContentQuizAssignment.js +3 -3
- package/dist/esm/models/PostContentQuizQuestionSelection.js +6 -0
- package/dist/esm/models/PostQuizAttemptAttempt.js +2 -2
- package/dist/esm/models/PostQuizAttemptSubmit.js +1 -1
- package/dist/esm/models/PostQuizAttemptSubmitFinalAnswersInnerAnswer.js +6 -0
- package/dist/esm/models/PostVerifyManifest.d.ts +106 -0
- package/dist/esm/models/PostVerifyManifest.js +73 -0
- package/dist/esm/models/PostVerifyManifestItemsInner.d.ts +74 -0
- package/dist/esm/models/PostVerifyManifestItemsInner.js +55 -0
- package/dist/esm/models/PostVerifyManifestResourcesInner.d.ts +56 -0
- package/dist/esm/models/PostVerifyManifestResourcesInner.js +49 -0
- package/dist/esm/models/PutQuizAnswerAnswer.js +6 -0
- package/dist/esm/models/QuizContentAssignment.js +3 -3
- package/dist/esm/models/ScormGetValueResponse.d.ts +38 -0
- package/dist/esm/models/ScormGetValueResponse.js +47 -0
- package/dist/esm/models/ScormSetValueRequest.d.ts +38 -0
- package/dist/esm/models/ScormSetValueRequest.js +47 -0
- package/dist/esm/models/ScormSetValueResponse.d.ts +32 -0
- package/dist/esm/models/ScormSetValueResponse.js +43 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/runtime.d.ts +3 -1
- package/dist/esm/runtime.js +5 -1
- package/dist/models/GetContentContentData.js +6 -0
- package/dist/models/GetContentVersion.js +2 -2
- package/dist/models/GetContentVersionListItemsInner.js +2 -2
- package/dist/models/GetManualQuestionSelectionItem.js +1 -1
- package/dist/models/GetQuestionListFilters.js +2 -2
- package/dist/models/GetQuiz.js +2 -2
- package/dist/models/GetQuizAttemptAnalyticsBasicInfo.js +2 -2
- package/dist/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.js +1 -1
- package/dist/models/GetQuizAttemptAttempt.js +3 -3
- package/dist/models/GetQuizAttemptListAllOfAttempts.js +2 -2
- package/dist/models/GetQuizAttemptListAllOfFiltersDateRange.js +2 -2
- package/dist/models/GetQuizAttemptQuestionsInner.js +1 -1
- package/dist/models/GetQuizAttemptQuestionsInnerCurrentAnswer.js +1 -1
- package/dist/models/GetQuizCriteriaItem.js +2 -2
- package/dist/models/GetQuizCriteriaListItemsInner.js +2 -2
- package/dist/models/GetQuizListAllOfQuizzes.js +2 -2
- package/dist/models/GetQuizQuestionsItemsInner.js +1 -1
- package/dist/models/GetQuizResultsTiming.js +2 -2
- package/dist/models/GetScormPackagePackageInfo.js +2 -2
- package/dist/models/GetUserQuizAttemptsAllOfAttempts.js +2 -2
- package/dist/models/PostContentQuizAssignment.js +3 -3
- package/dist/models/PostContentQuizQuestionSelection.js +6 -0
- package/dist/models/PostQuizAttemptAttempt.js +2 -2
- package/dist/models/PostQuizAttemptSubmit.js +1 -1
- package/dist/models/PostQuizAttemptSubmitFinalAnswersInnerAnswer.js +6 -0
- package/dist/models/PostVerifyManifest.d.ts +106 -0
- package/dist/models/PostVerifyManifest.js +80 -0
- package/dist/models/PostVerifyManifestItemsInner.d.ts +74 -0
- package/dist/models/PostVerifyManifestItemsInner.js +62 -0
- package/dist/models/PostVerifyManifestResourcesInner.d.ts +56 -0
- package/dist/models/PostVerifyManifestResourcesInner.js +56 -0
- package/dist/models/PutQuizAnswerAnswer.js +6 -0
- package/dist/models/QuizContentAssignment.js +3 -3
- package/dist/models/ScormGetValueResponse.d.ts +38 -0
- package/dist/models/ScormGetValueResponse.js +54 -0
- package/dist/models/ScormSetValueRequest.d.ts +38 -0
- package/dist/models/ScormSetValueRequest.js +54 -0
- package/dist/models/ScormSetValueResponse.d.ts +32 -0
- package/dist/models/ScormSetValueResponse.js +50 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/runtime.d.ts +3 -1
- package/dist/runtime.js +5 -1
- package/docs/ContentApi.md +1645 -0
- package/docs/CourseApi.md +845 -0
- package/docs/CriteriaBasedSelection.md +40 -0
- package/docs/CriteriaBasedSelectionCriteria.md +42 -0
- package/docs/CriteriaBasedSelectionDistribution.md +37 -0
- package/docs/FillInBlank.md +36 -0
- package/docs/FillInBlank1.md +36 -0
- package/docs/GetContent.md +58 -0
- package/docs/GetContentContentData.md +53 -0
- package/docs/GetContentGradeDetail.md +50 -0
- package/docs/GetContentGrades.md +42 -0
- package/docs/GetContentGradesItemsInner.md +40 -0
- package/docs/GetContentGradesItemsInnerUser.md +38 -0
- package/docs/GetContentInstructorBasicReporting.md +38 -0
- package/docs/GetContentInstructorBasicReportingContentInfo.md +38 -0
- package/docs/GetContentInstructorBasicReportingEngagement.md +42 -0
- package/docs/GetContentInstructorBasicReportingPerformance.md +36 -0
- package/docs/GetContentList.md +43 -0
- package/docs/GetContentSession.md +45 -0
- package/docs/GetContentSessionDetail.md +51 -0
- package/docs/GetContentSessionDetailScormSessionDataInner.md +36 -0
- package/docs/GetContentSessionDetailUserData.md +36 -0
- package/docs/GetContentSessionList.md +43 -0
- package/docs/GetContentSessionListItem.md +45 -0
- package/docs/GetContentSessionListItemScormSessionData.md +35 -0
- package/docs/GetContentUpload.md +38 -0
- package/docs/GetContentVersion.md +49 -0
- package/docs/GetContentVersionList.md +43 -0
- package/docs/GetContentVersionListItemsInner.md +42 -0
- package/docs/GetContentVersionSandbox.md +35 -0
- package/docs/GetContentVersionScormData.md +35 -0
- package/docs/GetCourse.md +44 -0
- package/docs/GetCourseEnrollment.md +51 -0
- package/docs/GetCourseEnrollmentList.md +43 -0
- package/docs/GetCourseEnrollmentListItem.md +53 -0
- package/docs/GetCourseExport.md +49 -0
- package/docs/GetCourseExportList.md +43 -0
- package/docs/GetCourseList.md +43 -0
- package/docs/GetCourseReportingBasic.md +38 -0
- package/docs/GetCourseStudentReporting.md +38 -0
- package/docs/GetCourseStudentReportingCourseInfo.md +34 -0
- package/docs/GetCourseStudentReportingEngagement.md +36 -0
- package/docs/GetCourseStudentReportingPerformance.md +34 -0
- package/docs/GetManualQuestionSelectionItem.md +48 -0
- package/docs/GetManualQuestionSelectionList.md +44 -0
- package/docs/GetModule.md +44 -0
- package/docs/GetModuleInstructorBasicReporting.md +38 -0
- package/docs/GetModuleInstructorBasicReportingEngagement.md +34 -0
- package/docs/GetModuleInstructorBasicReportingModuleInfo.md +34 -0
- package/docs/GetModuleInstructorBasicReportingPerformance.md +34 -0
- package/docs/GetModuleList.md +43 -0
- package/docs/GetModuleStudentReporting.md +38 -0
- package/docs/GetModuleStudentReportingAccess.md +36 -0
- package/docs/GetModuleStudentReportingProgress.md +36 -0
- package/docs/GetPortal.md +48 -0
- package/docs/GetPortalBasicReporting.md +36 -0
- package/docs/GetPortalBasicReportingCertificates.md +34 -0
- package/docs/GetPortalBasicReportingPortalInfo.md +38 -0
- package/docs/GetPortalList.md +43 -0
- package/docs/GetPortalStudentReporting.md +36 -0
- package/docs/GetPortalStudentReportingCertificates.md +34 -0
- package/docs/GetPortalStudentReportingPortalInfo.md +38 -0
- package/docs/GetPortalUser.md +45 -0
- package/docs/GetPortalUserList.md +43 -0
- package/docs/GetQuestion.md +62 -0
- package/docs/GetQuestionAnswerChoicesInner.md +38 -0
- package/docs/GetQuestionList.md +44 -0
- package/docs/GetQuestionListFilters.md +48 -0
- package/docs/GetQuiz.md +68 -0
- package/docs/GetQuizAttempt.md +38 -0
- package/docs/GetQuizAttemptAnalytics.md +46 -0
- package/docs/GetQuizAttemptAnalyticsBasicInfo.md +49 -0
- package/docs/GetQuizAttemptAnalyticsPerformanceBreakdown.md +39 -0
- package/docs/GetQuizAttemptAnalyticsPerformanceBreakdownByDifficultyInner.md +44 -0
- package/docs/GetQuizAttemptAnalyticsPerformanceBreakdownByQuestionTypeInner.md +44 -0
- package/docs/GetQuizAttemptAnalyticsPerformanceBreakdownByTopicInner.md +44 -0
- package/docs/GetQuizAttemptAnalyticsQuestionAnalysisInner.md +58 -0
- package/docs/GetQuizAttemptAnalyticsQuestionAnalysisInnerCorrectAnswer.md +39 -0
- package/docs/GetQuizAttemptAnalyticsQuestionAnalysisInnerUserAnswer.md +39 -0
- package/docs/GetQuizAttemptAnalyticsScoring.md +49 -0
- package/docs/GetQuizAttemptAttempt.md +61 -0
- package/docs/GetQuizAttemptList.md +46 -0
- package/docs/GetQuizAttemptListAllOfAttempts.md +68 -0
- package/docs/GetQuizAttemptListAllOfFilters.md +45 -0
- package/docs/GetQuizAttemptListAllOfFiltersDateRange.md +37 -0
- package/docs/GetQuizAttemptListAllOfSummary.md +45 -0
- package/docs/GetQuizAttemptQuestionsInner.md +52 -0
- package/docs/GetQuizAttemptQuestionsInnerAnswerChoicesInner.md +38 -0
- package/docs/GetQuizAttemptQuestionsInnerCurrentAnswer.md +41 -0
- package/docs/GetQuizAttemptQuizSettings.md +45 -0
- package/docs/GetQuizCriteria.md +38 -0
- package/docs/GetQuizCriteriaEstimatedQuestions.md +39 -0
- package/docs/GetQuizCriteriaItem.md +58 -0
- package/docs/GetQuizCriteriaList.md +42 -0
- package/docs/GetQuizCriteriaListItemsInner.md +58 -0
- package/docs/GetQuizList.md +44 -0
- package/docs/GetQuizListAllOfFilters.md +43 -0
- package/docs/GetQuizListAllOfQuizzes.md +64 -0
- package/docs/GetQuizListAllOfStatistics.md +43 -0
- package/docs/GetQuizQuestions.md +48 -0
- package/docs/GetQuizQuestionsItemsInner.md +48 -0
- package/docs/GetQuizQuestionsItemsInnerQuestionDetails.md +53 -0
- package/docs/GetQuizQuestionsItemsInnerQuestionDetailsAnswerChoicesInner.md +42 -0
- package/docs/GetQuizResults.md +52 -0
- package/docs/GetQuizResultsFeedback.md +39 -0
- package/docs/GetQuizResultsFeedbackDifficultyPerformanceInner.md +40 -0
- package/docs/GetQuizResultsFeedbackTopicPerformanceInner.md +40 -0
- package/docs/GetQuizResultsQuestionsInner.md +50 -0
- package/docs/GetQuizResultsQuestionsInnerAnswerChoicesInner.md +40 -0
- package/docs/GetQuizResultsQuestionsInnerStudentAnswer.md +43 -0
- package/docs/GetQuizResultsScore.md +41 -0
- package/docs/GetQuizResultsTiming.md +43 -0
- package/docs/GetQuizStatistics.md +43 -0
- package/docs/GetScormApiLogItem.md +45 -0
- package/docs/GetScormApiLogs.md +43 -0
- package/docs/GetScormPackage.md +37 -0
- package/docs/GetScormPackagePackageInfo.md +59 -0
- package/docs/GetScormSessionData.md +43 -0
- package/docs/GetScormSessionDataActivity.md +36 -0
- package/docs/GetUser.md +42 -0
- package/docs/GetUserQuizAttempts.md +46 -0
- package/docs/GetUserQuizAttemptsAllOfAttempts.md +70 -0
- package/docs/GetUserQuizAttemptsAllOfFilters.md +47 -0
- package/docs/GetUserQuizAttemptsAllOfSummary.md +47 -0
- package/docs/LoginRes.md +36 -0
- package/docs/LoginResAuthData.md +36 -0
- package/docs/LoginResUserData.md +40 -0
- package/docs/LoginResUserDataSelectedPortal.md +36 -0
- package/docs/ManualSelection.md +36 -0
- package/docs/MediaContent.md +38 -0
- package/docs/ModuleApi.md +284 -0
- package/docs/MultipleAnswer.md +36 -0
- package/docs/MultipleAnswer1.md +36 -0
- package/docs/NoAnswer.md +34 -0
- package/docs/OtherApi.md +66 -0
- package/docs/Paginated.md +40 -0
- package/docs/PortalApi.md +493 -0
- package/docs/PostContentQuiz.md +42 -0
- package/docs/PostContentQuizAssignment.md +41 -0
- package/docs/PostContentQuizQuestionSelection.md +43 -0
- package/docs/PostContentQuizSettings.md +51 -0
- package/docs/PostContentSession.md +43 -0
- package/docs/PostContentUpload.md +36 -0
- package/docs/PostCourse.md +38 -0
- package/docs/PostCourseEnrollment.md +40 -0
- package/docs/PostCourseExport.md +35 -0
- package/docs/PostLogin.md +36 -0
- package/docs/PostManualQuestionSelection.md +40 -0
- package/docs/PostModule.md +38 -0
- package/docs/PostPortal.md +38 -0
- package/docs/PostPortalInvite.md +40 -0
- package/docs/PostQuestion.md +52 -0
- package/docs/PostQuestionAnswerChoicesInner.md +36 -0
- package/docs/PostQuiz.md +58 -0
- package/docs/PostQuizAttempt.md +38 -0
- package/docs/PostQuizAttemptAttempt.md +55 -0
- package/docs/PostQuizAttemptQuestionsInner.md +48 -0
- package/docs/PostQuizAttemptQuestionsInnerAnswerChoicesInner.md +38 -0
- package/docs/PostQuizAttemptQuizSettings.md +45 -0
- package/docs/PostQuizAttemptSubmit.md +38 -0
- package/docs/PostQuizAttemptSubmitFinalAnswersInner.md +36 -0
- package/docs/PostQuizAttemptSubmitFinalAnswersInnerAnswer.md +41 -0
- package/docs/PostQuizCriteria.md +36 -0
- package/docs/PostQuizCriteriaCriteriaInner.md +49 -0
- package/docs/PostQuizQuestions.md +36 -0
- package/docs/PostQuizQuestionsQuestionsInner.md +40 -0
- package/docs/PostQuizSettings.md +41 -0
- package/docs/PostResetPassword.md +36 -0
- package/docs/PostSendResetPassword.md +34 -0
- package/docs/PostVerifyManifest.md +59 -0
- package/docs/PostVerifyManifestItemsInner.md +48 -0
- package/docs/PostVerifyManifestResourcesInner.md +42 -0
- package/docs/PutContent.md +36 -0
- package/docs/PutContentVersion.md +35 -0
- package/docs/PutCourse.md +44 -0
- package/docs/PutCourseEnrollment.md +40 -0
- package/docs/PutModule.md +40 -0
- package/docs/PutPortalBranding.md +38 -0
- package/docs/PutQuestion.md +52 -0
- package/docs/PutQuestionAnswerChoicesInner.md +38 -0
- package/docs/PutQuiz.md +56 -0
- package/docs/PutQuizAnswer.md +36 -0
- package/docs/PutQuizAnswerAnswer.md +41 -0
- package/docs/PutQuizSettings.md +41 -0
- package/docs/PutUser.md +42 -0
- package/docs/QuestionApi.md +368 -0
- package/docs/QuizApi.md +1793 -0
- package/docs/QuizContent.md +40 -0
- package/docs/QuizContentAssignment.md +39 -0
- package/docs/QuizContentSettings.md +43 -0
- package/docs/ReportingApi.md +674 -0
- package/docs/SCORMContent.md +38 -0
- package/docs/ScormGetValueResponse.md +37 -0
- package/docs/ScormSessionData.md +43 -0
- package/docs/ScormSessionDataProgress.md +36 -0
- package/docs/ScormSessionDataScore.md +40 -0
- package/docs/ScormSessionDataSession.md +34 -0
- package/docs/ScormSessionDataStatus.md +40 -0
- package/docs/ScormSessionDataTime.md +40 -0
- package/docs/ScormSetValueRequest.md +37 -0
- package/docs/ScormSetValueResponse.md +35 -0
- package/docs/SingleAnswer.md +36 -0
- package/docs/UserApi.md +460 -0
- package/package.json +2 -2
- package/src/apis/ContentApi.ts +421 -21
- package/src/apis/CourseApi.ts +61 -12
- package/src/apis/ModuleApi.ts +22 -4
- package/src/apis/OtherApi.ts +4 -1
- package/src/apis/PortalApi.ts +33 -7
- package/src/apis/QuestionApi.ts +23 -5
- package/src/apis/QuizApi.ts +129 -25
- package/src/apis/ReportingApi.ts +57 -9
- package/src/apis/UserApi.ts +30 -7
- package/src/models/GetContentContentData.ts +6 -3
- package/src/models/GetContentVersion.ts +2 -2
- package/src/models/GetContentVersionListItemsInner.ts +2 -2
- package/src/models/GetManualQuestionSelectionItem.ts +1 -1
- package/src/models/GetQuestionListFilters.ts +2 -2
- package/src/models/GetQuiz.ts +2 -2
- package/src/models/GetQuizAttemptAnalyticsBasicInfo.ts +2 -2
- package/src/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.ts +1 -1
- package/src/models/GetQuizAttemptAttempt.ts +3 -3
- package/src/models/GetQuizAttemptListAllOfAttempts.ts +2 -2
- package/src/models/GetQuizAttemptListAllOfFiltersDateRange.ts +2 -2
- package/src/models/GetQuizAttemptQuestionsInner.ts +1 -1
- package/src/models/GetQuizAttemptQuestionsInnerCurrentAnswer.ts +1 -1
- package/src/models/GetQuizCriteriaItem.ts +2 -2
- package/src/models/GetQuizCriteriaListItemsInner.ts +2 -2
- package/src/models/GetQuizListAllOfQuizzes.ts +2 -2
- package/src/models/GetQuizQuestionsItemsInner.ts +1 -1
- package/src/models/GetQuizResultsTiming.ts +2 -2
- package/src/models/GetScormPackagePackageInfo.ts +2 -2
- package/src/models/GetUserQuizAttemptsAllOfAttempts.ts +2 -2
- package/src/models/PostContentQuizAssignment.ts +3 -3
- package/src/models/PostContentQuizQuestionSelection.ts +6 -3
- package/src/models/PostQuizAttemptAttempt.ts +2 -2
- package/src/models/PostQuizAttemptSubmit.ts +1 -1
- package/src/models/PostQuizAttemptSubmitFinalAnswersInnerAnswer.ts +6 -3
- package/src/models/PostVerifyManifest.ts +179 -0
- package/src/models/PostVerifyManifestItemsInner.ts +121 -0
- package/src/models/PostVerifyManifestResourcesInner.ts +97 -0
- package/src/models/PutQuizAnswerAnswer.ts +6 -3
- package/src/models/QuizContentAssignment.ts +3 -3
- package/src/models/ScormGetValueResponse.ts +75 -0
- package/src/models/ScormSetValueRequest.ts +75 -0
- package/src/models/ScormSetValueResponse.ts +66 -0
- package/src/models/index.ts +6 -0
- package/src/runtime.ts +5 -4
|
@@ -0,0 +1,1645 @@
|
|
|
1
|
+
# ContentApi
|
|
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
|
+
| [**commitScormSession**](ContentApi.md#commitscormsession) | **POST** /scorm/sessions/{scormSessionId}/commit | Commit SCORM session data |
|
|
8
|
+
| [**getContent**](ContentApi.md#getcontent) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | get content |
|
|
9
|
+
| [**getContentList**](ContentApi.md#getcontentlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents | get content list |
|
|
10
|
+
| [**getContentSession**](ContentApi.md#getcontentsession) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | get content session |
|
|
11
|
+
| [**getContentSessionDetail**](ContentApi.md#getcontentsessiondetail) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions/{sessionId} | Get content session details (instructor only) |
|
|
12
|
+
| [**getContentVersion**](ContentApi.md#getcontentversion) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Get details of a specific content version |
|
|
13
|
+
| [**getContentVersionList**](ContentApi.md#getcontentversionlist) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions | Get all versions of a content |
|
|
14
|
+
| [**getScormApiLogs**](ContentApi.md#getscormapilogs) | **GET** /scorm/sessions/{sessionId}/api-logs | Get SCORM API call logs (instructor only) |
|
|
15
|
+
| [**getScormPackage**](ContentApi.md#getscormpackage) | **GET** /scorm/packages/{packageId} | Get details of a SCORM package |
|
|
16
|
+
| [**getScormSessionData**](ContentApi.md#getscormsessiondata) | **GET** /scorm/sessions/{scormSessionId}/session-data | Get SCORM session data (instructor only) |
|
|
17
|
+
| [**getScormValue**](ContentApi.md#getscormvalue) | **GET** /scorm/sessions/{scormSessionId}/get-value | Get a SCORM CMI data element value |
|
|
18
|
+
| [**initializeScormSession**](ContentApi.md#initializescormsession) | **POST** /scorm/sessions/{scormSessionId}/initialize | Initialize a SCORM session |
|
|
19
|
+
| [**listContentSessions**](ContentApi.md#listcontentsessions) | **GET** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions | List content sessions (instructor only) |
|
|
20
|
+
| [**postContentProcess**](ContentApi.md#postcontentprocess) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/process | Post a new content process |
|
|
21
|
+
| [**postContentQuiz**](ContentApi.md#postcontentquiz) | **POST** /courses/{courseId}/modules/{moduleId}/contents/quiz | Create a new quiz content |
|
|
22
|
+
| [**postContentSession**](ContentApi.md#postcontentsession) | **POST** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/session | Post a new content session |
|
|
23
|
+
| [**postContentUpload**](ContentApi.md#postcontentupload) | **POST** /courses/{courseId}/modules/{moduleId}/contents/upload | Post a new content upload |
|
|
24
|
+
| [**putContent**](ContentApi.md#putcontent) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId} | Update content by id |
|
|
25
|
+
| [**putContentVersion**](ContentApi.md#putcontentversion) | **PUT** /courses/{courseId}/modules/{moduleId}/contents/{contentId}/versions/{versionId} | Update a content version |
|
|
26
|
+
| [**setScormValue**](ContentApi.md#setscormvalue) | **POST** /scorm/sessions/{scormSessionId}/set-value | Set a SCORM CMI data element value |
|
|
27
|
+
| [**terminateScormSession**](ContentApi.md#terminatescormsession) | **POST** /scorm/sessions/{scormSessionId}/terminate | Terminate a SCORM session |
|
|
28
|
+
| [**verifyScormManifest**](ContentApi.md#verifyscormmanifest) | **POST** /scorm/tools/verify-manifest | Parse and verify a SCORM manifest |
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## commitScormSession
|
|
33
|
+
|
|
34
|
+
> commitScormSession(scormSessionId)
|
|
35
|
+
|
|
36
|
+
Commit SCORM session data
|
|
37
|
+
|
|
38
|
+
Commit/persist SCORM CMI data changes to the database
|
|
39
|
+
|
|
40
|
+
### Example
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import {
|
|
44
|
+
Configuration,
|
|
45
|
+
ContentApi,
|
|
46
|
+
} from '@easyedu/js-lsm-api';
|
|
47
|
+
import type { CommitScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
48
|
+
|
|
49
|
+
async function example() {
|
|
50
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
51
|
+
const api = new ContentApi();
|
|
52
|
+
|
|
53
|
+
const body = {
|
|
54
|
+
// string | The external_id of the SCORM session
|
|
55
|
+
scormSessionId: scormSessionId_example,
|
|
56
|
+
} satisfies CommitScormSessionRequest;
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
const data = await api.commitScormSession(body);
|
|
60
|
+
console.log(data);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Run the test
|
|
67
|
+
example().catch(console.error);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Parameters
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
| Name | Type | Description | Notes |
|
|
74
|
+
|------------- | ------------- | ------------- | -------------|
|
|
75
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
76
|
+
|
|
77
|
+
### Return type
|
|
78
|
+
|
|
79
|
+
`void` (Empty response body)
|
|
80
|
+
|
|
81
|
+
### Authorization
|
|
82
|
+
|
|
83
|
+
No authorization required
|
|
84
|
+
|
|
85
|
+
### HTTP request headers
|
|
86
|
+
|
|
87
|
+
- **Content-Type**: Not defined
|
|
88
|
+
- **Accept**: Not defined
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### HTTP response details
|
|
92
|
+
| Status code | Description | Response headers |
|
|
93
|
+
|-------------|-------------|------------------|
|
|
94
|
+
| **200** | Successfully committed SCORM session data | - |
|
|
95
|
+
| **401** | Unauthorized | - |
|
|
96
|
+
| **404** | SCORM session not found | - |
|
|
97
|
+
|
|
98
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## getContent
|
|
102
|
+
|
|
103
|
+
> GetContent getContent(contentId, moduleId, courseId)
|
|
104
|
+
|
|
105
|
+
get content
|
|
106
|
+
|
|
107
|
+
### Example
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
import {
|
|
111
|
+
Configuration,
|
|
112
|
+
ContentApi,
|
|
113
|
+
} from '@easyedu/js-lsm-api';
|
|
114
|
+
import type { GetContentRequest } from '@easyedu/js-lsm-api';
|
|
115
|
+
|
|
116
|
+
async function example() {
|
|
117
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
118
|
+
const api = new ContentApi();
|
|
119
|
+
|
|
120
|
+
const body = {
|
|
121
|
+
// string
|
|
122
|
+
contentId: contentId_example,
|
|
123
|
+
// string
|
|
124
|
+
moduleId: moduleId_example,
|
|
125
|
+
// string
|
|
126
|
+
courseId: courseId_example,
|
|
127
|
+
} satisfies GetContentRequest;
|
|
128
|
+
|
|
129
|
+
try {
|
|
130
|
+
const data = await api.getContent(body);
|
|
131
|
+
console.log(data);
|
|
132
|
+
} catch (error) {
|
|
133
|
+
console.error(error);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Run the test
|
|
138
|
+
example().catch(console.error);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Parameters
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
| Name | Type | Description | Notes |
|
|
145
|
+
|------------- | ------------- | ------------- | -------------|
|
|
146
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
147
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
148
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
149
|
+
|
|
150
|
+
### Return type
|
|
151
|
+
|
|
152
|
+
[**GetContent**](GetContent.md)
|
|
153
|
+
|
|
154
|
+
### Authorization
|
|
155
|
+
|
|
156
|
+
No authorization required
|
|
157
|
+
|
|
158
|
+
### HTTP request headers
|
|
159
|
+
|
|
160
|
+
- **Content-Type**: Not defined
|
|
161
|
+
- **Accept**: `application/json`
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
### HTTP response details
|
|
165
|
+
| Status code | Description | Response headers |
|
|
166
|
+
|-------------|-------------|------------------|
|
|
167
|
+
| **200** | get content response OK | - |
|
|
168
|
+
|
|
169
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## getContentList
|
|
173
|
+
|
|
174
|
+
> GetContentList getContentList(moduleId, courseId)
|
|
175
|
+
|
|
176
|
+
get content list
|
|
177
|
+
|
|
178
|
+
### Example
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
import {
|
|
182
|
+
Configuration,
|
|
183
|
+
ContentApi,
|
|
184
|
+
} from '@easyedu/js-lsm-api';
|
|
185
|
+
import type { GetContentListRequest } from '@easyedu/js-lsm-api';
|
|
186
|
+
|
|
187
|
+
async function example() {
|
|
188
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
189
|
+
const api = new ContentApi();
|
|
190
|
+
|
|
191
|
+
const body = {
|
|
192
|
+
// string
|
|
193
|
+
moduleId: moduleId_example,
|
|
194
|
+
// string
|
|
195
|
+
courseId: courseId_example,
|
|
196
|
+
} satisfies GetContentListRequest;
|
|
197
|
+
|
|
198
|
+
try {
|
|
199
|
+
const data = await api.getContentList(body);
|
|
200
|
+
console.log(data);
|
|
201
|
+
} catch (error) {
|
|
202
|
+
console.error(error);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Run the test
|
|
207
|
+
example().catch(console.error);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Parameters
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
| Name | Type | Description | Notes |
|
|
214
|
+
|------------- | ------------- | ------------- | -------------|
|
|
215
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
216
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
217
|
+
|
|
218
|
+
### Return type
|
|
219
|
+
|
|
220
|
+
[**GetContentList**](GetContentList.md)
|
|
221
|
+
|
|
222
|
+
### Authorization
|
|
223
|
+
|
|
224
|
+
No authorization required
|
|
225
|
+
|
|
226
|
+
### HTTP request headers
|
|
227
|
+
|
|
228
|
+
- **Content-Type**: Not defined
|
|
229
|
+
- **Accept**: `application/json`
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### HTTP response details
|
|
233
|
+
| Status code | Description | Response headers |
|
|
234
|
+
|-------------|-------------|------------------|
|
|
235
|
+
| **200** | get content list response OK | - |
|
|
236
|
+
|
|
237
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
## getContentSession
|
|
241
|
+
|
|
242
|
+
> GetContentSession getContentSession(contentId, moduleId, courseId)
|
|
243
|
+
|
|
244
|
+
get content session
|
|
245
|
+
|
|
246
|
+
### Example
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
import {
|
|
250
|
+
Configuration,
|
|
251
|
+
ContentApi,
|
|
252
|
+
} from '@easyedu/js-lsm-api';
|
|
253
|
+
import type { GetContentSessionRequest } from '@easyedu/js-lsm-api';
|
|
254
|
+
|
|
255
|
+
async function example() {
|
|
256
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
257
|
+
const api = new ContentApi();
|
|
258
|
+
|
|
259
|
+
const body = {
|
|
260
|
+
// string
|
|
261
|
+
contentId: contentId_example,
|
|
262
|
+
// string
|
|
263
|
+
moduleId: moduleId_example,
|
|
264
|
+
// string
|
|
265
|
+
courseId: courseId_example,
|
|
266
|
+
} satisfies GetContentSessionRequest;
|
|
267
|
+
|
|
268
|
+
try {
|
|
269
|
+
const data = await api.getContentSession(body);
|
|
270
|
+
console.log(data);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
console.error(error);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Run the test
|
|
277
|
+
example().catch(console.error);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Parameters
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
| Name | Type | Description | Notes |
|
|
284
|
+
|------------- | ------------- | ------------- | -------------|
|
|
285
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
286
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
287
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
288
|
+
|
|
289
|
+
### Return type
|
|
290
|
+
|
|
291
|
+
[**GetContentSession**](GetContentSession.md)
|
|
292
|
+
|
|
293
|
+
### Authorization
|
|
294
|
+
|
|
295
|
+
No authorization required
|
|
296
|
+
|
|
297
|
+
### HTTP request headers
|
|
298
|
+
|
|
299
|
+
- **Content-Type**: Not defined
|
|
300
|
+
- **Accept**: `application/json`
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
### HTTP response details
|
|
304
|
+
| Status code | Description | Response headers |
|
|
305
|
+
|-------------|-------------|------------------|
|
|
306
|
+
| **200** | get content session response OK | - |
|
|
307
|
+
|
|
308
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
## getContentSessionDetail
|
|
312
|
+
|
|
313
|
+
> GetContentSessionDetail getContentSessionDetail(contentId, moduleId, courseId, sessionId)
|
|
314
|
+
|
|
315
|
+
Get content session details (instructor only)
|
|
316
|
+
|
|
317
|
+
Get detailed information about a specific content session
|
|
318
|
+
|
|
319
|
+
### Example
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
import {
|
|
323
|
+
Configuration,
|
|
324
|
+
ContentApi,
|
|
325
|
+
} from '@easyedu/js-lsm-api';
|
|
326
|
+
import type { GetContentSessionDetailRequest } from '@easyedu/js-lsm-api';
|
|
327
|
+
|
|
328
|
+
async function example() {
|
|
329
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
330
|
+
const api = new ContentApi();
|
|
331
|
+
|
|
332
|
+
const body = {
|
|
333
|
+
// string
|
|
334
|
+
contentId: contentId_example,
|
|
335
|
+
// string
|
|
336
|
+
moduleId: moduleId_example,
|
|
337
|
+
// string
|
|
338
|
+
courseId: courseId_example,
|
|
339
|
+
// string | The external_id of the content session
|
|
340
|
+
sessionId: sessionId_example,
|
|
341
|
+
} satisfies GetContentSessionDetailRequest;
|
|
342
|
+
|
|
343
|
+
try {
|
|
344
|
+
const data = await api.getContentSessionDetail(body);
|
|
345
|
+
console.log(data);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.error(error);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Run the test
|
|
352
|
+
example().catch(console.error);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
|------------- | ------------- | ------------- | -------------|
|
|
360
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
361
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
362
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
363
|
+
| **sessionId** | `string` | The external_id of the content session | [Defaults to `undefined`] |
|
|
364
|
+
|
|
365
|
+
### Return type
|
|
366
|
+
|
|
367
|
+
[**GetContentSessionDetail**](GetContentSessionDetail.md)
|
|
368
|
+
|
|
369
|
+
### Authorization
|
|
370
|
+
|
|
371
|
+
No authorization required
|
|
372
|
+
|
|
373
|
+
### HTTP request headers
|
|
374
|
+
|
|
375
|
+
- **Content-Type**: Not defined
|
|
376
|
+
- **Accept**: `application/json`
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### HTTP response details
|
|
380
|
+
| Status code | Description | Response headers |
|
|
381
|
+
|-------------|-------------|------------------|
|
|
382
|
+
| **200** | Successfully retrieved content session details | - |
|
|
383
|
+
| **401** | Unauthorized | - |
|
|
384
|
+
| **403** | Forbidden - instructor role required | - |
|
|
385
|
+
| **404** | Content session not found | - |
|
|
386
|
+
|
|
387
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
## getContentVersion
|
|
391
|
+
|
|
392
|
+
> GetContentVersion getContentVersion(contentId, moduleId, courseId, versionId)
|
|
393
|
+
|
|
394
|
+
Get details of a specific content version
|
|
395
|
+
|
|
396
|
+
Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
397
|
+
|
|
398
|
+
### Example
|
|
399
|
+
|
|
400
|
+
```ts
|
|
401
|
+
import {
|
|
402
|
+
Configuration,
|
|
403
|
+
ContentApi,
|
|
404
|
+
} from '@easyedu/js-lsm-api';
|
|
405
|
+
import type { GetContentVersionRequest } from '@easyedu/js-lsm-api';
|
|
406
|
+
|
|
407
|
+
async function example() {
|
|
408
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
409
|
+
const api = new ContentApi();
|
|
410
|
+
|
|
411
|
+
const body = {
|
|
412
|
+
// string | The content\'s external_id
|
|
413
|
+
contentId: contentId_example,
|
|
414
|
+
// string
|
|
415
|
+
moduleId: moduleId_example,
|
|
416
|
+
// string
|
|
417
|
+
courseId: courseId_example,
|
|
418
|
+
// string | The version\'s external_id
|
|
419
|
+
versionId: versionId_example,
|
|
420
|
+
} satisfies GetContentVersionRequest;
|
|
421
|
+
|
|
422
|
+
try {
|
|
423
|
+
const data = await api.getContentVersion(body);
|
|
424
|
+
console.log(data);
|
|
425
|
+
} catch (error) {
|
|
426
|
+
console.error(error);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// Run the test
|
|
431
|
+
example().catch(console.error);
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### Parameters
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
| Name | Type | Description | Notes |
|
|
438
|
+
|------------- | ------------- | ------------- | -------------|
|
|
439
|
+
| **contentId** | `string` | The content\'s external_id | [Defaults to `undefined`] |
|
|
440
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
441
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
442
|
+
| **versionId** | `string` | The version\'s external_id | [Defaults to `undefined`] |
|
|
443
|
+
|
|
444
|
+
### Return type
|
|
445
|
+
|
|
446
|
+
[**GetContentVersion**](GetContentVersion.md)
|
|
447
|
+
|
|
448
|
+
### Authorization
|
|
449
|
+
|
|
450
|
+
No authorization required
|
|
451
|
+
|
|
452
|
+
### HTTP request headers
|
|
453
|
+
|
|
454
|
+
- **Content-Type**: Not defined
|
|
455
|
+
- **Accept**: `application/json`
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
### HTTP response details
|
|
459
|
+
| Status code | Description | Response headers |
|
|
460
|
+
|-------------|-------------|------------------|
|
|
461
|
+
| **200** | Successfully retrieved content version details | - |
|
|
462
|
+
| **404** | Content or version not found | - |
|
|
463
|
+
| **401** | Unauthorized | - |
|
|
464
|
+
|
|
465
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
## getContentVersionList
|
|
469
|
+
|
|
470
|
+
> GetContentVersionList getContentVersionList(contentId, moduleId, courseId, page, pageSize)
|
|
471
|
+
|
|
472
|
+
Get all versions of a content
|
|
473
|
+
|
|
474
|
+
Returns a paginated list of all versions for the specified content. Returns an empty array if the content has no versions.
|
|
475
|
+
|
|
476
|
+
### Example
|
|
477
|
+
|
|
478
|
+
```ts
|
|
479
|
+
import {
|
|
480
|
+
Configuration,
|
|
481
|
+
ContentApi,
|
|
482
|
+
} from '@easyedu/js-lsm-api';
|
|
483
|
+
import type { GetContentVersionListRequest } from '@easyedu/js-lsm-api';
|
|
484
|
+
|
|
485
|
+
async function example() {
|
|
486
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
487
|
+
const api = new ContentApi();
|
|
488
|
+
|
|
489
|
+
const body = {
|
|
490
|
+
// string | The content\'s external_id
|
|
491
|
+
contentId: contentId_example,
|
|
492
|
+
// string
|
|
493
|
+
moduleId: moduleId_example,
|
|
494
|
+
// string
|
|
495
|
+
courseId: courseId_example,
|
|
496
|
+
// number | Page number for pagination (optional)
|
|
497
|
+
page: 56,
|
|
498
|
+
// number | Number of items per page (optional)
|
|
499
|
+
pageSize: 56,
|
|
500
|
+
} satisfies GetContentVersionListRequest;
|
|
501
|
+
|
|
502
|
+
try {
|
|
503
|
+
const data = await api.getContentVersionList(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
|
+
| **contentId** | `string` | The content\'s external_id | [Defaults to `undefined`] |
|
|
520
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
521
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
522
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
523
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
524
|
+
|
|
525
|
+
### Return type
|
|
526
|
+
|
|
527
|
+
[**GetContentVersionList**](GetContentVersionList.md)
|
|
528
|
+
|
|
529
|
+
### Authorization
|
|
530
|
+
|
|
531
|
+
No authorization required
|
|
532
|
+
|
|
533
|
+
### HTTP request headers
|
|
534
|
+
|
|
535
|
+
- **Content-Type**: Not defined
|
|
536
|
+
- **Accept**: `application/json`
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
### HTTP response details
|
|
540
|
+
| Status code | Description | Response headers |
|
|
541
|
+
|-------------|-------------|------------------|
|
|
542
|
+
| **200** | Successfully retrieved content versions | - |
|
|
543
|
+
| **404** | Content not found | - |
|
|
544
|
+
| **401** | Unauthorized | - |
|
|
545
|
+
|
|
546
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
## getScormApiLogs
|
|
550
|
+
|
|
551
|
+
> GetScormApiLogs getScormApiLogs(sessionId, page, pageSize)
|
|
552
|
+
|
|
553
|
+
Get SCORM API call logs (instructor only)
|
|
554
|
+
|
|
555
|
+
Get a paginated history of all SCORM API calls made during this session for debugging and troubleshooting
|
|
556
|
+
|
|
557
|
+
### Example
|
|
558
|
+
|
|
559
|
+
```ts
|
|
560
|
+
import {
|
|
561
|
+
Configuration,
|
|
562
|
+
ContentApi,
|
|
563
|
+
} from '@easyedu/js-lsm-api';
|
|
564
|
+
import type { GetScormApiLogsRequest } from '@easyedu/js-lsm-api';
|
|
565
|
+
|
|
566
|
+
async function example() {
|
|
567
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
568
|
+
const api = new ContentApi();
|
|
569
|
+
|
|
570
|
+
const body = {
|
|
571
|
+
// string | The external_id of the SCORM session
|
|
572
|
+
sessionId: sessionId_example,
|
|
573
|
+
// number | Page number for pagination (optional)
|
|
574
|
+
page: 56,
|
|
575
|
+
// number | Number of items per page (optional)
|
|
576
|
+
pageSize: 56,
|
|
577
|
+
} satisfies GetScormApiLogsRequest;
|
|
578
|
+
|
|
579
|
+
try {
|
|
580
|
+
const data = await api.getScormApiLogs(body);
|
|
581
|
+
console.log(data);
|
|
582
|
+
} catch (error) {
|
|
583
|
+
console.error(error);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// Run the test
|
|
588
|
+
example().catch(console.error);
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### Parameters
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
| Name | Type | Description | Notes |
|
|
595
|
+
|------------- | ------------- | ------------- | -------------|
|
|
596
|
+
| **sessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
597
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
598
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `50`] |
|
|
599
|
+
|
|
600
|
+
### Return type
|
|
601
|
+
|
|
602
|
+
[**GetScormApiLogs**](GetScormApiLogs.md)
|
|
603
|
+
|
|
604
|
+
### Authorization
|
|
605
|
+
|
|
606
|
+
No authorization required
|
|
607
|
+
|
|
608
|
+
### HTTP request headers
|
|
609
|
+
|
|
610
|
+
- **Content-Type**: Not defined
|
|
611
|
+
- **Accept**: `application/json`
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
### HTTP response details
|
|
615
|
+
| Status code | Description | Response headers |
|
|
616
|
+
|-------------|-------------|------------------|
|
|
617
|
+
| **200** | Successfully retrieved SCORM API logs | - |
|
|
618
|
+
| **401** | Unauthorized | - |
|
|
619
|
+
| **403** | Forbidden - instructor role required | - |
|
|
620
|
+
| **404** | SCORM session not found | - |
|
|
621
|
+
|
|
622
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
## getScormPackage
|
|
626
|
+
|
|
627
|
+
> GetScormPackage getScormPackage(packageId)
|
|
628
|
+
|
|
629
|
+
Get details of a SCORM package
|
|
630
|
+
|
|
631
|
+
Returns package information and table of contents for a SCORM package
|
|
632
|
+
|
|
633
|
+
### Example
|
|
634
|
+
|
|
635
|
+
```ts
|
|
636
|
+
import {
|
|
637
|
+
Configuration,
|
|
638
|
+
ContentApi,
|
|
639
|
+
} from '@easyedu/js-lsm-api';
|
|
640
|
+
import type { GetScormPackageRequest } from '@easyedu/js-lsm-api';
|
|
641
|
+
|
|
642
|
+
async function example() {
|
|
643
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
644
|
+
const api = new ContentApi();
|
|
645
|
+
|
|
646
|
+
const body = {
|
|
647
|
+
// string | The external_id of the SCORM package
|
|
648
|
+
packageId: packageId_example,
|
|
649
|
+
} satisfies GetScormPackageRequest;
|
|
650
|
+
|
|
651
|
+
try {
|
|
652
|
+
const data = await api.getScormPackage(body);
|
|
653
|
+
console.log(data);
|
|
654
|
+
} catch (error) {
|
|
655
|
+
console.error(error);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// Run the test
|
|
660
|
+
example().catch(console.error);
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
### Parameters
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
| Name | Type | Description | Notes |
|
|
667
|
+
|------------- | ------------- | ------------- | -------------|
|
|
668
|
+
| **packageId** | `string` | The external_id of the SCORM package | [Defaults to `undefined`] |
|
|
669
|
+
|
|
670
|
+
### Return type
|
|
671
|
+
|
|
672
|
+
[**GetScormPackage**](GetScormPackage.md)
|
|
673
|
+
|
|
674
|
+
### Authorization
|
|
675
|
+
|
|
676
|
+
No authorization required
|
|
677
|
+
|
|
678
|
+
### HTTP request headers
|
|
679
|
+
|
|
680
|
+
- **Content-Type**: Not defined
|
|
681
|
+
- **Accept**: `application/json`
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
### HTTP response details
|
|
685
|
+
| Status code | Description | Response headers |
|
|
686
|
+
|-------------|-------------|------------------|
|
|
687
|
+
| **200** | Successfully retrieved SCORM package details | - |
|
|
688
|
+
| **401** | Unauthorized | - |
|
|
689
|
+
| **404** | SCORM package not found | - |
|
|
690
|
+
|
|
691
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
## getScormSessionData
|
|
695
|
+
|
|
696
|
+
> GetScormSessionData getScormSessionData(scormSessionId)
|
|
697
|
+
|
|
698
|
+
Get SCORM session data (instructor only)
|
|
699
|
+
|
|
700
|
+
Get detailed SCORM session data including CMI data dump for debugging
|
|
701
|
+
|
|
702
|
+
### Example
|
|
703
|
+
|
|
704
|
+
```ts
|
|
705
|
+
import {
|
|
706
|
+
Configuration,
|
|
707
|
+
ContentApi,
|
|
708
|
+
} from '@easyedu/js-lsm-api';
|
|
709
|
+
import type { GetScormSessionDataRequest } from '@easyedu/js-lsm-api';
|
|
710
|
+
|
|
711
|
+
async function example() {
|
|
712
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
713
|
+
const api = new ContentApi();
|
|
714
|
+
|
|
715
|
+
const body = {
|
|
716
|
+
// string | The external_id of the SCORM session
|
|
717
|
+
scormSessionId: scormSessionId_example,
|
|
718
|
+
} satisfies GetScormSessionDataRequest;
|
|
719
|
+
|
|
720
|
+
try {
|
|
721
|
+
const data = await api.getScormSessionData(body);
|
|
722
|
+
console.log(data);
|
|
723
|
+
} catch (error) {
|
|
724
|
+
console.error(error);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Run the test
|
|
729
|
+
example().catch(console.error);
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### Parameters
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description | Notes |
|
|
736
|
+
|------------- | ------------- | ------------- | -------------|
|
|
737
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
738
|
+
|
|
739
|
+
### Return type
|
|
740
|
+
|
|
741
|
+
[**GetScormSessionData**](GetScormSessionData.md)
|
|
742
|
+
|
|
743
|
+
### Authorization
|
|
744
|
+
|
|
745
|
+
No authorization required
|
|
746
|
+
|
|
747
|
+
### HTTP request headers
|
|
748
|
+
|
|
749
|
+
- **Content-Type**: Not defined
|
|
750
|
+
- **Accept**: `application/json`
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
### HTTP response details
|
|
754
|
+
| Status code | Description | Response headers |
|
|
755
|
+
|-------------|-------------|------------------|
|
|
756
|
+
| **200** | Successfully retrieved SCORM session data | - |
|
|
757
|
+
| **401** | Unauthorized | - |
|
|
758
|
+
| **403** | Forbidden - instructor role required | - |
|
|
759
|
+
| **404** | SCORM session not found | - |
|
|
760
|
+
|
|
761
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
## getScormValue
|
|
765
|
+
|
|
766
|
+
> ScormGetValueResponse getScormValue(scormSessionId, key)
|
|
767
|
+
|
|
768
|
+
Get a SCORM CMI data element value
|
|
769
|
+
|
|
770
|
+
Retrieve the value of a specific SCORM CMI data element from the session
|
|
771
|
+
|
|
772
|
+
### Example
|
|
773
|
+
|
|
774
|
+
```ts
|
|
775
|
+
import {
|
|
776
|
+
Configuration,
|
|
777
|
+
ContentApi,
|
|
778
|
+
} from '@easyedu/js-lsm-api';
|
|
779
|
+
import type { GetScormValueRequest } from '@easyedu/js-lsm-api';
|
|
780
|
+
|
|
781
|
+
async function example() {
|
|
782
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
783
|
+
const api = new ContentApi();
|
|
784
|
+
|
|
785
|
+
const body = {
|
|
786
|
+
// string | The external_id of the SCORM session
|
|
787
|
+
scormSessionId: scormSessionId_example,
|
|
788
|
+
// string | The CMI element key to retrieve (e.g., cmi.core.lesson_status)
|
|
789
|
+
key: key_example,
|
|
790
|
+
} satisfies GetScormValueRequest;
|
|
791
|
+
|
|
792
|
+
try {
|
|
793
|
+
const data = await api.getScormValue(body);
|
|
794
|
+
console.log(data);
|
|
795
|
+
} catch (error) {
|
|
796
|
+
console.error(error);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// Run the test
|
|
801
|
+
example().catch(console.error);
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
### Parameters
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
| Name | Type | Description | Notes |
|
|
808
|
+
|------------- | ------------- | ------------- | -------------|
|
|
809
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
810
|
+
| **key** | `string` | The CMI element key to retrieve (e.g., cmi.core.lesson_status) | [Defaults to `undefined`] |
|
|
811
|
+
|
|
812
|
+
### Return type
|
|
813
|
+
|
|
814
|
+
[**ScormGetValueResponse**](ScormGetValueResponse.md)
|
|
815
|
+
|
|
816
|
+
### Authorization
|
|
817
|
+
|
|
818
|
+
No authorization required
|
|
819
|
+
|
|
820
|
+
### HTTP request headers
|
|
821
|
+
|
|
822
|
+
- **Content-Type**: Not defined
|
|
823
|
+
- **Accept**: `application/json`
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
### HTTP response details
|
|
827
|
+
| Status code | Description | Response headers |
|
|
828
|
+
|-------------|-------------|------------------|
|
|
829
|
+
| **200** | Successfully retrieved CMI element value | - |
|
|
830
|
+
| **401** | Unauthorized | - |
|
|
831
|
+
| **404** | SCORM session not found | - |
|
|
832
|
+
|
|
833
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
## initializeScormSession
|
|
837
|
+
|
|
838
|
+
> initializeScormSession(scormSessionId)
|
|
839
|
+
|
|
840
|
+
Initialize a SCORM session
|
|
841
|
+
|
|
842
|
+
Initialize a SCORM session for content playback
|
|
843
|
+
|
|
844
|
+
### Example
|
|
845
|
+
|
|
846
|
+
```ts
|
|
847
|
+
import {
|
|
848
|
+
Configuration,
|
|
849
|
+
ContentApi,
|
|
850
|
+
} from '@easyedu/js-lsm-api';
|
|
851
|
+
import type { InitializeScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
852
|
+
|
|
853
|
+
async function example() {
|
|
854
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
855
|
+
const api = new ContentApi();
|
|
856
|
+
|
|
857
|
+
const body = {
|
|
858
|
+
// string | The external_id of the SCORM session
|
|
859
|
+
scormSessionId: scormSessionId_example,
|
|
860
|
+
} satisfies InitializeScormSessionRequest;
|
|
861
|
+
|
|
862
|
+
try {
|
|
863
|
+
const data = await api.initializeScormSession(body);
|
|
864
|
+
console.log(data);
|
|
865
|
+
} catch (error) {
|
|
866
|
+
console.error(error);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// Run the test
|
|
871
|
+
example().catch(console.error);
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
### Parameters
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
| Name | Type | Description | Notes |
|
|
878
|
+
|------------- | ------------- | ------------- | -------------|
|
|
879
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
880
|
+
|
|
881
|
+
### Return type
|
|
882
|
+
|
|
883
|
+
`void` (Empty response body)
|
|
884
|
+
|
|
885
|
+
### Authorization
|
|
886
|
+
|
|
887
|
+
No authorization required
|
|
888
|
+
|
|
889
|
+
### HTTP request headers
|
|
890
|
+
|
|
891
|
+
- **Content-Type**: Not defined
|
|
892
|
+
- **Accept**: Not defined
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
### HTTP response details
|
|
896
|
+
| Status code | Description | Response headers |
|
|
897
|
+
|-------------|-------------|------------------|
|
|
898
|
+
| **200** | Successfully initialized SCORM session | - |
|
|
899
|
+
| **401** | Unauthorized | - |
|
|
900
|
+
| **404** | SCORM session not found | - |
|
|
901
|
+
|
|
902
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
## listContentSessions
|
|
906
|
+
|
|
907
|
+
> GetContentSessionList listContentSessions(contentId, moduleId, courseId, environment, userId, page, pageSize)
|
|
908
|
+
|
|
909
|
+
List content sessions (instructor only)
|
|
910
|
+
|
|
911
|
+
Get a paginated list of all content sessions for a specific content item
|
|
912
|
+
|
|
913
|
+
### Example
|
|
914
|
+
|
|
915
|
+
```ts
|
|
916
|
+
import {
|
|
917
|
+
Configuration,
|
|
918
|
+
ContentApi,
|
|
919
|
+
} from '@easyedu/js-lsm-api';
|
|
920
|
+
import type { ListContentSessionsRequest } from '@easyedu/js-lsm-api';
|
|
921
|
+
|
|
922
|
+
async function example() {
|
|
923
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
924
|
+
const api = new ContentApi();
|
|
925
|
+
|
|
926
|
+
const body = {
|
|
927
|
+
// string
|
|
928
|
+
contentId: contentId_example,
|
|
929
|
+
// string
|
|
930
|
+
moduleId: moduleId_example,
|
|
931
|
+
// string
|
|
932
|
+
courseId: courseId_example,
|
|
933
|
+
// 'SANDBOX' | 'LIVE' | Filter sessions by environment type (SANDBOX or LIVE) (optional)
|
|
934
|
+
environment: environment_example,
|
|
935
|
+
// string | Filter sessions by user ID (external ID) (optional)
|
|
936
|
+
userId: userId_example,
|
|
937
|
+
// number | Page number for pagination (optional)
|
|
938
|
+
page: 56,
|
|
939
|
+
// number | Number of items per page (optional)
|
|
940
|
+
pageSize: 56,
|
|
941
|
+
} satisfies ListContentSessionsRequest;
|
|
942
|
+
|
|
943
|
+
try {
|
|
944
|
+
const data = await api.listContentSessions(body);
|
|
945
|
+
console.log(data);
|
|
946
|
+
} catch (error) {
|
|
947
|
+
console.error(error);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// Run the test
|
|
952
|
+
example().catch(console.error);
|
|
953
|
+
```
|
|
954
|
+
|
|
955
|
+
### Parameters
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
| Name | Type | Description | Notes |
|
|
959
|
+
|------------- | ------------- | ------------- | -------------|
|
|
960
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
961
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
962
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
963
|
+
| **environment** | `SANDBOX`, `LIVE` | Filter sessions by environment type (SANDBOX or LIVE) | [Optional] [Defaults to `undefined`] [Enum: SANDBOX, LIVE] |
|
|
964
|
+
| **userId** | `string` | Filter sessions by user ID (external ID) | [Optional] [Defaults to `undefined`] |
|
|
965
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
966
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
967
|
+
|
|
968
|
+
### Return type
|
|
969
|
+
|
|
970
|
+
[**GetContentSessionList**](GetContentSessionList.md)
|
|
971
|
+
|
|
972
|
+
### Authorization
|
|
973
|
+
|
|
974
|
+
No authorization required
|
|
975
|
+
|
|
976
|
+
### HTTP request headers
|
|
977
|
+
|
|
978
|
+
- **Content-Type**: Not defined
|
|
979
|
+
- **Accept**: `application/json`
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
### HTTP response details
|
|
983
|
+
| Status code | Description | Response headers |
|
|
984
|
+
|-------------|-------------|------------------|
|
|
985
|
+
| **200** | Successfully retrieved content sessions | - |
|
|
986
|
+
| **401** | Unauthorized | - |
|
|
987
|
+
| **403** | Forbidden - instructor role required | - |
|
|
988
|
+
| **404** | Content not found | - |
|
|
989
|
+
|
|
990
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
## postContentProcess
|
|
994
|
+
|
|
995
|
+
> GetContent postContentProcess(moduleId, courseId, contentId)
|
|
996
|
+
|
|
997
|
+
Post a new content process
|
|
998
|
+
|
|
999
|
+
### Example
|
|
1000
|
+
|
|
1001
|
+
```ts
|
|
1002
|
+
import {
|
|
1003
|
+
Configuration,
|
|
1004
|
+
ContentApi,
|
|
1005
|
+
} from '@easyedu/js-lsm-api';
|
|
1006
|
+
import type { PostContentProcessRequest } from '@easyedu/js-lsm-api';
|
|
1007
|
+
|
|
1008
|
+
async function example() {
|
|
1009
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1010
|
+
const api = new ContentApi();
|
|
1011
|
+
|
|
1012
|
+
const body = {
|
|
1013
|
+
// string
|
|
1014
|
+
moduleId: moduleId_example,
|
|
1015
|
+
// string
|
|
1016
|
+
courseId: courseId_example,
|
|
1017
|
+
// string
|
|
1018
|
+
contentId: contentId_example,
|
|
1019
|
+
} satisfies PostContentProcessRequest;
|
|
1020
|
+
|
|
1021
|
+
try {
|
|
1022
|
+
const data = await api.postContentProcess(body);
|
|
1023
|
+
console.log(data);
|
|
1024
|
+
} catch (error) {
|
|
1025
|
+
console.error(error);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
// Run the test
|
|
1030
|
+
example().catch(console.error);
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
### Parameters
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
| Name | Type | Description | Notes |
|
|
1037
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1038
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1039
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1040
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
1041
|
+
|
|
1042
|
+
### Return type
|
|
1043
|
+
|
|
1044
|
+
[**GetContent**](GetContent.md)
|
|
1045
|
+
|
|
1046
|
+
### Authorization
|
|
1047
|
+
|
|
1048
|
+
No authorization required
|
|
1049
|
+
|
|
1050
|
+
### HTTP request headers
|
|
1051
|
+
|
|
1052
|
+
- **Content-Type**: Not defined
|
|
1053
|
+
- **Accept**: `application/json`
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
### HTTP response details
|
|
1057
|
+
| Status code | Description | Response headers |
|
|
1058
|
+
|-------------|-------------|------------------|
|
|
1059
|
+
| **200** | post content response OK | - |
|
|
1060
|
+
|
|
1061
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
## postContentQuiz
|
|
1065
|
+
|
|
1066
|
+
> GetContent postContentQuiz(moduleId, courseId, postContentQuiz)
|
|
1067
|
+
|
|
1068
|
+
Create a new quiz content
|
|
1069
|
+
|
|
1070
|
+
### Example
|
|
1071
|
+
|
|
1072
|
+
```ts
|
|
1073
|
+
import {
|
|
1074
|
+
Configuration,
|
|
1075
|
+
ContentApi,
|
|
1076
|
+
} from '@easyedu/js-lsm-api';
|
|
1077
|
+
import type { PostContentQuizRequest } from '@easyedu/js-lsm-api';
|
|
1078
|
+
|
|
1079
|
+
async function example() {
|
|
1080
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1081
|
+
const api = new ContentApi();
|
|
1082
|
+
|
|
1083
|
+
const body = {
|
|
1084
|
+
// string
|
|
1085
|
+
moduleId: moduleId_example,
|
|
1086
|
+
// string
|
|
1087
|
+
courseId: courseId_example,
|
|
1088
|
+
// PostContentQuiz | Quiz content object that needs to be created
|
|
1089
|
+
postContentQuiz: ...,
|
|
1090
|
+
} satisfies PostContentQuizRequest;
|
|
1091
|
+
|
|
1092
|
+
try {
|
|
1093
|
+
const data = await api.postContentQuiz(body);
|
|
1094
|
+
console.log(data);
|
|
1095
|
+
} catch (error) {
|
|
1096
|
+
console.error(error);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
// Run the test
|
|
1101
|
+
example().catch(console.error);
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
### Parameters
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
| Name | Type | Description | Notes |
|
|
1108
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1109
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1110
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1111
|
+
| **postContentQuiz** | [PostContentQuiz](PostContentQuiz.md) | Quiz content object that needs to be created | |
|
|
1112
|
+
|
|
1113
|
+
### Return type
|
|
1114
|
+
|
|
1115
|
+
[**GetContent**](GetContent.md)
|
|
1116
|
+
|
|
1117
|
+
### Authorization
|
|
1118
|
+
|
|
1119
|
+
No authorization required
|
|
1120
|
+
|
|
1121
|
+
### HTTP request headers
|
|
1122
|
+
|
|
1123
|
+
- **Content-Type**: `application/json`
|
|
1124
|
+
- **Accept**: `application/json`
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
### HTTP response details
|
|
1128
|
+
| Status code | Description | Response headers |
|
|
1129
|
+
|-------------|-------------|------------------|
|
|
1130
|
+
| **200** | post content quiz response OK | - |
|
|
1131
|
+
| **400** | post content quiz response error | - |
|
|
1132
|
+
|
|
1133
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
## postContentSession
|
|
1137
|
+
|
|
1138
|
+
> PostContentSession postContentSession(contentId, moduleId, courseId, environment)
|
|
1139
|
+
|
|
1140
|
+
Post a new content session
|
|
1141
|
+
|
|
1142
|
+
### Example
|
|
1143
|
+
|
|
1144
|
+
```ts
|
|
1145
|
+
import {
|
|
1146
|
+
Configuration,
|
|
1147
|
+
ContentApi,
|
|
1148
|
+
} from '@easyedu/js-lsm-api';
|
|
1149
|
+
import type { PostContentSessionRequest } from '@easyedu/js-lsm-api';
|
|
1150
|
+
|
|
1151
|
+
async function example() {
|
|
1152
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1153
|
+
const api = new ContentApi();
|
|
1154
|
+
|
|
1155
|
+
const body = {
|
|
1156
|
+
// string
|
|
1157
|
+
contentId: contentId_example,
|
|
1158
|
+
// string
|
|
1159
|
+
moduleId: moduleId_example,
|
|
1160
|
+
// string
|
|
1161
|
+
courseId: courseId_example,
|
|
1162
|
+
// 'sandbox' | 'live' | Environment type for the session (defaults to live) (optional)
|
|
1163
|
+
environment: environment_example,
|
|
1164
|
+
} satisfies PostContentSessionRequest;
|
|
1165
|
+
|
|
1166
|
+
try {
|
|
1167
|
+
const data = await api.postContentSession(body);
|
|
1168
|
+
console.log(data);
|
|
1169
|
+
} catch (error) {
|
|
1170
|
+
console.error(error);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// Run the test
|
|
1175
|
+
example().catch(console.error);
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
### Parameters
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
| Name | Type | Description | Notes |
|
|
1182
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1183
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
1184
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1185
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1186
|
+
| **environment** | `sandbox`, `live` | Environment type for the session (defaults to live) | [Optional] [Defaults to `'live'`] [Enum: sandbox, live] |
|
|
1187
|
+
|
|
1188
|
+
### Return type
|
|
1189
|
+
|
|
1190
|
+
[**PostContentSession**](PostContentSession.md)
|
|
1191
|
+
|
|
1192
|
+
### Authorization
|
|
1193
|
+
|
|
1194
|
+
No authorization required
|
|
1195
|
+
|
|
1196
|
+
### HTTP request headers
|
|
1197
|
+
|
|
1198
|
+
- **Content-Type**: Not defined
|
|
1199
|
+
- **Accept**: `application/json`
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
### HTTP response details
|
|
1203
|
+
| Status code | Description | Response headers |
|
|
1204
|
+
|-------------|-------------|------------------|
|
|
1205
|
+
| **200** | post session response OK | - |
|
|
1206
|
+
|
|
1207
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
## postContentUpload
|
|
1211
|
+
|
|
1212
|
+
> GetContentUpload postContentUpload(moduleId, courseId, postContentUpload)
|
|
1213
|
+
|
|
1214
|
+
Post a new content upload
|
|
1215
|
+
|
|
1216
|
+
### Example
|
|
1217
|
+
|
|
1218
|
+
```ts
|
|
1219
|
+
import {
|
|
1220
|
+
Configuration,
|
|
1221
|
+
ContentApi,
|
|
1222
|
+
} from '@easyedu/js-lsm-api';
|
|
1223
|
+
import type { PostContentUploadRequest } from '@easyedu/js-lsm-api';
|
|
1224
|
+
|
|
1225
|
+
async function example() {
|
|
1226
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1227
|
+
const api = new ContentApi();
|
|
1228
|
+
|
|
1229
|
+
const body = {
|
|
1230
|
+
// string
|
|
1231
|
+
moduleId: moduleId_example,
|
|
1232
|
+
// string
|
|
1233
|
+
courseId: courseId_example,
|
|
1234
|
+
// PostContentUpload | Content object that needs to be added
|
|
1235
|
+
postContentUpload: ...,
|
|
1236
|
+
} satisfies PostContentUploadRequest;
|
|
1237
|
+
|
|
1238
|
+
try {
|
|
1239
|
+
const data = await api.postContentUpload(body);
|
|
1240
|
+
console.log(data);
|
|
1241
|
+
} catch (error) {
|
|
1242
|
+
console.error(error);
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
// Run the test
|
|
1247
|
+
example().catch(console.error);
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
### Parameters
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
| Name | Type | Description | Notes |
|
|
1254
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1255
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1256
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1257
|
+
| **postContentUpload** | [PostContentUpload](PostContentUpload.md) | Content object that needs to be added | |
|
|
1258
|
+
|
|
1259
|
+
### Return type
|
|
1260
|
+
|
|
1261
|
+
[**GetContentUpload**](GetContentUpload.md)
|
|
1262
|
+
|
|
1263
|
+
### Authorization
|
|
1264
|
+
|
|
1265
|
+
No authorization required
|
|
1266
|
+
|
|
1267
|
+
### HTTP request headers
|
|
1268
|
+
|
|
1269
|
+
- **Content-Type**: `application/json`
|
|
1270
|
+
- **Accept**: `application/json`
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
### HTTP response details
|
|
1274
|
+
| Status code | Description | Response headers |
|
|
1275
|
+
|-------------|-------------|------------------|
|
|
1276
|
+
| **200** | post content upload response OK | - |
|
|
1277
|
+
|
|
1278
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
## putContent
|
|
1282
|
+
|
|
1283
|
+
> GetContent putContent(contentId, moduleId, courseId, putContent)
|
|
1284
|
+
|
|
1285
|
+
Update content by id
|
|
1286
|
+
|
|
1287
|
+
### Example
|
|
1288
|
+
|
|
1289
|
+
```ts
|
|
1290
|
+
import {
|
|
1291
|
+
Configuration,
|
|
1292
|
+
ContentApi,
|
|
1293
|
+
} from '@easyedu/js-lsm-api';
|
|
1294
|
+
import type { PutContentRequest } from '@easyedu/js-lsm-api';
|
|
1295
|
+
|
|
1296
|
+
async function example() {
|
|
1297
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1298
|
+
const api = new ContentApi();
|
|
1299
|
+
|
|
1300
|
+
const body = {
|
|
1301
|
+
// string
|
|
1302
|
+
contentId: contentId_example,
|
|
1303
|
+
// string
|
|
1304
|
+
moduleId: moduleId_example,
|
|
1305
|
+
// string
|
|
1306
|
+
courseId: courseId_example,
|
|
1307
|
+
// PutContent | Content object that needs to be updated
|
|
1308
|
+
putContent: ...,
|
|
1309
|
+
} satisfies PutContentRequest;
|
|
1310
|
+
|
|
1311
|
+
try {
|
|
1312
|
+
const data = await api.putContent(body);
|
|
1313
|
+
console.log(data);
|
|
1314
|
+
} catch (error) {
|
|
1315
|
+
console.error(error);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// Run the test
|
|
1320
|
+
example().catch(console.error);
|
|
1321
|
+
```
|
|
1322
|
+
|
|
1323
|
+
### Parameters
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
| Name | Type | Description | Notes |
|
|
1327
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1328
|
+
| **contentId** | `string` | | [Defaults to `undefined`] |
|
|
1329
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1330
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1331
|
+
| **putContent** | [PutContent](PutContent.md) | Content object that needs to be updated | |
|
|
1332
|
+
|
|
1333
|
+
### Return type
|
|
1334
|
+
|
|
1335
|
+
[**GetContent**](GetContent.md)
|
|
1336
|
+
|
|
1337
|
+
### Authorization
|
|
1338
|
+
|
|
1339
|
+
No authorization required
|
|
1340
|
+
|
|
1341
|
+
### HTTP request headers
|
|
1342
|
+
|
|
1343
|
+
- **Content-Type**: `application/json`
|
|
1344
|
+
- **Accept**: `application/json`
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
### HTTP response details
|
|
1348
|
+
| Status code | Description | Response headers |
|
|
1349
|
+
|-------------|-------------|------------------|
|
|
1350
|
+
| **200** | put content response OK | - |
|
|
1351
|
+
|
|
1352
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
## putContentVersion
|
|
1356
|
+
|
|
1357
|
+
> GetContentVersion putContentVersion(contentId, moduleId, courseId, versionId, putContentVersion)
|
|
1358
|
+
|
|
1359
|
+
Update a content version
|
|
1360
|
+
|
|
1361
|
+
Activates this version by setting is_active to true. Automatically deactivates all other versions of the same content. Only setting is_active to true is allowed.
|
|
1362
|
+
|
|
1363
|
+
### Example
|
|
1364
|
+
|
|
1365
|
+
```ts
|
|
1366
|
+
import {
|
|
1367
|
+
Configuration,
|
|
1368
|
+
ContentApi,
|
|
1369
|
+
} from '@easyedu/js-lsm-api';
|
|
1370
|
+
import type { PutContentVersionRequest } from '@easyedu/js-lsm-api';
|
|
1371
|
+
|
|
1372
|
+
async function example() {
|
|
1373
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1374
|
+
const api = new ContentApi();
|
|
1375
|
+
|
|
1376
|
+
const body = {
|
|
1377
|
+
// string | The content\'s external_id
|
|
1378
|
+
contentId: contentId_example,
|
|
1379
|
+
// string
|
|
1380
|
+
moduleId: moduleId_example,
|
|
1381
|
+
// string
|
|
1382
|
+
courseId: courseId_example,
|
|
1383
|
+
// string | The version\'s external_id
|
|
1384
|
+
versionId: versionId_example,
|
|
1385
|
+
// PutContentVersion
|
|
1386
|
+
putContentVersion: ...,
|
|
1387
|
+
} satisfies PutContentVersionRequest;
|
|
1388
|
+
|
|
1389
|
+
try {
|
|
1390
|
+
const data = await api.putContentVersion(body);
|
|
1391
|
+
console.log(data);
|
|
1392
|
+
} catch (error) {
|
|
1393
|
+
console.error(error);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
// Run the test
|
|
1398
|
+
example().catch(console.error);
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
### Parameters
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
| Name | Type | Description | Notes |
|
|
1405
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1406
|
+
| **contentId** | `string` | The content\'s external_id | [Defaults to `undefined`] |
|
|
1407
|
+
| **moduleId** | `string` | | [Defaults to `undefined`] |
|
|
1408
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1409
|
+
| **versionId** | `string` | The version\'s external_id | [Defaults to `undefined`] |
|
|
1410
|
+
| **putContentVersion** | [PutContentVersion](PutContentVersion.md) | | |
|
|
1411
|
+
|
|
1412
|
+
### Return type
|
|
1413
|
+
|
|
1414
|
+
[**GetContentVersion**](GetContentVersion.md)
|
|
1415
|
+
|
|
1416
|
+
### Authorization
|
|
1417
|
+
|
|
1418
|
+
No authorization required
|
|
1419
|
+
|
|
1420
|
+
### HTTP request headers
|
|
1421
|
+
|
|
1422
|
+
- **Content-Type**: `application/json`
|
|
1423
|
+
- **Accept**: `application/json`
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
### HTTP response details
|
|
1427
|
+
| Status code | Description | Response headers |
|
|
1428
|
+
|-------------|-------------|------------------|
|
|
1429
|
+
| **200** | Successfully updated content version | - |
|
|
1430
|
+
| **400** | Bad request (e.g., trying to set is_active to false) | - |
|
|
1431
|
+
| **401** | Unauthorized | - |
|
|
1432
|
+
| **403** | Forbidden - you do not have permission to update this content version | - |
|
|
1433
|
+
| **404** | Content or version not found | - |
|
|
1434
|
+
|
|
1435
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
## setScormValue
|
|
1439
|
+
|
|
1440
|
+
> ScormSetValueResponse setScormValue(scormSessionId, scormSetValueRequest)
|
|
1441
|
+
|
|
1442
|
+
Set a SCORM CMI data element value
|
|
1443
|
+
|
|
1444
|
+
Update the value of a specific SCORM CMI data element in the session
|
|
1445
|
+
|
|
1446
|
+
### Example
|
|
1447
|
+
|
|
1448
|
+
```ts
|
|
1449
|
+
import {
|
|
1450
|
+
Configuration,
|
|
1451
|
+
ContentApi,
|
|
1452
|
+
} from '@easyedu/js-lsm-api';
|
|
1453
|
+
import type { SetScormValueRequest } from '@easyedu/js-lsm-api';
|
|
1454
|
+
|
|
1455
|
+
async function example() {
|
|
1456
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1457
|
+
const api = new ContentApi();
|
|
1458
|
+
|
|
1459
|
+
const body = {
|
|
1460
|
+
// string | The external_id of the SCORM session
|
|
1461
|
+
scormSessionId: scormSessionId_example,
|
|
1462
|
+
// ScormSetValueRequest
|
|
1463
|
+
scormSetValueRequest: ...,
|
|
1464
|
+
} satisfies SetScormValueRequest;
|
|
1465
|
+
|
|
1466
|
+
try {
|
|
1467
|
+
const data = await api.setScormValue(body);
|
|
1468
|
+
console.log(data);
|
|
1469
|
+
} catch (error) {
|
|
1470
|
+
console.error(error);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
// Run the test
|
|
1475
|
+
example().catch(console.error);
|
|
1476
|
+
```
|
|
1477
|
+
|
|
1478
|
+
### Parameters
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
| Name | Type | Description | Notes |
|
|
1482
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1483
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
1484
|
+
| **scormSetValueRequest** | [ScormSetValueRequest](ScormSetValueRequest.md) | | |
|
|
1485
|
+
|
|
1486
|
+
### Return type
|
|
1487
|
+
|
|
1488
|
+
[**ScormSetValueResponse**](ScormSetValueResponse.md)
|
|
1489
|
+
|
|
1490
|
+
### Authorization
|
|
1491
|
+
|
|
1492
|
+
No authorization required
|
|
1493
|
+
|
|
1494
|
+
### HTTP request headers
|
|
1495
|
+
|
|
1496
|
+
- **Content-Type**: `application/json`
|
|
1497
|
+
- **Accept**: `application/json`
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
### HTTP response details
|
|
1501
|
+
| Status code | Description | Response headers |
|
|
1502
|
+
|-------------|-------------|------------------|
|
|
1503
|
+
| **200** | Successfully set CMI element value | - |
|
|
1504
|
+
| **401** | Unauthorized | - |
|
|
1505
|
+
| **404** | SCORM session not found | - |
|
|
1506
|
+
|
|
1507
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
## terminateScormSession
|
|
1511
|
+
|
|
1512
|
+
> terminateScormSession(scormSessionId)
|
|
1513
|
+
|
|
1514
|
+
Terminate a SCORM session
|
|
1515
|
+
|
|
1516
|
+
Terminate the SCORM session and finalize all data
|
|
1517
|
+
|
|
1518
|
+
### Example
|
|
1519
|
+
|
|
1520
|
+
```ts
|
|
1521
|
+
import {
|
|
1522
|
+
Configuration,
|
|
1523
|
+
ContentApi,
|
|
1524
|
+
} from '@easyedu/js-lsm-api';
|
|
1525
|
+
import type { TerminateScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
1526
|
+
|
|
1527
|
+
async function example() {
|
|
1528
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1529
|
+
const api = new ContentApi();
|
|
1530
|
+
|
|
1531
|
+
const body = {
|
|
1532
|
+
// string | The external_id of the SCORM session
|
|
1533
|
+
scormSessionId: scormSessionId_example,
|
|
1534
|
+
} satisfies TerminateScormSessionRequest;
|
|
1535
|
+
|
|
1536
|
+
try {
|
|
1537
|
+
const data = await api.terminateScormSession(body);
|
|
1538
|
+
console.log(data);
|
|
1539
|
+
} catch (error) {
|
|
1540
|
+
console.error(error);
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
// Run the test
|
|
1545
|
+
example().catch(console.error);
|
|
1546
|
+
```
|
|
1547
|
+
|
|
1548
|
+
### Parameters
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
| Name | Type | Description | Notes |
|
|
1552
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1553
|
+
| **scormSessionId** | `string` | The external_id of the SCORM session | [Defaults to `undefined`] |
|
|
1554
|
+
|
|
1555
|
+
### Return type
|
|
1556
|
+
|
|
1557
|
+
`void` (Empty response body)
|
|
1558
|
+
|
|
1559
|
+
### Authorization
|
|
1560
|
+
|
|
1561
|
+
No authorization required
|
|
1562
|
+
|
|
1563
|
+
### HTTP request headers
|
|
1564
|
+
|
|
1565
|
+
- **Content-Type**: Not defined
|
|
1566
|
+
- **Accept**: Not defined
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
### HTTP response details
|
|
1570
|
+
| Status code | Description | Response headers |
|
|
1571
|
+
|-------------|-------------|------------------|
|
|
1572
|
+
| **200** | Successfully terminated SCORM session | - |
|
|
1573
|
+
| **401** | Unauthorized | - |
|
|
1574
|
+
| **404** | SCORM session not found | - |
|
|
1575
|
+
|
|
1576
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
## verifyScormManifest
|
|
1580
|
+
|
|
1581
|
+
> PostVerifyManifest verifyScormManifest(body)
|
|
1582
|
+
|
|
1583
|
+
Parse and verify a SCORM manifest
|
|
1584
|
+
|
|
1585
|
+
Takes raw imsmanifest.xml content and returns the parsed manifest structure with validation warnings
|
|
1586
|
+
|
|
1587
|
+
### Example
|
|
1588
|
+
|
|
1589
|
+
```ts
|
|
1590
|
+
import {
|
|
1591
|
+
Configuration,
|
|
1592
|
+
ContentApi,
|
|
1593
|
+
} from '@easyedu/js-lsm-api';
|
|
1594
|
+
import type { VerifyScormManifestRequest } from '@easyedu/js-lsm-api';
|
|
1595
|
+
|
|
1596
|
+
async function example() {
|
|
1597
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1598
|
+
const api = new ContentApi();
|
|
1599
|
+
|
|
1600
|
+
const body = {
|
|
1601
|
+
// string
|
|
1602
|
+
body: body_example,
|
|
1603
|
+
} satisfies VerifyScormManifestRequest;
|
|
1604
|
+
|
|
1605
|
+
try {
|
|
1606
|
+
const data = await api.verifyScormManifest(body);
|
|
1607
|
+
console.log(data);
|
|
1608
|
+
} catch (error) {
|
|
1609
|
+
console.error(error);
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
// Run the test
|
|
1614
|
+
example().catch(console.error);
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
### Parameters
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
| Name | Type | Description | Notes |
|
|
1621
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1622
|
+
| **body** | `string` | | |
|
|
1623
|
+
|
|
1624
|
+
### Return type
|
|
1625
|
+
|
|
1626
|
+
[**PostVerifyManifest**](PostVerifyManifest.md)
|
|
1627
|
+
|
|
1628
|
+
### Authorization
|
|
1629
|
+
|
|
1630
|
+
No authorization required
|
|
1631
|
+
|
|
1632
|
+
### HTTP request headers
|
|
1633
|
+
|
|
1634
|
+
- **Content-Type**: `application/xml`, `text/xml`
|
|
1635
|
+
- **Accept**: `application/json`
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
### HTTP response details
|
|
1639
|
+
| Status code | Description | Response headers |
|
|
1640
|
+
|-------------|-------------|------------------|
|
|
1641
|
+
| **200** | Manifest parsed (check valid field for success) | - |
|
|
1642
|
+
| **400** | Request body is empty or not XML | - |
|
|
1643
|
+
|
|
1644
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1645
|
+
|