@easyedu/js-lsm-api 1.86.0 → 1.88.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 +66 -0
- package/README.md +87 -2
- package/dist/apis/CertificateApi.d.ts +273 -0
- package/dist/apis/CertificateApi.js +663 -2
- package/dist/apis/CertificateTemplateApi.d.ts +591 -0
- package/dist/apis/CertificateTemplateApi.js +1546 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/CertificateApi.d.ts +273 -0
- package/dist/esm/apis/CertificateApi.js +662 -1
- package/dist/esm/apis/CertificateTemplateApi.d.ts +591 -0
- package/dist/esm/apis/CertificateTemplateApi.js +1542 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ArtifactConflict.d.ts +52 -0
- package/dist/esm/models/ArtifactConflict.js +58 -0
- package/dist/esm/models/BadgeIssuer.d.ts +80 -0
- package/dist/esm/models/BadgeIssuer.js +69 -0
- package/dist/esm/models/Certificate.d.ts +54 -0
- package/dist/esm/models/Certificate.js +30 -1
- package/dist/esm/models/CertificateArtifact.d.ts +72 -0
- package/dist/esm/models/CertificateArtifact.js +62 -0
- package/dist/esm/models/CertificateBadgePolicy.d.ts +69 -0
- package/dist/esm/models/CertificateBadgePolicy.js +64 -0
- package/dist/esm/models/CertificateBadgePolicyAlignmentsInner.d.ts +50 -0
- package/dist/esm/models/CertificateBadgePolicyAlignmentsInner.js +51 -0
- package/dist/esm/models/CertificateCanvasDocument.d.ts +53 -0
- package/dist/esm/models/CertificateCanvasDocument.js +59 -0
- package/dist/esm/models/CertificateCanvasDocumentPage.d.ts +60 -0
- package/dist/esm/models/CertificateCanvasDocumentPage.js +63 -0
- package/dist/esm/models/CertificateCanvasElement.d.ts +39 -0
- package/dist/esm/models/CertificateCanvasElement.js +67 -0
- package/dist/esm/models/CertificateCanvasImageElement.d.ts +90 -0
- package/dist/esm/models/CertificateCanvasImageElement.js +83 -0
- package/dist/esm/models/CertificateCanvasLineElement.d.ts +81 -0
- package/dist/esm/models/CertificateCanvasLineElement.js +77 -0
- package/dist/esm/models/CertificateCanvasPortalLogoElement.d.ts +69 -0
- package/dist/esm/models/CertificateCanvasPortalLogoElement.js +69 -0
- package/dist/esm/models/CertificateCanvasShapeElement.d.ts +87 -0
- package/dist/esm/models/CertificateCanvasShapeElement.js +81 -0
- package/dist/esm/models/CertificateCanvasTextElement.d.ts +115 -0
- package/dist/esm/models/CertificateCanvasTextElement.js +101 -0
- package/dist/esm/models/CertificateCanvasVerificationQrElement.d.ts +69 -0
- package/dist/esm/models/CertificateCanvasVerificationQrElement.js +69 -0
- package/dist/esm/models/CertificateConfig.d.ts +27 -0
- package/dist/esm/models/CertificateConfig.js +11 -0
- package/dist/esm/models/CertificateEvent.d.ts +74 -0
- package/dist/esm/models/CertificateEvent.js +61 -0
- package/dist/esm/models/CertificateNotificationPolicy.d.ts +76 -0
- package/dist/esm/models/CertificateNotificationPolicy.js +74 -0
- package/dist/esm/models/CertificatePublic.d.ts +35 -0
- package/dist/esm/models/CertificatePublic.js +22 -0
- package/dist/esm/models/CertificateRenewalPolicy.d.ts +46 -0
- package/dist/esm/models/CertificateRenewalPolicy.js +54 -0
- package/dist/esm/models/CertificateTemplate.d.ts +121 -0
- package/dist/esm/models/CertificateTemplate.js +97 -0
- package/dist/esm/models/CertificateTemplateVersion.d.ts +85 -0
- package/dist/esm/models/CertificateTemplateVersion.js +77 -0
- package/dist/esm/models/EffectiveCertificateConfig.d.ts +56 -0
- package/dist/esm/models/EffectiveCertificateConfig.js +35 -0
- package/dist/esm/models/GetCertificateAssetUpload.d.ts +64 -0
- package/dist/esm/models/GetCertificateAssetUpload.js +66 -0
- package/dist/esm/models/GetCertificateEventList.d.ts +33 -0
- package/dist/esm/models/GetCertificateEventList.js +44 -0
- package/dist/esm/models/GetCertificateTemplateList.d.ts +33 -0
- package/dist/esm/models/GetCertificateTemplateList.js +44 -0
- package/dist/esm/models/GetPublicBadgeCredentialStatus200Response.d.ts +48 -0
- package/dist/esm/models/GetPublicBadgeCredentialStatus200Response.js +56 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.d.ts +1 -0
- package/dist/esm/models/GetUserCourseListItemCertificate.js +2 -1
- package/dist/esm/models/PostCertificateAssetComplete.d.ts +32 -0
- package/dist/esm/models/PostCertificateAssetComplete.js +43 -0
- package/dist/esm/models/PostCertificateAssetUpload.d.ts +53 -0
- package/dist/esm/models/PostCertificateAssetUpload.js +59 -0
- package/dist/esm/models/PostCertificateConfig.d.ts +27 -0
- package/dist/esm/models/PostCertificateConfig.js +11 -0
- package/dist/esm/models/PostCertificateLifecycleAction.d.ts +38 -0
- package/dist/esm/models/PostCertificateLifecycleAction.js +45 -0
- package/dist/esm/models/PostCertificateTemplate.d.ts +51 -0
- package/dist/esm/models/PostCertificateTemplate.js +50 -0
- package/dist/esm/models/PostCertificateTemplateClone.d.ts +44 -0
- package/dist/esm/models/PostCertificateTemplateClone.js +47 -0
- package/dist/esm/models/PostCertificateTemplatePreview.d.ts +41 -0
- package/dist/esm/models/PostCertificateTemplatePreview.js +46 -0
- package/dist/esm/models/PutBadgeIssuer.d.ts +44 -0
- package/dist/esm/models/PutBadgeIssuer.js +47 -0
- package/dist/esm/models/PutCertificateConfig.d.ts +27 -0
- package/dist/esm/models/PutCertificateConfig.js +11 -0
- package/dist/esm/models/PutCertificateTemplate.d.ts +44 -0
- package/dist/esm/models/PutCertificateTemplate.js +45 -0
- package/dist/esm/models/PutCertificateTemplateDraft.d.ts +39 -0
- package/dist/esm/models/PutCertificateTemplateDraft.js +46 -0
- package/dist/esm/models/index.d.ts +32 -0
- package/dist/esm/models/index.js +32 -0
- package/dist/models/ArtifactConflict.d.ts +52 -0
- package/dist/models/ArtifactConflict.js +66 -0
- package/dist/models/BadgeIssuer.d.ts +80 -0
- package/dist/models/BadgeIssuer.js +76 -0
- package/dist/models/Certificate.d.ts +54 -0
- package/dist/models/Certificate.js +31 -2
- package/dist/models/CertificateArtifact.d.ts +72 -0
- package/dist/models/CertificateArtifact.js +70 -0
- package/dist/models/CertificateBadgePolicy.d.ts +69 -0
- package/dist/models/CertificateBadgePolicy.js +71 -0
- package/dist/models/CertificateBadgePolicyAlignmentsInner.d.ts +50 -0
- package/dist/models/CertificateBadgePolicyAlignmentsInner.js +58 -0
- package/dist/models/CertificateCanvasDocument.d.ts +53 -0
- package/dist/models/CertificateCanvasDocument.js +67 -0
- package/dist/models/CertificateCanvasDocumentPage.d.ts +60 -0
- package/dist/models/CertificateCanvasDocumentPage.js +71 -0
- package/dist/models/CertificateCanvasElement.d.ts +39 -0
- package/dist/models/CertificateCanvasElement.js +73 -0
- package/dist/models/CertificateCanvasImageElement.d.ts +90 -0
- package/dist/models/CertificateCanvasImageElement.js +91 -0
- package/dist/models/CertificateCanvasLineElement.d.ts +81 -0
- package/dist/models/CertificateCanvasLineElement.js +85 -0
- package/dist/models/CertificateCanvasPortalLogoElement.d.ts +69 -0
- package/dist/models/CertificateCanvasPortalLogoElement.js +77 -0
- package/dist/models/CertificateCanvasShapeElement.d.ts +87 -0
- package/dist/models/CertificateCanvasShapeElement.js +89 -0
- package/dist/models/CertificateCanvasTextElement.d.ts +115 -0
- package/dist/models/CertificateCanvasTextElement.js +109 -0
- package/dist/models/CertificateCanvasVerificationQrElement.d.ts +69 -0
- package/dist/models/CertificateCanvasVerificationQrElement.js +77 -0
- package/dist/models/CertificateConfig.d.ts +27 -0
- package/dist/models/CertificateConfig.js +11 -0
- package/dist/models/CertificateEvent.d.ts +74 -0
- package/dist/models/CertificateEvent.js +68 -0
- package/dist/models/CertificateNotificationPolicy.d.ts +76 -0
- package/dist/models/CertificateNotificationPolicy.js +82 -0
- package/dist/models/CertificatePublic.d.ts +35 -0
- package/dist/models/CertificatePublic.js +23 -1
- package/dist/models/CertificateRenewalPolicy.d.ts +46 -0
- package/dist/models/CertificateRenewalPolicy.js +62 -0
- package/dist/models/CertificateTemplate.d.ts +121 -0
- package/dist/models/CertificateTemplate.js +105 -0
- package/dist/models/CertificateTemplateVersion.d.ts +85 -0
- package/dist/models/CertificateTemplateVersion.js +85 -0
- package/dist/models/EffectiveCertificateConfig.d.ts +56 -0
- package/dist/models/EffectiveCertificateConfig.js +36 -0
- package/dist/models/GetCertificateAssetUpload.d.ts +64 -0
- package/dist/models/GetCertificateAssetUpload.js +74 -0
- package/dist/models/GetCertificateEventList.d.ts +33 -0
- package/dist/models/GetCertificateEventList.js +51 -0
- package/dist/models/GetCertificateTemplateList.d.ts +33 -0
- package/dist/models/GetCertificateTemplateList.js +51 -0
- package/dist/models/GetPublicBadgeCredentialStatus200Response.d.ts +48 -0
- package/dist/models/GetPublicBadgeCredentialStatus200Response.js +64 -0
- package/dist/models/GetUserCourseListItemCertificate.d.ts +1 -0
- package/dist/models/GetUserCourseListItemCertificate.js +2 -1
- package/dist/models/PostCertificateAssetComplete.d.ts +32 -0
- package/dist/models/PostCertificateAssetComplete.js +50 -0
- package/dist/models/PostCertificateAssetUpload.d.ts +53 -0
- package/dist/models/PostCertificateAssetUpload.js +67 -0
- package/dist/models/PostCertificateConfig.d.ts +27 -0
- package/dist/models/PostCertificateConfig.js +11 -0
- package/dist/models/PostCertificateLifecycleAction.d.ts +38 -0
- package/dist/models/PostCertificateLifecycleAction.js +52 -0
- package/dist/models/PostCertificateTemplate.d.ts +51 -0
- package/dist/models/PostCertificateTemplate.js +57 -0
- package/dist/models/PostCertificateTemplateClone.d.ts +44 -0
- package/dist/models/PostCertificateTemplateClone.js +54 -0
- package/dist/models/PostCertificateTemplatePreview.d.ts +41 -0
- package/dist/models/PostCertificateTemplatePreview.js +53 -0
- package/dist/models/PutBadgeIssuer.d.ts +44 -0
- package/dist/models/PutBadgeIssuer.js +54 -0
- package/dist/models/PutCertificateConfig.d.ts +27 -0
- package/dist/models/PutCertificateConfig.js +11 -0
- package/dist/models/PutCertificateTemplate.d.ts +44 -0
- package/dist/models/PutCertificateTemplate.js +52 -0
- package/dist/models/PutCertificateTemplateDraft.d.ts +39 -0
- package/dist/models/PutCertificateTemplateDraft.js +53 -0
- package/dist/models/index.d.ts +32 -0
- package/dist/models/index.js +32 -0
- package/docs/ArtifactConflict.md +38 -0
- package/docs/BadgeIssuer.md +50 -0
- package/docs/Certificate.md +14 -0
- package/docs/CertificateApi.md +1119 -48
- package/docs/CertificateArtifact.md +44 -0
- package/docs/CertificateBadgePolicy.md +46 -0
- package/docs/CertificateBadgePolicyAlignmentsInner.md +40 -0
- package/docs/CertificateCanvasDocument.md +39 -0
- package/docs/CertificateCanvasDocumentPage.md +38 -0
- package/docs/CertificateCanvasElement.md +65 -0
- package/docs/CertificateCanvasImageElement.md +48 -0
- package/docs/CertificateCanvasLineElement.md +48 -0
- package/docs/CertificateCanvasPortalLogoElement.md +44 -0
- package/docs/CertificateCanvasShapeElement.md +50 -0
- package/docs/CertificateCanvasTextElement.md +54 -0
- package/docs/CertificateCanvasVerificationQrElement.md +44 -0
- package/docs/CertificateConfig.md +8 -0
- package/docs/CertificateEvent.md +46 -0
- package/docs/CertificateNotificationPolicy.md +46 -0
- package/docs/CertificatePublic.md +8 -0
- package/docs/CertificateRenewalPolicy.md +36 -0
- package/docs/CertificateTemplate.md +60 -0
- package/docs/CertificateTemplateApi.md +2493 -0
- package/docs/CertificateTemplateVersion.md +48 -0
- package/docs/EffectiveCertificateConfig.md +14 -0
- package/docs/GetCertificateAssetUpload.md +42 -0
- package/docs/GetCertificateEventList.md +34 -0
- package/docs/GetCertificateTemplateList.md +34 -0
- package/docs/GetPublicBadgeCredentialStatus200Response.md +36 -0
- package/docs/PostCertificateAssetComplete.md +34 -0
- package/docs/PostCertificateAssetUpload.md +38 -0
- package/docs/PostCertificateConfig.md +8 -0
- package/docs/PostCertificateLifecycleAction.md +36 -0
- package/docs/PostCertificateTemplate.md +40 -0
- package/docs/PostCertificateTemplateClone.md +38 -0
- package/docs/PostCertificateTemplatePreview.md +36 -0
- package/docs/PutBadgeIssuer.md +38 -0
- package/docs/PutCertificateConfig.md +8 -0
- package/docs/PutCertificateTemplate.md +38 -0
- package/docs/PutCertificateTemplateDraft.md +36 -0
- package/package.json +1 -1
- package/src/apis/CertificateApi.ts +952 -98
- package/src/apis/CertificateTemplateApi.ts +2020 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ArtifactConflict.ts +95 -0
- package/src/models/BadgeIssuer.ts +135 -0
- package/src/models/Certificate.ts +79 -1
- package/src/models/CertificateArtifact.ts +119 -0
- package/src/models/CertificateBadgePolicy.ts +126 -0
- package/src/models/CertificateBadgePolicyAlignmentsInner.ts +91 -0
- package/src/models/CertificateCanvasDocument.ts +109 -0
- package/src/models/CertificateCanvasDocumentPage.ts +103 -0
- package/src/models/CertificateCanvasElement.ts +116 -0
- package/src/models/CertificateCanvasImageElement.ts +148 -0
- package/src/models/CertificateCanvasLineElement.ts +139 -0
- package/src/models/CertificateCanvasPortalLogoElement.ts +121 -0
- package/src/models/CertificateCanvasShapeElement.ts +148 -0
- package/src/models/CertificateCanvasTextElement.ts +183 -0
- package/src/models/CertificateCanvasVerificationQrElement.ts +121 -0
- package/src/models/CertificateConfig.ts +54 -0
- package/src/models/CertificateEvent.ts +117 -0
- package/src/models/CertificateNotificationPolicy.ts +131 -0
- package/src/models/CertificatePublic.ts +46 -0
- package/src/models/CertificateRenewalPolicy.ts +86 -0
- package/src/models/CertificateTemplate.ts +200 -0
- package/src/models/CertificateTemplateVersion.ts +148 -0
- package/src/models/EffectiveCertificateConfig.ts +96 -0
- package/src/models/GetCertificateAssetUpload.ts +113 -0
- package/src/models/GetCertificateEventList.ts +74 -0
- package/src/models/GetCertificateTemplateList.ts +74 -0
- package/src/models/GetPublicBadgeCredentialStatus200Response.ts +88 -0
- package/src/models/GetUserCourseListItemCertificate.ts +2 -1
- package/src/models/PostCertificateAssetComplete.ts +66 -0
- package/src/models/PostCertificateAssetUpload.ts +96 -0
- package/src/models/PostCertificateConfig.ts +54 -0
- package/src/models/PostCertificateLifecycleAction.ts +74 -0
- package/src/models/PostCertificateTemplate.ts +98 -0
- package/src/models/PostCertificateTemplateClone.ts +82 -0
- package/src/models/PostCertificateTemplatePreview.ts +82 -0
- package/src/models/PutBadgeIssuer.ts +82 -0
- package/src/models/PutCertificateConfig.ts +54 -0
- package/src/models/PutCertificateTemplate.ts +81 -0
- package/src/models/PutCertificateTemplateDraft.ts +82 -0
- package/src/models/index.ts +32 -0
package/docs/CertificateApi.md
CHANGED
|
@@ -5,16 +5,32 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**deleteCertificateConfig**](CertificateApi.md#deletecertificateconfig) | **DELETE** /certificate-configs/{configId} | Delete a certificate config |
|
|
8
|
+
| [**getBadgeIssuer**](CertificateApi.md#getbadgeissuer) | **GET** /badge-issuer | Get the selected portal Open Badges issuer |
|
|
8
9
|
| [**getCertificate**](CertificateApi.md#getcertificate) | **GET** /certificates/{certificateId} | Get a single certificate |
|
|
9
10
|
| [**getCertificateConfig**](CertificateApi.md#getcertificateconfig) | **GET** /certificate-configs/{configId} | Get a certificate config |
|
|
10
11
|
| [**getCertificateConfigs**](CertificateApi.md#getcertificateconfigs) | **GET** /certificate-configs | List certificate configs in the current portal |
|
|
12
|
+
| [**getCertificateCsvExport**](CertificateApi.md#getcertificatecsvexport) | **GET** /certificates/export | Export filtered certificate records as CSV |
|
|
13
|
+
| [**getCertificateEvents**](CertificateApi.md#getcertificateevents) | **GET** /certificates/{certificateId}/events | List immutable lifecycle events for a certificate |
|
|
11
14
|
| [**getCertificatePdf**](CertificateApi.md#getcertificatepdf) | **GET** /certificates/{certificateId}/pdf | Download certificate as PDF |
|
|
12
15
|
| [**getCertificates**](CertificateApi.md#getcertificates) | **GET** /certificates | List certificates in the current portal |
|
|
13
16
|
| [**getCurrentUserCertificates**](CertificateApi.md#getcurrentusercertificates) | **GET** /certificates/current | List the authenticated user\'s own certificates |
|
|
14
17
|
| [**getEffectiveCertificateConfig**](CertificateApi.md#geteffectivecertificateconfig) | **GET** /courses/{courseId}/certificate-config/effective | Resolve effective certificate config for a course |
|
|
18
|
+
| [**getPublicBadgeAchievement**](CertificateApi.md#getpublicbadgeachievement) | **GET** /public/badge-achievements/{achievementId} | Get a hosted Open Badges Achievement |
|
|
19
|
+
| [**getPublicBadgeAchievementImage**](CertificateApi.md#getpublicbadgeachievementimage) | **GET** /public/badge-achievements/{achievementId}/image | Get a validated square PNG badge image |
|
|
20
|
+
| [**getPublicBadgeCredential**](CertificateApi.md#getpublicbadgecredential) | **GET** /public/badge-credentials/{credentialId} | Download an Open Badges 3.0 VC-JWT |
|
|
21
|
+
| [**getPublicBadgeCredentialDocument**](CertificateApi.md#getpublicbadgecredentialdocument) | **GET** /public/badge-credentials/{credentialId}/document | Read the signed Open Badges credential document |
|
|
22
|
+
| [**getPublicBadgeCredentialStatus**](CertificateApi.md#getpublicbadgecredentialstatus) | **GET** /public/badge-credentials/{credentialId}/status | Get mutable hosted status without changing the signed credential |
|
|
23
|
+
| [**getPublicBadgeIssuer**](CertificateApi.md#getpublicbadgeissuer) | **GET** /public/badge-issuers/{portalId} | Get an Open Badges issuer profile |
|
|
24
|
+
| [**getPublicBadgeIssuerDidDocument**](CertificateApi.md#getpublicbadgeissuerdiddocument) | **GET** /public/badge-issuers/{portalId}/did.json | Get the portal-specific did:web document and retained public keys |
|
|
25
|
+
| [**getPublicCertificatePdf**](CertificateApi.md#getpubliccertificatepdf) | **GET** /public/certificates/{certificateId}/pdf | Download an immutable public certificate PDF |
|
|
26
|
+
| [**postBadgeIssuerKeyRotate**](CertificateApi.md#postbadgeissuerkeyrotate) | **POST** /badge-issuer/keys/rotate | Generate and activate a new KMS-wrapped portal signing key |
|
|
27
|
+
| [**postCertificateArtifactRetry**](CertificateApi.md#postcertificateartifactretry) | **POST** /certificates/{certificateId}/artifacts/retry | Retry failed certificate artifact generation |
|
|
15
28
|
| [**postCertificateConfig**](CertificateApi.md#postcertificateconfig) | **POST** /certificate-configs | Create a certificate config |
|
|
29
|
+
| [**postCertificateRenew**](CertificateApi.md#postcertificaterenew) | **POST** /certificates/{certificateId}/renew | Manually renew an eligible certificate |
|
|
30
|
+
| [**postCertificateReplace**](CertificateApi.md#postcertificatereplace) | **POST** /certificates/{certificateId}/replace | Replace or correct an issued certificate |
|
|
16
31
|
| [**postCourseCertificate**](CertificateApi.md#postcoursecertificate) | **POST** /courses/{courseId}/certificates | Manually issue a certificate for a course |
|
|
17
32
|
| [**postRevokeCertificate**](CertificateApi.md#postrevokecertificate) | **POST** /certificates/{certificateId}/revoke | Revoke a certificate |
|
|
33
|
+
| [**putBadgeIssuer**](CertificateApi.md#putbadgeissuer) | **PUT** /badge-issuer | Create or update the selected portal Open Badges issuer |
|
|
18
34
|
| [**putCertificateConfig**](CertificateApi.md#putcertificateconfig) | **PUT** /certificate-configs/{configId} | Update a certificate config |
|
|
19
35
|
| [**verifyCertificate**](CertificateApi.md#verifycertificate) | **GET** /public/certificates/{certificateId}/verify | Public certificate verification (no auth) |
|
|
20
36
|
|
|
@@ -86,6 +102,64 @@ No authorization required
|
|
|
86
102
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
103
|
|
|
88
104
|
|
|
105
|
+
## getBadgeIssuer
|
|
106
|
+
|
|
107
|
+
> BadgeIssuer getBadgeIssuer()
|
|
108
|
+
|
|
109
|
+
Get the selected portal Open Badges issuer
|
|
110
|
+
|
|
111
|
+
### Example
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
import {
|
|
115
|
+
Configuration,
|
|
116
|
+
CertificateApi,
|
|
117
|
+
} from '@easyedu/js-lsm-api';
|
|
118
|
+
import type { GetBadgeIssuerRequest } from '@easyedu/js-lsm-api';
|
|
119
|
+
|
|
120
|
+
async function example() {
|
|
121
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
122
|
+
const api = new CertificateApi();
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
const data = await api.getBadgeIssuer();
|
|
126
|
+
console.log(data);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
console.error(error);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Run the test
|
|
133
|
+
example().catch(console.error);
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
This endpoint does not need any parameter.
|
|
139
|
+
|
|
140
|
+
### Return type
|
|
141
|
+
|
|
142
|
+
[**BadgeIssuer**](BadgeIssuer.md)
|
|
143
|
+
|
|
144
|
+
### Authorization
|
|
145
|
+
|
|
146
|
+
No authorization required
|
|
147
|
+
|
|
148
|
+
### HTTP request headers
|
|
149
|
+
|
|
150
|
+
- **Content-Type**: Not defined
|
|
151
|
+
- **Accept**: `application/json`
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### HTTP response details
|
|
155
|
+
| Status code | Description | Response headers |
|
|
156
|
+
|-------------|-------------|------------------|
|
|
157
|
+
| **200** | Badge issuer | - |
|
|
158
|
+
| **404** | Issuer not configured | - |
|
|
159
|
+
|
|
160
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
161
|
+
|
|
162
|
+
|
|
89
163
|
## getCertificate
|
|
90
164
|
|
|
91
165
|
> Certificate getCertificate(certificateId)
|
|
@@ -288,6 +362,148 @@ No authorization required
|
|
|
288
362
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
289
363
|
|
|
290
364
|
|
|
365
|
+
## getCertificateCsvExport
|
|
366
|
+
|
|
367
|
+
> Blob getCertificateCsvExport(userId, courseId, status, issuedAfter, issuedBefore)
|
|
368
|
+
|
|
369
|
+
Export filtered certificate records as CSV
|
|
370
|
+
|
|
371
|
+
### Example
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
import {
|
|
375
|
+
Configuration,
|
|
376
|
+
CertificateApi,
|
|
377
|
+
} from '@easyedu/js-lsm-api';
|
|
378
|
+
import type { GetCertificateCsvExportRequest } from '@easyedu/js-lsm-api';
|
|
379
|
+
|
|
380
|
+
async function example() {
|
|
381
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
382
|
+
const api = new CertificateApi();
|
|
383
|
+
|
|
384
|
+
const body = {
|
|
385
|
+
// string (optional)
|
|
386
|
+
userId: userId_example,
|
|
387
|
+
// string (optional)
|
|
388
|
+
courseId: courseId_example,
|
|
389
|
+
// 'active' | 'revoked' | 'superseded' (optional)
|
|
390
|
+
status: status_example,
|
|
391
|
+
// number (optional)
|
|
392
|
+
issuedAfter: 789,
|
|
393
|
+
// number (optional)
|
|
394
|
+
issuedBefore: 789,
|
|
395
|
+
} satisfies GetCertificateCsvExportRequest;
|
|
396
|
+
|
|
397
|
+
try {
|
|
398
|
+
const data = await api.getCertificateCsvExport(body);
|
|
399
|
+
console.log(data);
|
|
400
|
+
} catch (error) {
|
|
401
|
+
console.error(error);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Run the test
|
|
406
|
+
example().catch(console.error);
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Parameters
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
| Name | Type | Description | Notes |
|
|
413
|
+
|------------- | ------------- | ------------- | -------------|
|
|
414
|
+
| **userId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
415
|
+
| **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
416
|
+
| **status** | `active`, `revoked`, `superseded` | | [Optional] [Defaults to `undefined`] [Enum: active, revoked, superseded] |
|
|
417
|
+
| **issuedAfter** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
418
|
+
| **issuedBefore** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
419
|
+
|
|
420
|
+
### Return type
|
|
421
|
+
|
|
422
|
+
**Blob**
|
|
423
|
+
|
|
424
|
+
### Authorization
|
|
425
|
+
|
|
426
|
+
No authorization required
|
|
427
|
+
|
|
428
|
+
### HTTP request headers
|
|
429
|
+
|
|
430
|
+
- **Content-Type**: Not defined
|
|
431
|
+
- **Accept**: `text/csv`
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
### HTTP response details
|
|
435
|
+
| Status code | Description | Response headers |
|
|
436
|
+
|-------------|-------------|------------------|
|
|
437
|
+
| **200** | CSV export | - |
|
|
438
|
+
|
|
439
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
## getCertificateEvents
|
|
443
|
+
|
|
444
|
+
> GetCertificateEventList getCertificateEvents(certificateId)
|
|
445
|
+
|
|
446
|
+
List immutable lifecycle events for a certificate
|
|
447
|
+
|
|
448
|
+
### Example
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
import {
|
|
452
|
+
Configuration,
|
|
453
|
+
CertificateApi,
|
|
454
|
+
} from '@easyedu/js-lsm-api';
|
|
455
|
+
import type { GetCertificateEventsRequest } from '@easyedu/js-lsm-api';
|
|
456
|
+
|
|
457
|
+
async function example() {
|
|
458
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
459
|
+
const api = new CertificateApi();
|
|
460
|
+
|
|
461
|
+
const body = {
|
|
462
|
+
// string
|
|
463
|
+
certificateId: certificateId_example,
|
|
464
|
+
} satisfies GetCertificateEventsRequest;
|
|
465
|
+
|
|
466
|
+
try {
|
|
467
|
+
const data = await api.getCertificateEvents(body);
|
|
468
|
+
console.log(data);
|
|
469
|
+
} catch (error) {
|
|
470
|
+
console.error(error);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
// Run the test
|
|
475
|
+
example().catch(console.error);
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Parameters
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
| Name | Type | Description | Notes |
|
|
482
|
+
|------------- | ------------- | ------------- | -------------|
|
|
483
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
484
|
+
|
|
485
|
+
### Return type
|
|
486
|
+
|
|
487
|
+
[**GetCertificateEventList**](GetCertificateEventList.md)
|
|
488
|
+
|
|
489
|
+
### Authorization
|
|
490
|
+
|
|
491
|
+
No authorization required
|
|
492
|
+
|
|
493
|
+
### HTTP request headers
|
|
494
|
+
|
|
495
|
+
- **Content-Type**: Not defined
|
|
496
|
+
- **Accept**: `application/json`
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
### HTTP response details
|
|
500
|
+
| Status code | Description | Response headers |
|
|
501
|
+
|-------------|-------------|------------------|
|
|
502
|
+
| **200** | Certificate event history | - |
|
|
503
|
+
|
|
504
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
505
|
+
|
|
506
|
+
|
|
291
507
|
## getCertificatePdf
|
|
292
508
|
|
|
293
509
|
> Blob getCertificatePdf(certificateId)
|
|
@@ -342,7 +558,7 @@ No authorization required
|
|
|
342
558
|
### HTTP request headers
|
|
343
559
|
|
|
344
560
|
- **Content-Type**: Not defined
|
|
345
|
-
- **Accept**: `application/pdf`
|
|
561
|
+
- **Accept**: `application/pdf`, `application/json`
|
|
346
562
|
|
|
347
563
|
|
|
348
564
|
### HTTP response details
|
|
@@ -350,6 +566,7 @@ No authorization required
|
|
|
350
566
|
|-------------|-------------|------------------|
|
|
351
567
|
| **200** | PDF file | - |
|
|
352
568
|
| **404** | Not found | - |
|
|
569
|
+
| **409** | Artifact has not completed successfully | - |
|
|
353
570
|
|
|
354
571
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
355
572
|
|
|
@@ -378,7 +595,7 @@ async function example() {
|
|
|
378
595
|
userId: userId_example,
|
|
379
596
|
// string (optional)
|
|
380
597
|
courseId: courseId_example,
|
|
381
|
-
// 'active' | 'revoked' (optional)
|
|
598
|
+
// 'active' | 'revoked' | 'superseded' (optional)
|
|
382
599
|
status: status_example,
|
|
383
600
|
// number (optional)
|
|
384
601
|
issuedAfter: 789,
|
|
@@ -411,7 +628,7 @@ example().catch(console.error);
|
|
|
411
628
|
|------------- | ------------- | ------------- | -------------|
|
|
412
629
|
| **userId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
413
630
|
| **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
414
|
-
| **status** | `active`, `revoked` | | [Optional] [Defaults to `undefined`] [Enum: active, revoked] |
|
|
631
|
+
| **status** | `active`, `revoked`, `superseded` | | [Optional] [Defaults to `undefined`] [Enum: active, revoked, superseded] |
|
|
415
632
|
| **issuedAfter** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
416
633
|
| **issuedBefore** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
417
634
|
| **expiresAfter** | `number` | | [Optional] [Defaults to `undefined`] |
|
|
@@ -563,11 +780,11 @@ No authorization required
|
|
|
563
780
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
564
781
|
|
|
565
782
|
|
|
566
|
-
##
|
|
783
|
+
## getPublicBadgeAchievement
|
|
567
784
|
|
|
568
|
-
>
|
|
785
|
+
> { [key: string]: any; } getPublicBadgeAchievement(achievementId)
|
|
569
786
|
|
|
570
|
-
|
|
787
|
+
Get a hosted Open Badges Achievement
|
|
571
788
|
|
|
572
789
|
### Example
|
|
573
790
|
|
|
@@ -576,19 +793,19 @@ import {
|
|
|
576
793
|
Configuration,
|
|
577
794
|
CertificateApi,
|
|
578
795
|
} from '@easyedu/js-lsm-api';
|
|
579
|
-
import type {
|
|
796
|
+
import type { GetPublicBadgeAchievementRequest } from '@easyedu/js-lsm-api';
|
|
580
797
|
|
|
581
798
|
async function example() {
|
|
582
799
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
583
800
|
const api = new CertificateApi();
|
|
584
801
|
|
|
585
802
|
const body = {
|
|
586
|
-
//
|
|
587
|
-
|
|
588
|
-
} satisfies
|
|
803
|
+
// string
|
|
804
|
+
achievementId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
805
|
+
} satisfies GetPublicBadgeAchievementRequest;
|
|
589
806
|
|
|
590
807
|
try {
|
|
591
|
-
const data = await api.
|
|
808
|
+
const data = await api.getPublicBadgeAchievement(body);
|
|
592
809
|
console.log(data);
|
|
593
810
|
} catch (error) {
|
|
594
811
|
console.error(error);
|
|
@@ -604,11 +821,11 @@ example().catch(console.error);
|
|
|
604
821
|
|
|
605
822
|
| Name | Type | Description | Notes |
|
|
606
823
|
|------------- | ------------- | ------------- | -------------|
|
|
607
|
-
| **
|
|
824
|
+
| **achievementId** | `string` | | [Defaults to `undefined`] |
|
|
608
825
|
|
|
609
826
|
### Return type
|
|
610
827
|
|
|
611
|
-
[**
|
|
828
|
+
**{ [key: string]: any; }**
|
|
612
829
|
|
|
613
830
|
### Authorization
|
|
614
831
|
|
|
@@ -616,24 +833,24 @@ No authorization required
|
|
|
616
833
|
|
|
617
834
|
### HTTP request headers
|
|
618
835
|
|
|
619
|
-
- **Content-Type**:
|
|
836
|
+
- **Content-Type**: Not defined
|
|
620
837
|
- **Accept**: `application/json`
|
|
621
838
|
|
|
622
839
|
|
|
623
840
|
### HTTP response details
|
|
624
841
|
| Status code | Description | Response headers |
|
|
625
842
|
|-------------|-------------|------------------|
|
|
626
|
-
| **
|
|
627
|
-
| **
|
|
843
|
+
| **200** | Open Badges Achievement | - |
|
|
844
|
+
| **404** | Achievement not found | - |
|
|
628
845
|
|
|
629
846
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
630
847
|
|
|
631
848
|
|
|
632
|
-
##
|
|
849
|
+
## getPublicBadgeAchievementImage
|
|
633
850
|
|
|
634
|
-
>
|
|
851
|
+
> Blob getPublicBadgeAchievementImage(achievementId)
|
|
635
852
|
|
|
636
|
-
|
|
853
|
+
Get a validated square PNG badge image
|
|
637
854
|
|
|
638
855
|
### Example
|
|
639
856
|
|
|
@@ -642,7 +859,7 @@ import {
|
|
|
642
859
|
Configuration,
|
|
643
860
|
CertificateApi,
|
|
644
861
|
} from '@easyedu/js-lsm-api';
|
|
645
|
-
import type {
|
|
862
|
+
import type { GetPublicBadgeAchievementImageRequest } from '@easyedu/js-lsm-api';
|
|
646
863
|
|
|
647
864
|
async function example() {
|
|
648
865
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
@@ -650,13 +867,11 @@ async function example() {
|
|
|
650
867
|
|
|
651
868
|
const body = {
|
|
652
869
|
// string
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
postCertificate: ...,
|
|
656
|
-
} satisfies PostCourseCertificateRequest;
|
|
870
|
+
achievementId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
871
|
+
} satisfies GetPublicBadgeAchievementImageRequest;
|
|
657
872
|
|
|
658
873
|
try {
|
|
659
|
-
const data = await api.
|
|
874
|
+
const data = await api.getPublicBadgeAchievementImage(body);
|
|
660
875
|
console.log(data);
|
|
661
876
|
} catch (error) {
|
|
662
877
|
console.error(error);
|
|
@@ -672,12 +887,11 @@ example().catch(console.error);
|
|
|
672
887
|
|
|
673
888
|
| Name | Type | Description | Notes |
|
|
674
889
|
|------------- | ------------- | ------------- | -------------|
|
|
675
|
-
| **
|
|
676
|
-
| **postCertificate** | [PostCertificate](PostCertificate.md) | | |
|
|
890
|
+
| **achievementId** | `string` | | [Defaults to `undefined`] |
|
|
677
891
|
|
|
678
892
|
### Return type
|
|
679
893
|
|
|
680
|
-
|
|
894
|
+
**Blob**
|
|
681
895
|
|
|
682
896
|
### Authorization
|
|
683
897
|
|
|
@@ -685,24 +899,23 @@ No authorization required
|
|
|
685
899
|
|
|
686
900
|
### HTTP request headers
|
|
687
901
|
|
|
688
|
-
- **Content-Type**:
|
|
689
|
-
- **Accept**: `
|
|
902
|
+
- **Content-Type**: Not defined
|
|
903
|
+
- **Accept**: `image/png`
|
|
690
904
|
|
|
691
905
|
|
|
692
906
|
### HTTP response details
|
|
693
907
|
| Status code | Description | Response headers |
|
|
694
908
|
|-------------|-------------|------------------|
|
|
695
|
-
| **
|
|
696
|
-
| **409** | Active certificate already exists for this user and course | - |
|
|
909
|
+
| **200** | Badge PNG | - |
|
|
697
910
|
|
|
698
911
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
699
912
|
|
|
700
913
|
|
|
701
|
-
##
|
|
914
|
+
## getPublicBadgeCredential
|
|
702
915
|
|
|
703
|
-
>
|
|
916
|
+
> string getPublicBadgeCredential(credentialId)
|
|
704
917
|
|
|
705
|
-
|
|
918
|
+
Download an Open Badges 3.0 VC-JWT
|
|
706
919
|
|
|
707
920
|
### Example
|
|
708
921
|
|
|
@@ -711,7 +924,7 @@ import {
|
|
|
711
924
|
Configuration,
|
|
712
925
|
CertificateApi,
|
|
713
926
|
} from '@easyedu/js-lsm-api';
|
|
714
|
-
import type {
|
|
927
|
+
import type { GetPublicBadgeCredentialRequest } from '@easyedu/js-lsm-api';
|
|
715
928
|
|
|
716
929
|
async function example() {
|
|
717
930
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
@@ -719,13 +932,11 @@ async function example() {
|
|
|
719
932
|
|
|
720
933
|
const body = {
|
|
721
934
|
// string
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
postRevokeCertificate: ...,
|
|
725
|
-
} satisfies PostRevokeCertificateRequest;
|
|
935
|
+
credentialId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
936
|
+
} satisfies GetPublicBadgeCredentialRequest;
|
|
726
937
|
|
|
727
938
|
try {
|
|
728
|
-
const data = await api.
|
|
939
|
+
const data = await api.getPublicBadgeCredential(body);
|
|
729
940
|
console.log(data);
|
|
730
941
|
} catch (error) {
|
|
731
942
|
console.error(error);
|
|
@@ -741,12 +952,11 @@ example().catch(console.error);
|
|
|
741
952
|
|
|
742
953
|
| Name | Type | Description | Notes |
|
|
743
954
|
|------------- | ------------- | ------------- | -------------|
|
|
744
|
-
| **
|
|
745
|
-
| **postRevokeCertificate** | [PostRevokeCertificate](PostRevokeCertificate.md) | | |
|
|
955
|
+
| **credentialId** | `string` | | [Defaults to `undefined`] |
|
|
746
956
|
|
|
747
957
|
### Return type
|
|
748
958
|
|
|
749
|
-
|
|
959
|
+
**string**
|
|
750
960
|
|
|
751
961
|
### Authorization
|
|
752
962
|
|
|
@@ -754,15 +964,876 @@ No authorization required
|
|
|
754
964
|
|
|
755
965
|
### HTTP request headers
|
|
756
966
|
|
|
757
|
-
- **Content-Type**:
|
|
758
|
-
- **Accept**: `application/
|
|
967
|
+
- **Content-Type**: Not defined
|
|
968
|
+
- **Accept**: `application/vc+jwt`
|
|
759
969
|
|
|
760
970
|
|
|
761
971
|
### HTTP response details
|
|
762
972
|
| Status code | Description | Response headers |
|
|
763
973
|
|-------------|-------------|------------------|
|
|
764
|
-
| **200** |
|
|
765
|
-
| **404** |
|
|
974
|
+
| **200** | Compact signed VC-JWT | - |
|
|
975
|
+
| **404** | Credential not found | - |
|
|
976
|
+
|
|
977
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
## getPublicBadgeCredentialDocument
|
|
981
|
+
|
|
982
|
+
> { [key: string]: any; } getPublicBadgeCredentialDocument(credentialId)
|
|
983
|
+
|
|
984
|
+
Read the signed Open Badges credential document
|
|
985
|
+
|
|
986
|
+
### Example
|
|
987
|
+
|
|
988
|
+
```ts
|
|
989
|
+
import {
|
|
990
|
+
Configuration,
|
|
991
|
+
CertificateApi,
|
|
992
|
+
} from '@easyedu/js-lsm-api';
|
|
993
|
+
import type { GetPublicBadgeCredentialDocumentRequest } from '@easyedu/js-lsm-api';
|
|
994
|
+
|
|
995
|
+
async function example() {
|
|
996
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
997
|
+
const api = new CertificateApi();
|
|
998
|
+
|
|
999
|
+
const body = {
|
|
1000
|
+
// string
|
|
1001
|
+
credentialId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1002
|
+
} satisfies GetPublicBadgeCredentialDocumentRequest;
|
|
1003
|
+
|
|
1004
|
+
try {
|
|
1005
|
+
const data = await api.getPublicBadgeCredentialDocument(body);
|
|
1006
|
+
console.log(data);
|
|
1007
|
+
} catch (error) {
|
|
1008
|
+
console.error(error);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
// Run the test
|
|
1013
|
+
example().catch(console.error);
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
### Parameters
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
| Name | Type | Description | Notes |
|
|
1020
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1021
|
+
| **credentialId** | `string` | | [Defaults to `undefined`] |
|
|
1022
|
+
|
|
1023
|
+
### Return type
|
|
1024
|
+
|
|
1025
|
+
**{ [key: string]: any; }**
|
|
1026
|
+
|
|
1027
|
+
### Authorization
|
|
1028
|
+
|
|
1029
|
+
No authorization required
|
|
1030
|
+
|
|
1031
|
+
### HTTP request headers
|
|
1032
|
+
|
|
1033
|
+
- **Content-Type**: Not defined
|
|
1034
|
+
- **Accept**: `application/json`
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
### HTTP response details
|
|
1038
|
+
| Status code | Description | Response headers |
|
|
1039
|
+
|-------------|-------------|------------------|
|
|
1040
|
+
| **200** | OpenBadgeCredential JSON document | - |
|
|
1041
|
+
|
|
1042
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
## getPublicBadgeCredentialStatus
|
|
1046
|
+
|
|
1047
|
+
> GetPublicBadgeCredentialStatus200Response getPublicBadgeCredentialStatus(credentialId)
|
|
1048
|
+
|
|
1049
|
+
Get mutable hosted status without changing the signed credential
|
|
1050
|
+
|
|
1051
|
+
### Example
|
|
1052
|
+
|
|
1053
|
+
```ts
|
|
1054
|
+
import {
|
|
1055
|
+
Configuration,
|
|
1056
|
+
CertificateApi,
|
|
1057
|
+
} from '@easyedu/js-lsm-api';
|
|
1058
|
+
import type { GetPublicBadgeCredentialStatusRequest } from '@easyedu/js-lsm-api';
|
|
1059
|
+
|
|
1060
|
+
async function example() {
|
|
1061
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1062
|
+
const api = new CertificateApi();
|
|
1063
|
+
|
|
1064
|
+
const body = {
|
|
1065
|
+
// string
|
|
1066
|
+
credentialId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1067
|
+
} satisfies GetPublicBadgeCredentialStatusRequest;
|
|
1068
|
+
|
|
1069
|
+
try {
|
|
1070
|
+
const data = await api.getPublicBadgeCredentialStatus(body);
|
|
1071
|
+
console.log(data);
|
|
1072
|
+
} catch (error) {
|
|
1073
|
+
console.error(error);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
// Run the test
|
|
1078
|
+
example().catch(console.error);
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
### Parameters
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
| Name | Type | Description | Notes |
|
|
1085
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1086
|
+
| **credentialId** | `string` | | [Defaults to `undefined`] |
|
|
1087
|
+
|
|
1088
|
+
### Return type
|
|
1089
|
+
|
|
1090
|
+
[**GetPublicBadgeCredentialStatus200Response**](GetPublicBadgeCredentialStatus200Response.md)
|
|
1091
|
+
|
|
1092
|
+
### Authorization
|
|
1093
|
+
|
|
1094
|
+
No authorization required
|
|
1095
|
+
|
|
1096
|
+
### HTTP request headers
|
|
1097
|
+
|
|
1098
|
+
- **Content-Type**: Not defined
|
|
1099
|
+
- **Accept**: `application/json`
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
### HTTP response details
|
|
1103
|
+
| Status code | Description | Response headers |
|
|
1104
|
+
|-------------|-------------|------------------|
|
|
1105
|
+
| **200** | Hosted credential status | - |
|
|
1106
|
+
|
|
1107
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
## getPublicBadgeIssuer
|
|
1111
|
+
|
|
1112
|
+
> { [key: string]: any; } getPublicBadgeIssuer(portalId)
|
|
1113
|
+
|
|
1114
|
+
Get an Open Badges issuer profile
|
|
1115
|
+
|
|
1116
|
+
### Example
|
|
1117
|
+
|
|
1118
|
+
```ts
|
|
1119
|
+
import {
|
|
1120
|
+
Configuration,
|
|
1121
|
+
CertificateApi,
|
|
1122
|
+
} from '@easyedu/js-lsm-api';
|
|
1123
|
+
import type { GetPublicBadgeIssuerRequest } from '@easyedu/js-lsm-api';
|
|
1124
|
+
|
|
1125
|
+
async function example() {
|
|
1126
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1127
|
+
const api = new CertificateApi();
|
|
1128
|
+
|
|
1129
|
+
const body = {
|
|
1130
|
+
// string
|
|
1131
|
+
portalId: portalId_example,
|
|
1132
|
+
} satisfies GetPublicBadgeIssuerRequest;
|
|
1133
|
+
|
|
1134
|
+
try {
|
|
1135
|
+
const data = await api.getPublicBadgeIssuer(body);
|
|
1136
|
+
console.log(data);
|
|
1137
|
+
} catch (error) {
|
|
1138
|
+
console.error(error);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
// Run the test
|
|
1143
|
+
example().catch(console.error);
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
### Parameters
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
| Name | Type | Description | Notes |
|
|
1150
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1151
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
1152
|
+
|
|
1153
|
+
### Return type
|
|
1154
|
+
|
|
1155
|
+
**{ [key: string]: any; }**
|
|
1156
|
+
|
|
1157
|
+
### Authorization
|
|
1158
|
+
|
|
1159
|
+
No authorization required
|
|
1160
|
+
|
|
1161
|
+
### HTTP request headers
|
|
1162
|
+
|
|
1163
|
+
- **Content-Type**: Not defined
|
|
1164
|
+
- **Accept**: `application/json`
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
### HTTP response details
|
|
1168
|
+
| Status code | Description | Response headers |
|
|
1169
|
+
|-------------|-------------|------------------|
|
|
1170
|
+
| **200** | Open Badges Profile | - |
|
|
1171
|
+
| **404** | Issuer not found | - |
|
|
1172
|
+
|
|
1173
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
## getPublicBadgeIssuerDidDocument
|
|
1177
|
+
|
|
1178
|
+
> { [key: string]: any; } getPublicBadgeIssuerDidDocument(portalId)
|
|
1179
|
+
|
|
1180
|
+
Get the portal-specific did:web document and retained public keys
|
|
1181
|
+
|
|
1182
|
+
### Example
|
|
1183
|
+
|
|
1184
|
+
```ts
|
|
1185
|
+
import {
|
|
1186
|
+
Configuration,
|
|
1187
|
+
CertificateApi,
|
|
1188
|
+
} from '@easyedu/js-lsm-api';
|
|
1189
|
+
import type { GetPublicBadgeIssuerDidDocumentRequest } from '@easyedu/js-lsm-api';
|
|
1190
|
+
|
|
1191
|
+
async function example() {
|
|
1192
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1193
|
+
const api = new CertificateApi();
|
|
1194
|
+
|
|
1195
|
+
const body = {
|
|
1196
|
+
// string
|
|
1197
|
+
portalId: portalId_example,
|
|
1198
|
+
} satisfies GetPublicBadgeIssuerDidDocumentRequest;
|
|
1199
|
+
|
|
1200
|
+
try {
|
|
1201
|
+
const data = await api.getPublicBadgeIssuerDidDocument(body);
|
|
1202
|
+
console.log(data);
|
|
1203
|
+
} catch (error) {
|
|
1204
|
+
console.error(error);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// Run the test
|
|
1209
|
+
example().catch(console.error);
|
|
1210
|
+
```
|
|
1211
|
+
|
|
1212
|
+
### Parameters
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
| Name | Type | Description | Notes |
|
|
1216
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1217
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
1218
|
+
|
|
1219
|
+
### Return type
|
|
1220
|
+
|
|
1221
|
+
**{ [key: string]: any; }**
|
|
1222
|
+
|
|
1223
|
+
### Authorization
|
|
1224
|
+
|
|
1225
|
+
No authorization required
|
|
1226
|
+
|
|
1227
|
+
### HTTP request headers
|
|
1228
|
+
|
|
1229
|
+
- **Content-Type**: Not defined
|
|
1230
|
+
- **Accept**: `application/did+json`
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
### HTTP response details
|
|
1234
|
+
| Status code | Description | Response headers |
|
|
1235
|
+
|-------------|-------------|------------------|
|
|
1236
|
+
| **200** | did:web document | - |
|
|
1237
|
+
|
|
1238
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
## getPublicCertificatePdf
|
|
1242
|
+
|
|
1243
|
+
> Blob getPublicCertificatePdf(certificateId)
|
|
1244
|
+
|
|
1245
|
+
Download an immutable public certificate PDF
|
|
1246
|
+
|
|
1247
|
+
### Example
|
|
1248
|
+
|
|
1249
|
+
```ts
|
|
1250
|
+
import {
|
|
1251
|
+
Configuration,
|
|
1252
|
+
CertificateApi,
|
|
1253
|
+
} from '@easyedu/js-lsm-api';
|
|
1254
|
+
import type { GetPublicCertificatePdfRequest } from '@easyedu/js-lsm-api';
|
|
1255
|
+
|
|
1256
|
+
async function example() {
|
|
1257
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1258
|
+
const api = new CertificateApi();
|
|
1259
|
+
|
|
1260
|
+
const body = {
|
|
1261
|
+
// string
|
|
1262
|
+
certificateId: certificateId_example,
|
|
1263
|
+
} satisfies GetPublicCertificatePdfRequest;
|
|
1264
|
+
|
|
1265
|
+
try {
|
|
1266
|
+
const data = await api.getPublicCertificatePdf(body);
|
|
1267
|
+
console.log(data);
|
|
1268
|
+
} catch (error) {
|
|
1269
|
+
console.error(error);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// Run the test
|
|
1274
|
+
example().catch(console.error);
|
|
1275
|
+
```
|
|
1276
|
+
|
|
1277
|
+
### Parameters
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
| Name | Type | Description | Notes |
|
|
1281
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1282
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
1283
|
+
|
|
1284
|
+
### Return type
|
|
1285
|
+
|
|
1286
|
+
**Blob**
|
|
1287
|
+
|
|
1288
|
+
### Authorization
|
|
1289
|
+
|
|
1290
|
+
No authorization required
|
|
1291
|
+
|
|
1292
|
+
### HTTP request headers
|
|
1293
|
+
|
|
1294
|
+
- **Content-Type**: Not defined
|
|
1295
|
+
- **Accept**: `application/pdf`, `application/json`
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
### HTTP response details
|
|
1299
|
+
| Status code | Description | Response headers |
|
|
1300
|
+
|-------------|-------------|------------------|
|
|
1301
|
+
| **200** | Stored PDF | - |
|
|
1302
|
+
| **404** | Certificate not found | - |
|
|
1303
|
+
| **409** | Artifact has not completed successfully | - |
|
|
1304
|
+
|
|
1305
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
## postBadgeIssuerKeyRotate
|
|
1309
|
+
|
|
1310
|
+
> BadgeIssuer postBadgeIssuerKeyRotate()
|
|
1311
|
+
|
|
1312
|
+
Generate and activate a new KMS-wrapped portal signing key
|
|
1313
|
+
|
|
1314
|
+
### Example
|
|
1315
|
+
|
|
1316
|
+
```ts
|
|
1317
|
+
import {
|
|
1318
|
+
Configuration,
|
|
1319
|
+
CertificateApi,
|
|
1320
|
+
} from '@easyedu/js-lsm-api';
|
|
1321
|
+
import type { PostBadgeIssuerKeyRotateRequest } from '@easyedu/js-lsm-api';
|
|
1322
|
+
|
|
1323
|
+
async function example() {
|
|
1324
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1325
|
+
const api = new CertificateApi();
|
|
1326
|
+
|
|
1327
|
+
try {
|
|
1328
|
+
const data = await api.postBadgeIssuerKeyRotate();
|
|
1329
|
+
console.log(data);
|
|
1330
|
+
} catch (error) {
|
|
1331
|
+
console.error(error);
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// Run the test
|
|
1336
|
+
example().catch(console.error);
|
|
1337
|
+
```
|
|
1338
|
+
|
|
1339
|
+
### Parameters
|
|
1340
|
+
|
|
1341
|
+
This endpoint does not need any parameter.
|
|
1342
|
+
|
|
1343
|
+
### Return type
|
|
1344
|
+
|
|
1345
|
+
[**BadgeIssuer**](BadgeIssuer.md)
|
|
1346
|
+
|
|
1347
|
+
### Authorization
|
|
1348
|
+
|
|
1349
|
+
No authorization required
|
|
1350
|
+
|
|
1351
|
+
### HTTP request headers
|
|
1352
|
+
|
|
1353
|
+
- **Content-Type**: Not defined
|
|
1354
|
+
- **Accept**: `application/json`
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
### HTTP response details
|
|
1358
|
+
| Status code | Description | Response headers |
|
|
1359
|
+
|-------------|-------------|------------------|
|
|
1360
|
+
| **200** | Issuer with the new active key | - |
|
|
1361
|
+
|
|
1362
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
## postCertificateArtifactRetry
|
|
1366
|
+
|
|
1367
|
+
> CertificateArtifact postCertificateArtifactRetry(certificateId)
|
|
1368
|
+
|
|
1369
|
+
Retry failed certificate artifact generation
|
|
1370
|
+
|
|
1371
|
+
### Example
|
|
1372
|
+
|
|
1373
|
+
```ts
|
|
1374
|
+
import {
|
|
1375
|
+
Configuration,
|
|
1376
|
+
CertificateApi,
|
|
1377
|
+
} from '@easyedu/js-lsm-api';
|
|
1378
|
+
import type { PostCertificateArtifactRetryRequest } from '@easyedu/js-lsm-api';
|
|
1379
|
+
|
|
1380
|
+
async function example() {
|
|
1381
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1382
|
+
const api = new CertificateApi();
|
|
1383
|
+
|
|
1384
|
+
const body = {
|
|
1385
|
+
// string
|
|
1386
|
+
certificateId: certificateId_example,
|
|
1387
|
+
} satisfies PostCertificateArtifactRetryRequest;
|
|
1388
|
+
|
|
1389
|
+
try {
|
|
1390
|
+
const data = await api.postCertificateArtifactRetry(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
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
1407
|
+
|
|
1408
|
+
### Return type
|
|
1409
|
+
|
|
1410
|
+
[**CertificateArtifact**](CertificateArtifact.md)
|
|
1411
|
+
|
|
1412
|
+
### Authorization
|
|
1413
|
+
|
|
1414
|
+
No authorization required
|
|
1415
|
+
|
|
1416
|
+
### HTTP request headers
|
|
1417
|
+
|
|
1418
|
+
- **Content-Type**: Not defined
|
|
1419
|
+
- **Accept**: `application/json`
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
### HTTP response details
|
|
1423
|
+
| Status code | Description | Response headers |
|
|
1424
|
+
|-------------|-------------|------------------|
|
|
1425
|
+
| **202** | Artifact generation queued | - |
|
|
1426
|
+
| **409** | Artifact is not failed | - |
|
|
1427
|
+
|
|
1428
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
## postCertificateConfig
|
|
1432
|
+
|
|
1433
|
+
> CertificateConfig postCertificateConfig(postCertificateConfig)
|
|
1434
|
+
|
|
1435
|
+
Create a certificate config
|
|
1436
|
+
|
|
1437
|
+
### Example
|
|
1438
|
+
|
|
1439
|
+
```ts
|
|
1440
|
+
import {
|
|
1441
|
+
Configuration,
|
|
1442
|
+
CertificateApi,
|
|
1443
|
+
} from '@easyedu/js-lsm-api';
|
|
1444
|
+
import type { PostCertificateConfigRequest } from '@easyedu/js-lsm-api';
|
|
1445
|
+
|
|
1446
|
+
async function example() {
|
|
1447
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1448
|
+
const api = new CertificateApi();
|
|
1449
|
+
|
|
1450
|
+
const body = {
|
|
1451
|
+
// PostCertificateConfig
|
|
1452
|
+
postCertificateConfig: ...,
|
|
1453
|
+
} satisfies PostCertificateConfigRequest;
|
|
1454
|
+
|
|
1455
|
+
try {
|
|
1456
|
+
const data = await api.postCertificateConfig(body);
|
|
1457
|
+
console.log(data);
|
|
1458
|
+
} catch (error) {
|
|
1459
|
+
console.error(error);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
// Run the test
|
|
1464
|
+
example().catch(console.error);
|
|
1465
|
+
```
|
|
1466
|
+
|
|
1467
|
+
### Parameters
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
| Name | Type | Description | Notes |
|
|
1471
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1472
|
+
| **postCertificateConfig** | [PostCertificateConfig](PostCertificateConfig.md) | | |
|
|
1473
|
+
|
|
1474
|
+
### Return type
|
|
1475
|
+
|
|
1476
|
+
[**CertificateConfig**](CertificateConfig.md)
|
|
1477
|
+
|
|
1478
|
+
### Authorization
|
|
1479
|
+
|
|
1480
|
+
No authorization required
|
|
1481
|
+
|
|
1482
|
+
### HTTP request headers
|
|
1483
|
+
|
|
1484
|
+
- **Content-Type**: `application/json`
|
|
1485
|
+
- **Accept**: `application/json`
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
### HTTP response details
|
|
1489
|
+
| Status code | Description | Response headers |
|
|
1490
|
+
|-------------|-------------|------------------|
|
|
1491
|
+
| **201** | Config created | - |
|
|
1492
|
+
| **409** | Config already exists for this scope | - |
|
|
1493
|
+
|
|
1494
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
## postCertificateRenew
|
|
1498
|
+
|
|
1499
|
+
> Certificate postCertificateRenew(certificateId, postCertificateLifecycleAction)
|
|
1500
|
+
|
|
1501
|
+
Manually renew an eligible certificate
|
|
1502
|
+
|
|
1503
|
+
### Example
|
|
1504
|
+
|
|
1505
|
+
```ts
|
|
1506
|
+
import {
|
|
1507
|
+
Configuration,
|
|
1508
|
+
CertificateApi,
|
|
1509
|
+
} from '@easyedu/js-lsm-api';
|
|
1510
|
+
import type { PostCertificateRenewRequest } from '@easyedu/js-lsm-api';
|
|
1511
|
+
|
|
1512
|
+
async function example() {
|
|
1513
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1514
|
+
const api = new CertificateApi();
|
|
1515
|
+
|
|
1516
|
+
const body = {
|
|
1517
|
+
// string
|
|
1518
|
+
certificateId: certificateId_example,
|
|
1519
|
+
// PostCertificateLifecycleAction
|
|
1520
|
+
postCertificateLifecycleAction: ...,
|
|
1521
|
+
} satisfies PostCertificateRenewRequest;
|
|
1522
|
+
|
|
1523
|
+
try {
|
|
1524
|
+
const data = await api.postCertificateRenew(body);
|
|
1525
|
+
console.log(data);
|
|
1526
|
+
} catch (error) {
|
|
1527
|
+
console.error(error);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// Run the test
|
|
1532
|
+
example().catch(console.error);
|
|
1533
|
+
```
|
|
1534
|
+
|
|
1535
|
+
### Parameters
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
| Name | Type | Description | Notes |
|
|
1539
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1540
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
1541
|
+
| **postCertificateLifecycleAction** | [PostCertificateLifecycleAction](PostCertificateLifecycleAction.md) | | |
|
|
1542
|
+
|
|
1543
|
+
### Return type
|
|
1544
|
+
|
|
1545
|
+
[**Certificate**](Certificate.md)
|
|
1546
|
+
|
|
1547
|
+
### Authorization
|
|
1548
|
+
|
|
1549
|
+
No authorization required
|
|
1550
|
+
|
|
1551
|
+
### HTTP request headers
|
|
1552
|
+
|
|
1553
|
+
- **Content-Type**: `application/json`
|
|
1554
|
+
- **Accept**: `application/json`
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
### HTTP response details
|
|
1558
|
+
| Status code | Description | Response headers |
|
|
1559
|
+
|-------------|-------------|------------------|
|
|
1560
|
+
| **201** | Renewal issued | - |
|
|
1561
|
+
| **409** | Certificate is not eligible for renewal | - |
|
|
1562
|
+
|
|
1563
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
## postCertificateReplace
|
|
1567
|
+
|
|
1568
|
+
> Certificate postCertificateReplace(certificateId, postCertificateLifecycleAction, correction)
|
|
1569
|
+
|
|
1570
|
+
Replace or correct an issued certificate
|
|
1571
|
+
|
|
1572
|
+
### Example
|
|
1573
|
+
|
|
1574
|
+
```ts
|
|
1575
|
+
import {
|
|
1576
|
+
Configuration,
|
|
1577
|
+
CertificateApi,
|
|
1578
|
+
} from '@easyedu/js-lsm-api';
|
|
1579
|
+
import type { PostCertificateReplaceRequest } from '@easyedu/js-lsm-api';
|
|
1580
|
+
|
|
1581
|
+
async function example() {
|
|
1582
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1583
|
+
const api = new CertificateApi();
|
|
1584
|
+
|
|
1585
|
+
const body = {
|
|
1586
|
+
// string
|
|
1587
|
+
certificateId: certificateId_example,
|
|
1588
|
+
// PostCertificateLifecycleAction
|
|
1589
|
+
postCertificateLifecycleAction: ...,
|
|
1590
|
+
// boolean (optional)
|
|
1591
|
+
correction: true,
|
|
1592
|
+
} satisfies PostCertificateReplaceRequest;
|
|
1593
|
+
|
|
1594
|
+
try {
|
|
1595
|
+
const data = await api.postCertificateReplace(body);
|
|
1596
|
+
console.log(data);
|
|
1597
|
+
} catch (error) {
|
|
1598
|
+
console.error(error);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
// Run the test
|
|
1603
|
+
example().catch(console.error);
|
|
1604
|
+
```
|
|
1605
|
+
|
|
1606
|
+
### Parameters
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
| Name | Type | Description | Notes |
|
|
1610
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1611
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
1612
|
+
| **postCertificateLifecycleAction** | [PostCertificateLifecycleAction](PostCertificateLifecycleAction.md) | | |
|
|
1613
|
+
| **correction** | `boolean` | | [Optional] [Defaults to `false`] |
|
|
1614
|
+
|
|
1615
|
+
### Return type
|
|
1616
|
+
|
|
1617
|
+
[**Certificate**](Certificate.md)
|
|
1618
|
+
|
|
1619
|
+
### Authorization
|
|
1620
|
+
|
|
1621
|
+
No authorization required
|
|
1622
|
+
|
|
1623
|
+
### HTTP request headers
|
|
1624
|
+
|
|
1625
|
+
- **Content-Type**: `application/json`
|
|
1626
|
+
- **Accept**: `application/json`
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
### HTTP response details
|
|
1630
|
+
| Status code | Description | Response headers |
|
|
1631
|
+
|-------------|-------------|------------------|
|
|
1632
|
+
| **201** | Replacement or correction issued | - |
|
|
1633
|
+
| **409** | Certificate already has a successor | - |
|
|
1634
|
+
|
|
1635
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
## postCourseCertificate
|
|
1639
|
+
|
|
1640
|
+
> Certificate postCourseCertificate(courseId, postCertificate)
|
|
1641
|
+
|
|
1642
|
+
Manually issue a certificate for a course
|
|
1643
|
+
|
|
1644
|
+
### Example
|
|
1645
|
+
|
|
1646
|
+
```ts
|
|
1647
|
+
import {
|
|
1648
|
+
Configuration,
|
|
1649
|
+
CertificateApi,
|
|
1650
|
+
} from '@easyedu/js-lsm-api';
|
|
1651
|
+
import type { PostCourseCertificateRequest } from '@easyedu/js-lsm-api';
|
|
1652
|
+
|
|
1653
|
+
async function example() {
|
|
1654
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1655
|
+
const api = new CertificateApi();
|
|
1656
|
+
|
|
1657
|
+
const body = {
|
|
1658
|
+
// string
|
|
1659
|
+
courseId: courseId_example,
|
|
1660
|
+
// PostCertificate
|
|
1661
|
+
postCertificate: ...,
|
|
1662
|
+
} satisfies PostCourseCertificateRequest;
|
|
1663
|
+
|
|
1664
|
+
try {
|
|
1665
|
+
const data = await api.postCourseCertificate(body);
|
|
1666
|
+
console.log(data);
|
|
1667
|
+
} catch (error) {
|
|
1668
|
+
console.error(error);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
// Run the test
|
|
1673
|
+
example().catch(console.error);
|
|
1674
|
+
```
|
|
1675
|
+
|
|
1676
|
+
### Parameters
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
| Name | Type | Description | Notes |
|
|
1680
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1681
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1682
|
+
| **postCertificate** | [PostCertificate](PostCertificate.md) | | |
|
|
1683
|
+
|
|
1684
|
+
### Return type
|
|
1685
|
+
|
|
1686
|
+
[**Certificate**](Certificate.md)
|
|
1687
|
+
|
|
1688
|
+
### Authorization
|
|
1689
|
+
|
|
1690
|
+
No authorization required
|
|
1691
|
+
|
|
1692
|
+
### HTTP request headers
|
|
1693
|
+
|
|
1694
|
+
- **Content-Type**: `application/json`
|
|
1695
|
+
- **Accept**: `application/json`
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
### HTTP response details
|
|
1699
|
+
| Status code | Description | Response headers |
|
|
1700
|
+
|-------------|-------------|------------------|
|
|
1701
|
+
| **201** | Certificate issued | - |
|
|
1702
|
+
| **409** | Active certificate already exists for this user and course | - |
|
|
1703
|
+
|
|
1704
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
## postRevokeCertificate
|
|
1708
|
+
|
|
1709
|
+
> Certificate postRevokeCertificate(certificateId, postRevokeCertificate)
|
|
1710
|
+
|
|
1711
|
+
Revoke a certificate
|
|
1712
|
+
|
|
1713
|
+
### Example
|
|
1714
|
+
|
|
1715
|
+
```ts
|
|
1716
|
+
import {
|
|
1717
|
+
Configuration,
|
|
1718
|
+
CertificateApi,
|
|
1719
|
+
} from '@easyedu/js-lsm-api';
|
|
1720
|
+
import type { PostRevokeCertificateRequest } from '@easyedu/js-lsm-api';
|
|
1721
|
+
|
|
1722
|
+
async function example() {
|
|
1723
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1724
|
+
const api = new CertificateApi();
|
|
1725
|
+
|
|
1726
|
+
const body = {
|
|
1727
|
+
// string
|
|
1728
|
+
certificateId: certificateId_example,
|
|
1729
|
+
// PostRevokeCertificate
|
|
1730
|
+
postRevokeCertificate: ...,
|
|
1731
|
+
} satisfies PostRevokeCertificateRequest;
|
|
1732
|
+
|
|
1733
|
+
try {
|
|
1734
|
+
const data = await api.postRevokeCertificate(body);
|
|
1735
|
+
console.log(data);
|
|
1736
|
+
} catch (error) {
|
|
1737
|
+
console.error(error);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// Run the test
|
|
1742
|
+
example().catch(console.error);
|
|
1743
|
+
```
|
|
1744
|
+
|
|
1745
|
+
### Parameters
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
| Name | Type | Description | Notes |
|
|
1749
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1750
|
+
| **certificateId** | `string` | | [Defaults to `undefined`] |
|
|
1751
|
+
| **postRevokeCertificate** | [PostRevokeCertificate](PostRevokeCertificate.md) | | |
|
|
1752
|
+
|
|
1753
|
+
### Return type
|
|
1754
|
+
|
|
1755
|
+
[**Certificate**](Certificate.md)
|
|
1756
|
+
|
|
1757
|
+
### Authorization
|
|
1758
|
+
|
|
1759
|
+
No authorization required
|
|
1760
|
+
|
|
1761
|
+
### HTTP request headers
|
|
1762
|
+
|
|
1763
|
+
- **Content-Type**: `application/json`
|
|
1764
|
+
- **Accept**: `application/json`
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
### HTTP response details
|
|
1768
|
+
| Status code | Description | Response headers |
|
|
1769
|
+
|-------------|-------------|------------------|
|
|
1770
|
+
| **200** | Revoked | - |
|
|
1771
|
+
| **404** | Not found | - |
|
|
1772
|
+
|
|
1773
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
## putBadgeIssuer
|
|
1777
|
+
|
|
1778
|
+
> BadgeIssuer putBadgeIssuer(putBadgeIssuer)
|
|
1779
|
+
|
|
1780
|
+
Create or update the selected portal Open Badges issuer
|
|
1781
|
+
|
|
1782
|
+
### Example
|
|
1783
|
+
|
|
1784
|
+
```ts
|
|
1785
|
+
import {
|
|
1786
|
+
Configuration,
|
|
1787
|
+
CertificateApi,
|
|
1788
|
+
} from '@easyedu/js-lsm-api';
|
|
1789
|
+
import type { PutBadgeIssuerRequest } from '@easyedu/js-lsm-api';
|
|
1790
|
+
|
|
1791
|
+
async function example() {
|
|
1792
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1793
|
+
const api = new CertificateApi();
|
|
1794
|
+
|
|
1795
|
+
const body = {
|
|
1796
|
+
// PutBadgeIssuer
|
|
1797
|
+
putBadgeIssuer: ...,
|
|
1798
|
+
} satisfies PutBadgeIssuerRequest;
|
|
1799
|
+
|
|
1800
|
+
try {
|
|
1801
|
+
const data = await api.putBadgeIssuer(body);
|
|
1802
|
+
console.log(data);
|
|
1803
|
+
} catch (error) {
|
|
1804
|
+
console.error(error);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
// Run the test
|
|
1809
|
+
example().catch(console.error);
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
### Parameters
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
| Name | Type | Description | Notes |
|
|
1816
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1817
|
+
| **putBadgeIssuer** | [PutBadgeIssuer](PutBadgeIssuer.md) | | |
|
|
1818
|
+
|
|
1819
|
+
### Return type
|
|
1820
|
+
|
|
1821
|
+
[**BadgeIssuer**](BadgeIssuer.md)
|
|
1822
|
+
|
|
1823
|
+
### Authorization
|
|
1824
|
+
|
|
1825
|
+
No authorization required
|
|
1826
|
+
|
|
1827
|
+
### HTTP request headers
|
|
1828
|
+
|
|
1829
|
+
- **Content-Type**: `application/json`
|
|
1830
|
+
- **Accept**: `application/json`
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
### HTTP response details
|
|
1834
|
+
| Status code | Description | Response headers |
|
|
1835
|
+
|-------------|-------------|------------------|
|
|
1836
|
+
| **200** | Badge issuer | - |
|
|
766
1837
|
|
|
767
1838
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
768
1839
|
|