@easyedu/js-lsm-api 1.48.0 → 1.50.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.
Files changed (85) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +31 -8
  3. package/dist/apis/CertificateApi.d.ts +237 -0
  4. package/dist/apis/CertificateApi.js +587 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/CertificateApi.d.ts +237 -0
  8. package/dist/esm/apis/CertificateApi.js +583 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/Certificate.d.ts +151 -0
  12. package/dist/esm/models/Certificate.js +114 -0
  13. package/dist/esm/models/CertificateConfig.d.ts +86 -0
  14. package/dist/esm/models/CertificateConfig.js +69 -0
  15. package/dist/esm/models/CertificatePublic.d.ts +98 -0
  16. package/dist/esm/models/CertificatePublic.js +87 -0
  17. package/dist/esm/models/EffectiveCertificateConfig.d.ts +62 -0
  18. package/dist/esm/models/EffectiveCertificateConfig.js +55 -0
  19. package/dist/esm/models/GetCertificateConfigList.d.ts +33 -0
  20. package/dist/esm/models/GetCertificateConfigList.js +44 -0
  21. package/dist/esm/models/GetCertificateList.d.ts +33 -0
  22. package/dist/esm/models/GetCertificateList.js +44 -0
  23. package/dist/esm/models/GetModuleInstructorBasicReportingEngagement.d.ts +24 -0
  24. package/dist/esm/models/GetModuleInstructorBasicReportingEngagement.js +16 -0
  25. package/dist/esm/models/PostCertificate.d.ts +50 -0
  26. package/dist/esm/models/PostCertificate.js +49 -0
  27. package/dist/esm/models/PostCertificateConfig.d.ts +62 -0
  28. package/dist/esm/models/PostCertificateConfig.js +53 -0
  29. package/dist/esm/models/PostRevokeCertificate.d.ts +32 -0
  30. package/dist/esm/models/PostRevokeCertificate.js +41 -0
  31. package/dist/esm/models/PutCertificateConfig.d.ts +56 -0
  32. package/dist/esm/models/PutCertificateConfig.js +49 -0
  33. package/dist/esm/models/index.d.ts +10 -0
  34. package/dist/esm/models/index.js +10 -0
  35. package/dist/models/Certificate.d.ts +151 -0
  36. package/dist/models/Certificate.js +122 -0
  37. package/dist/models/CertificateConfig.d.ts +86 -0
  38. package/dist/models/CertificateConfig.js +76 -0
  39. package/dist/models/CertificatePublic.d.ts +98 -0
  40. package/dist/models/CertificatePublic.js +95 -0
  41. package/dist/models/EffectiveCertificateConfig.d.ts +62 -0
  42. package/dist/models/EffectiveCertificateConfig.js +62 -0
  43. package/dist/models/GetCertificateConfigList.d.ts +33 -0
  44. package/dist/models/GetCertificateConfigList.js +51 -0
  45. package/dist/models/GetCertificateList.d.ts +33 -0
  46. package/dist/models/GetCertificateList.js +51 -0
  47. package/dist/models/GetModuleInstructorBasicReportingEngagement.d.ts +24 -0
  48. package/dist/models/GetModuleInstructorBasicReportingEngagement.js +16 -0
  49. package/dist/models/PostCertificate.d.ts +50 -0
  50. package/dist/models/PostCertificate.js +56 -0
  51. package/dist/models/PostCertificateConfig.d.ts +62 -0
  52. package/dist/models/PostCertificateConfig.js +60 -0
  53. package/dist/models/PostRevokeCertificate.d.ts +32 -0
  54. package/dist/models/PostRevokeCertificate.js +48 -0
  55. package/dist/models/PutCertificateConfig.d.ts +56 -0
  56. package/dist/models/PutCertificateConfig.js +56 -0
  57. package/dist/models/index.d.ts +10 -0
  58. package/dist/models/index.js +10 -0
  59. package/docs/Certificate.md +68 -0
  60. package/docs/CertificateApi.md +903 -0
  61. package/docs/CertificateConfig.md +52 -0
  62. package/docs/CertificatePublic.md +51 -0
  63. package/docs/EffectiveCertificateConfig.md +45 -0
  64. package/docs/GetCertificateConfigList.md +34 -0
  65. package/docs/GetCertificateList.md +34 -0
  66. package/docs/GetModuleInstructorBasicReportingEngagement.md +8 -0
  67. package/docs/PostCertificate.md +41 -0
  68. package/docs/PostCertificateConfig.md +44 -0
  69. package/docs/PostRevokeCertificate.md +34 -0
  70. package/docs/PutCertificateConfig.md +42 -0
  71. package/package.json +1 -1
  72. package/src/apis/CertificateApi.ts +765 -0
  73. package/src/apis/index.ts +1 -0
  74. package/src/models/Certificate.ts +234 -0
  75. package/src/models/CertificateConfig.ts +142 -0
  76. package/src/models/CertificatePublic.ts +158 -0
  77. package/src/models/EffectiveCertificateConfig.ts +107 -0
  78. package/src/models/GetCertificateConfigList.ts +74 -0
  79. package/src/models/GetCertificateList.ts +74 -0
  80. package/src/models/GetModuleInstructorBasicReportingEngagement.ts +36 -0
  81. package/src/models/PostCertificate.ts +90 -0
  82. package/src/models/PostCertificateConfig.ts +106 -0
  83. package/src/models/PostRevokeCertificate.ts +65 -0
  84. package/src/models/PutCertificateConfig.ts +97 -0
  85. package/src/models/index.ts +10 -0
@@ -0,0 +1,903 @@
1
+ # CertificateApi
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
+ | [**deleteCertificateConfig**](CertificateApi.md#deletecertificateconfig) | **DELETE** /certificate-configs/{configId} | Delete a certificate config |
8
+ | [**getCertificate**](CertificateApi.md#getcertificate) | **GET** /certificates/{certificateId} | Get a single certificate |
9
+ | [**getCertificateConfig**](CertificateApi.md#getcertificateconfig) | **GET** /certificate-configs/{configId} | Get a certificate config |
10
+ | [**getCertificateConfigs**](CertificateApi.md#getcertificateconfigs) | **GET** /certificate-configs | List certificate configs in the current portal |
11
+ | [**getCertificatePdf**](CertificateApi.md#getcertificatepdf) | **GET** /certificates/{certificateId}/pdf | Download certificate as PDF |
12
+ | [**getCertificates**](CertificateApi.md#getcertificates) | **GET** /certificates | List certificates in the current portal |
13
+ | [**getCurrentUserCertificates**](CertificateApi.md#getcurrentusercertificates) | **GET** /certificates/current | List the authenticated user\'s own certificates |
14
+ | [**getEffectiveCertificateConfig**](CertificateApi.md#geteffectivecertificateconfig) | **GET** /courses/{courseId}/certificate-config/effective | Resolve effective certificate config for a course |
15
+ | [**postCertificateConfig**](CertificateApi.md#postcertificateconfig) | **POST** /certificate-configs | Create a certificate config |
16
+ | [**postCourseCertificate**](CertificateApi.md#postcoursecertificate) | **POST** /courses/{courseId}/certificates | Manually issue a certificate for a course |
17
+ | [**postRevokeCertificate**](CertificateApi.md#postrevokecertificate) | **POST** /certificates/{certificateId}/revoke | Revoke a certificate |
18
+ | [**putCertificateConfig**](CertificateApi.md#putcertificateconfig) | **PUT** /certificate-configs/{configId} | Update a certificate config |
19
+ | [**verifyCertificate**](CertificateApi.md#verifycertificate) | **GET** /public/certificates/{certificateId}/verify | Public certificate verification (no auth) |
20
+
21
+
22
+
23
+ ## deleteCertificateConfig
24
+
25
+ > deleteCertificateConfig(configId)
26
+
27
+ Delete a certificate config
28
+
29
+ ### Example
30
+
31
+ ```ts
32
+ import {
33
+ Configuration,
34
+ CertificateApi,
35
+ } from '@easyedu/js-lsm-api';
36
+ import type { DeleteCertificateConfigRequest } from '@easyedu/js-lsm-api';
37
+
38
+ async function example() {
39
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
40
+ const api = new CertificateApi();
41
+
42
+ const body = {
43
+ // string
44
+ configId: configId_example,
45
+ } satisfies DeleteCertificateConfigRequest;
46
+
47
+ try {
48
+ const data = await api.deleteCertificateConfig(body);
49
+ console.log(data);
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+
55
+ // Run the test
56
+ example().catch(console.error);
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+
62
+ | Name | Type | Description | Notes |
63
+ |------------- | ------------- | ------------- | -------------|
64
+ | **configId** | `string` | | [Defaults to `undefined`] |
65
+
66
+ ### Return type
67
+
68
+ `void` (Empty response body)
69
+
70
+ ### Authorization
71
+
72
+ No authorization required
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: Not defined
78
+
79
+
80
+ ### HTTP response details
81
+ | Status code | Description | Response headers |
82
+ |-------------|-------------|------------------|
83
+ | **204** | Deleted | - |
84
+ | **404** | Not found | - |
85
+
86
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
+
88
+
89
+ ## getCertificate
90
+
91
+ > Certificate getCertificate(certificateId)
92
+
93
+ Get a single certificate
94
+
95
+ ### Example
96
+
97
+ ```ts
98
+ import {
99
+ Configuration,
100
+ CertificateApi,
101
+ } from '@easyedu/js-lsm-api';
102
+ import type { GetCertificateRequest } from '@easyedu/js-lsm-api';
103
+
104
+ async function example() {
105
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
106
+ const api = new CertificateApi();
107
+
108
+ const body = {
109
+ // string
110
+ certificateId: certificateId_example,
111
+ } satisfies GetCertificateRequest;
112
+
113
+ try {
114
+ const data = await api.getCertificate(body);
115
+ console.log(data);
116
+ } catch (error) {
117
+ console.error(error);
118
+ }
119
+ }
120
+
121
+ // Run the test
122
+ example().catch(console.error);
123
+ ```
124
+
125
+ ### Parameters
126
+
127
+
128
+ | Name | Type | Description | Notes |
129
+ |------------- | ------------- | ------------- | -------------|
130
+ | **certificateId** | `string` | | [Defaults to `undefined`] |
131
+
132
+ ### Return type
133
+
134
+ [**Certificate**](Certificate.md)
135
+
136
+ ### Authorization
137
+
138
+ No authorization required
139
+
140
+ ### HTTP request headers
141
+
142
+ - **Content-Type**: Not defined
143
+ - **Accept**: `application/json`
144
+
145
+
146
+ ### HTTP response details
147
+ | Status code | Description | Response headers |
148
+ |-------------|-------------|------------------|
149
+ | **200** | Certificate | - |
150
+ | **404** | Not found | - |
151
+
152
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
153
+
154
+
155
+ ## getCertificateConfig
156
+
157
+ > CertificateConfig getCertificateConfig(configId)
158
+
159
+ Get a certificate config
160
+
161
+ ### Example
162
+
163
+ ```ts
164
+ import {
165
+ Configuration,
166
+ CertificateApi,
167
+ } from '@easyedu/js-lsm-api';
168
+ import type { GetCertificateConfigRequest } from '@easyedu/js-lsm-api';
169
+
170
+ async function example() {
171
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
172
+ const api = new CertificateApi();
173
+
174
+ const body = {
175
+ // string
176
+ configId: configId_example,
177
+ } satisfies GetCertificateConfigRequest;
178
+
179
+ try {
180
+ const data = await api.getCertificateConfig(body);
181
+ console.log(data);
182
+ } catch (error) {
183
+ console.error(error);
184
+ }
185
+ }
186
+
187
+ // Run the test
188
+ example().catch(console.error);
189
+ ```
190
+
191
+ ### Parameters
192
+
193
+
194
+ | Name | Type | Description | Notes |
195
+ |------------- | ------------- | ------------- | -------------|
196
+ | **configId** | `string` | | [Defaults to `undefined`] |
197
+
198
+ ### Return type
199
+
200
+ [**CertificateConfig**](CertificateConfig.md)
201
+
202
+ ### Authorization
203
+
204
+ No authorization required
205
+
206
+ ### HTTP request headers
207
+
208
+ - **Content-Type**: Not defined
209
+ - **Accept**: `application/json`
210
+
211
+
212
+ ### HTTP response details
213
+ | Status code | Description | Response headers |
214
+ |-------------|-------------|------------------|
215
+ | **200** | Config details | - |
216
+ | **404** | Not found | - |
217
+
218
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
219
+
220
+
221
+ ## getCertificateConfigs
222
+
223
+ > GetCertificateConfigList getCertificateConfigs(courseId, scope)
224
+
225
+ List certificate configs in the current portal
226
+
227
+ ### Example
228
+
229
+ ```ts
230
+ import {
231
+ Configuration,
232
+ CertificateApi,
233
+ } from '@easyedu/js-lsm-api';
234
+ import type { GetCertificateConfigsRequest } from '@easyedu/js-lsm-api';
235
+
236
+ async function example() {
237
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
238
+ const api = new CertificateApi();
239
+
240
+ const body = {
241
+ // string (optional)
242
+ courseId: courseId_example,
243
+ // 'portal' | 'course' (optional)
244
+ scope: scope_example,
245
+ } satisfies GetCertificateConfigsRequest;
246
+
247
+ try {
248
+ const data = await api.getCertificateConfigs(body);
249
+ console.log(data);
250
+ } catch (error) {
251
+ console.error(error);
252
+ }
253
+ }
254
+
255
+ // Run the test
256
+ example().catch(console.error);
257
+ ```
258
+
259
+ ### Parameters
260
+
261
+
262
+ | Name | Type | Description | Notes |
263
+ |------------- | ------------- | ------------- | -------------|
264
+ | **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
265
+ | **scope** | `portal`, `course` | | [Optional] [Defaults to `undefined`] [Enum: portal, course] |
266
+
267
+ ### Return type
268
+
269
+ [**GetCertificateConfigList**](GetCertificateConfigList.md)
270
+
271
+ ### Authorization
272
+
273
+ No authorization required
274
+
275
+ ### HTTP request headers
276
+
277
+ - **Content-Type**: Not defined
278
+ - **Accept**: `application/json`
279
+
280
+
281
+ ### HTTP response details
282
+ | Status code | Description | Response headers |
283
+ |-------------|-------------|------------------|
284
+ | **200** | List of configs | - |
285
+ | **401** | Unauthorized | - |
286
+ | **403** | Forbidden | - |
287
+
288
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
289
+
290
+
291
+ ## getCertificatePdf
292
+
293
+ > Blob getCertificatePdf(certificateId)
294
+
295
+ Download certificate as PDF
296
+
297
+ ### Example
298
+
299
+ ```ts
300
+ import {
301
+ Configuration,
302
+ CertificateApi,
303
+ } from '@easyedu/js-lsm-api';
304
+ import type { GetCertificatePdfRequest } from '@easyedu/js-lsm-api';
305
+
306
+ async function example() {
307
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
308
+ const api = new CertificateApi();
309
+
310
+ const body = {
311
+ // string
312
+ certificateId: certificateId_example,
313
+ } satisfies GetCertificatePdfRequest;
314
+
315
+ try {
316
+ const data = await api.getCertificatePdf(body);
317
+ console.log(data);
318
+ } catch (error) {
319
+ console.error(error);
320
+ }
321
+ }
322
+
323
+ // Run the test
324
+ example().catch(console.error);
325
+ ```
326
+
327
+ ### Parameters
328
+
329
+
330
+ | Name | Type | Description | Notes |
331
+ |------------- | ------------- | ------------- | -------------|
332
+ | **certificateId** | `string` | | [Defaults to `undefined`] |
333
+
334
+ ### Return type
335
+
336
+ **Blob**
337
+
338
+ ### Authorization
339
+
340
+ No authorization required
341
+
342
+ ### HTTP request headers
343
+
344
+ - **Content-Type**: Not defined
345
+ - **Accept**: `application/pdf`
346
+
347
+
348
+ ### HTTP response details
349
+ | Status code | Description | Response headers |
350
+ |-------------|-------------|------------------|
351
+ | **200** | PDF file | - |
352
+ | **404** | Not found | - |
353
+
354
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
355
+
356
+
357
+ ## getCertificates
358
+
359
+ > GetCertificateList getCertificates(userId, courseId, status, issuedAfter, issuedBefore, expiresAfter, expiresBefore, expiringWithinDays)
360
+
361
+ List certificates in the current portal
362
+
363
+ ### Example
364
+
365
+ ```ts
366
+ import {
367
+ Configuration,
368
+ CertificateApi,
369
+ } from '@easyedu/js-lsm-api';
370
+ import type { GetCertificatesRequest } from '@easyedu/js-lsm-api';
371
+
372
+ async function example() {
373
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
374
+ const api = new CertificateApi();
375
+
376
+ const body = {
377
+ // string (optional)
378
+ userId: userId_example,
379
+ // string (optional)
380
+ courseId: courseId_example,
381
+ // 'active' | 'revoked' (optional)
382
+ status: status_example,
383
+ // number (optional)
384
+ issuedAfter: 789,
385
+ // number (optional)
386
+ issuedBefore: 789,
387
+ // number (optional)
388
+ expiresAfter: 789,
389
+ // number (optional)
390
+ expiresBefore: 789,
391
+ // number (optional)
392
+ expiringWithinDays: 56,
393
+ } satisfies GetCertificatesRequest;
394
+
395
+ try {
396
+ const data = await api.getCertificates(body);
397
+ console.log(data);
398
+ } catch (error) {
399
+ console.error(error);
400
+ }
401
+ }
402
+
403
+ // Run the test
404
+ example().catch(console.error);
405
+ ```
406
+
407
+ ### Parameters
408
+
409
+
410
+ | Name | Type | Description | Notes |
411
+ |------------- | ------------- | ------------- | -------------|
412
+ | **userId** | `string` | | [Optional] [Defaults to `undefined`] |
413
+ | **courseId** | `string` | | [Optional] [Defaults to `undefined`] |
414
+ | **status** | `active`, `revoked` | | [Optional] [Defaults to `undefined`] [Enum: active, revoked] |
415
+ | **issuedAfter** | `number` | | [Optional] [Defaults to `undefined`] |
416
+ | **issuedBefore** | `number` | | [Optional] [Defaults to `undefined`] |
417
+ | **expiresAfter** | `number` | | [Optional] [Defaults to `undefined`] |
418
+ | **expiresBefore** | `number` | | [Optional] [Defaults to `undefined`] |
419
+ | **expiringWithinDays** | `number` | | [Optional] [Defaults to `undefined`] |
420
+
421
+ ### Return type
422
+
423
+ [**GetCertificateList**](GetCertificateList.md)
424
+
425
+ ### Authorization
426
+
427
+ No authorization required
428
+
429
+ ### HTTP request headers
430
+
431
+ - **Content-Type**: Not defined
432
+ - **Accept**: `application/json`
433
+
434
+
435
+ ### HTTP response details
436
+ | Status code | Description | Response headers |
437
+ |-------------|-------------|------------------|
438
+ | **200** | List of certificates | - |
439
+
440
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
441
+
442
+
443
+ ## getCurrentUserCertificates
444
+
445
+ > GetCertificateList getCurrentUserCertificates()
446
+
447
+ List the authenticated user\'s own certificates
448
+
449
+ ### Example
450
+
451
+ ```ts
452
+ import {
453
+ Configuration,
454
+ CertificateApi,
455
+ } from '@easyedu/js-lsm-api';
456
+ import type { GetCurrentUserCertificatesRequest } from '@easyedu/js-lsm-api';
457
+
458
+ async function example() {
459
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
460
+ const api = new CertificateApi();
461
+
462
+ try {
463
+ const data = await api.getCurrentUserCertificates();
464
+ console.log(data);
465
+ } catch (error) {
466
+ console.error(error);
467
+ }
468
+ }
469
+
470
+ // Run the test
471
+ example().catch(console.error);
472
+ ```
473
+
474
+ ### Parameters
475
+
476
+ This endpoint does not need any parameter.
477
+
478
+ ### Return type
479
+
480
+ [**GetCertificateList**](GetCertificateList.md)
481
+
482
+ ### Authorization
483
+
484
+ No authorization required
485
+
486
+ ### HTTP request headers
487
+
488
+ - **Content-Type**: Not defined
489
+ - **Accept**: `application/json`
490
+
491
+
492
+ ### HTTP response details
493
+ | Status code | Description | Response headers |
494
+ |-------------|-------------|------------------|
495
+ | **200** | List of certificates | - |
496
+
497
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
498
+
499
+
500
+ ## getEffectiveCertificateConfig
501
+
502
+ > EffectiveCertificateConfig getEffectiveCertificateConfig(courseId)
503
+
504
+ Resolve effective certificate config for a course
505
+
506
+ ### Example
507
+
508
+ ```ts
509
+ import {
510
+ Configuration,
511
+ CertificateApi,
512
+ } from '@easyedu/js-lsm-api';
513
+ import type { GetEffectiveCertificateConfigRequest } from '@easyedu/js-lsm-api';
514
+
515
+ async function example() {
516
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
517
+ const api = new CertificateApi();
518
+
519
+ const body = {
520
+ // string
521
+ courseId: courseId_example,
522
+ } satisfies GetEffectiveCertificateConfigRequest;
523
+
524
+ try {
525
+ const data = await api.getEffectiveCertificateConfig(body);
526
+ console.log(data);
527
+ } catch (error) {
528
+ console.error(error);
529
+ }
530
+ }
531
+
532
+ // Run the test
533
+ example().catch(console.error);
534
+ ```
535
+
536
+ ### Parameters
537
+
538
+
539
+ | Name | Type | Description | Notes |
540
+ |------------- | ------------- | ------------- | -------------|
541
+ | **courseId** | `string` | | [Defaults to `undefined`] |
542
+
543
+ ### Return type
544
+
545
+ [**EffectiveCertificateConfig**](EffectiveCertificateConfig.md)
546
+
547
+ ### Authorization
548
+
549
+ No authorization required
550
+
551
+ ### HTTP request headers
552
+
553
+ - **Content-Type**: Not defined
554
+ - **Accept**: `application/json`
555
+
556
+
557
+ ### HTTP response details
558
+ | Status code | Description | Response headers |
559
+ |-------------|-------------|------------------|
560
+ | **200** | Effective config | - |
561
+ | **404** | Course not found | - |
562
+
563
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
564
+
565
+
566
+ ## postCertificateConfig
567
+
568
+ > CertificateConfig postCertificateConfig(postCertificateConfig)
569
+
570
+ Create a certificate config
571
+
572
+ ### Example
573
+
574
+ ```ts
575
+ import {
576
+ Configuration,
577
+ CertificateApi,
578
+ } from '@easyedu/js-lsm-api';
579
+ import type { PostCertificateConfigRequest } from '@easyedu/js-lsm-api';
580
+
581
+ async function example() {
582
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
583
+ const api = new CertificateApi();
584
+
585
+ const body = {
586
+ // PostCertificateConfig
587
+ postCertificateConfig: ...,
588
+ } satisfies PostCertificateConfigRequest;
589
+
590
+ try {
591
+ const data = await api.postCertificateConfig(body);
592
+ console.log(data);
593
+ } catch (error) {
594
+ console.error(error);
595
+ }
596
+ }
597
+
598
+ // Run the test
599
+ example().catch(console.error);
600
+ ```
601
+
602
+ ### Parameters
603
+
604
+
605
+ | Name | Type | Description | Notes |
606
+ |------------- | ------------- | ------------- | -------------|
607
+ | **postCertificateConfig** | [PostCertificateConfig](PostCertificateConfig.md) | | |
608
+
609
+ ### Return type
610
+
611
+ [**CertificateConfig**](CertificateConfig.md)
612
+
613
+ ### Authorization
614
+
615
+ No authorization required
616
+
617
+ ### HTTP request headers
618
+
619
+ - **Content-Type**: `application/json`
620
+ - **Accept**: `application/json`
621
+
622
+
623
+ ### HTTP response details
624
+ | Status code | Description | Response headers |
625
+ |-------------|-------------|------------------|
626
+ | **201** | Config created | - |
627
+ | **409** | Config already exists for this scope | - |
628
+
629
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
630
+
631
+
632
+ ## postCourseCertificate
633
+
634
+ > Certificate postCourseCertificate(courseId, postCertificate)
635
+
636
+ Manually issue a certificate for a course
637
+
638
+ ### Example
639
+
640
+ ```ts
641
+ import {
642
+ Configuration,
643
+ CertificateApi,
644
+ } from '@easyedu/js-lsm-api';
645
+ import type { PostCourseCertificateRequest } from '@easyedu/js-lsm-api';
646
+
647
+ async function example() {
648
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
649
+ const api = new CertificateApi();
650
+
651
+ const body = {
652
+ // string
653
+ courseId: courseId_example,
654
+ // PostCertificate
655
+ postCertificate: ...,
656
+ } satisfies PostCourseCertificateRequest;
657
+
658
+ try {
659
+ const data = await api.postCourseCertificate(body);
660
+ console.log(data);
661
+ } catch (error) {
662
+ console.error(error);
663
+ }
664
+ }
665
+
666
+ // Run the test
667
+ example().catch(console.error);
668
+ ```
669
+
670
+ ### Parameters
671
+
672
+
673
+ | Name | Type | Description | Notes |
674
+ |------------- | ------------- | ------------- | -------------|
675
+ | **courseId** | `string` | | [Defaults to `undefined`] |
676
+ | **postCertificate** | [PostCertificate](PostCertificate.md) | | |
677
+
678
+ ### Return type
679
+
680
+ [**Certificate**](Certificate.md)
681
+
682
+ ### Authorization
683
+
684
+ No authorization required
685
+
686
+ ### HTTP request headers
687
+
688
+ - **Content-Type**: `application/json`
689
+ - **Accept**: `application/json`
690
+
691
+
692
+ ### HTTP response details
693
+ | Status code | Description | Response headers |
694
+ |-------------|-------------|------------------|
695
+ | **201** | Certificate issued | - |
696
+ | **409** | Active certificate already exists for this user and course | - |
697
+
698
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
699
+
700
+
701
+ ## postRevokeCertificate
702
+
703
+ > Certificate postRevokeCertificate(certificateId, postRevokeCertificate)
704
+
705
+ Revoke a certificate
706
+
707
+ ### Example
708
+
709
+ ```ts
710
+ import {
711
+ Configuration,
712
+ CertificateApi,
713
+ } from '@easyedu/js-lsm-api';
714
+ import type { PostRevokeCertificateRequest } from '@easyedu/js-lsm-api';
715
+
716
+ async function example() {
717
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
718
+ const api = new CertificateApi();
719
+
720
+ const body = {
721
+ // string
722
+ certificateId: certificateId_example,
723
+ // PostRevokeCertificate
724
+ postRevokeCertificate: ...,
725
+ } satisfies PostRevokeCertificateRequest;
726
+
727
+ try {
728
+ const data = await api.postRevokeCertificate(body);
729
+ console.log(data);
730
+ } catch (error) {
731
+ console.error(error);
732
+ }
733
+ }
734
+
735
+ // Run the test
736
+ example().catch(console.error);
737
+ ```
738
+
739
+ ### Parameters
740
+
741
+
742
+ | Name | Type | Description | Notes |
743
+ |------------- | ------------- | ------------- | -------------|
744
+ | **certificateId** | `string` | | [Defaults to `undefined`] |
745
+ | **postRevokeCertificate** | [PostRevokeCertificate](PostRevokeCertificate.md) | | |
746
+
747
+ ### Return type
748
+
749
+ [**Certificate**](Certificate.md)
750
+
751
+ ### Authorization
752
+
753
+ No authorization required
754
+
755
+ ### HTTP request headers
756
+
757
+ - **Content-Type**: `application/json`
758
+ - **Accept**: `application/json`
759
+
760
+
761
+ ### HTTP response details
762
+ | Status code | Description | Response headers |
763
+ |-------------|-------------|------------------|
764
+ | **200** | Revoked | - |
765
+ | **404** | Not found | - |
766
+
767
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
768
+
769
+
770
+ ## putCertificateConfig
771
+
772
+ > CertificateConfig putCertificateConfig(configId, putCertificateConfig)
773
+
774
+ Update a certificate config
775
+
776
+ ### Example
777
+
778
+ ```ts
779
+ import {
780
+ Configuration,
781
+ CertificateApi,
782
+ } from '@easyedu/js-lsm-api';
783
+ import type { PutCertificateConfigRequest } from '@easyedu/js-lsm-api';
784
+
785
+ async function example() {
786
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
787
+ const api = new CertificateApi();
788
+
789
+ const body = {
790
+ // string
791
+ configId: configId_example,
792
+ // PutCertificateConfig
793
+ putCertificateConfig: ...,
794
+ } satisfies PutCertificateConfigRequest;
795
+
796
+ try {
797
+ const data = await api.putCertificateConfig(body);
798
+ console.log(data);
799
+ } catch (error) {
800
+ console.error(error);
801
+ }
802
+ }
803
+
804
+ // Run the test
805
+ example().catch(console.error);
806
+ ```
807
+
808
+ ### Parameters
809
+
810
+
811
+ | Name | Type | Description | Notes |
812
+ |------------- | ------------- | ------------- | -------------|
813
+ | **configId** | `string` | | [Defaults to `undefined`] |
814
+ | **putCertificateConfig** | [PutCertificateConfig](PutCertificateConfig.md) | | |
815
+
816
+ ### Return type
817
+
818
+ [**CertificateConfig**](CertificateConfig.md)
819
+
820
+ ### Authorization
821
+
822
+ No authorization required
823
+
824
+ ### HTTP request headers
825
+
826
+ - **Content-Type**: `application/json`
827
+ - **Accept**: `application/json`
828
+
829
+
830
+ ### HTTP response details
831
+ | Status code | Description | Response headers |
832
+ |-------------|-------------|------------------|
833
+ | **200** | Updated | - |
834
+ | **404** | Not found | - |
835
+
836
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
837
+
838
+
839
+ ## verifyCertificate
840
+
841
+ > CertificatePublic verifyCertificate(certificateId)
842
+
843
+ Public certificate verification (no auth)
844
+
845
+ ### Example
846
+
847
+ ```ts
848
+ import {
849
+ Configuration,
850
+ CertificateApi,
851
+ } from '@easyedu/js-lsm-api';
852
+ import type { VerifyCertificateRequest } from '@easyedu/js-lsm-api';
853
+
854
+ async function example() {
855
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
856
+ const api = new CertificateApi();
857
+
858
+ const body = {
859
+ // string
860
+ certificateId: certificateId_example,
861
+ } satisfies VerifyCertificateRequest;
862
+
863
+ try {
864
+ const data = await api.verifyCertificate(body);
865
+ console.log(data);
866
+ } catch (error) {
867
+ console.error(error);
868
+ }
869
+ }
870
+
871
+ // Run the test
872
+ example().catch(console.error);
873
+ ```
874
+
875
+ ### Parameters
876
+
877
+
878
+ | Name | Type | Description | Notes |
879
+ |------------- | ------------- | ------------- | -------------|
880
+ | **certificateId** | `string` | | [Defaults to `undefined`] |
881
+
882
+ ### Return type
883
+
884
+ [**CertificatePublic**](CertificatePublic.md)
885
+
886
+ ### Authorization
887
+
888
+ No authorization required
889
+
890
+ ### HTTP request headers
891
+
892
+ - **Content-Type**: Not defined
893
+ - **Accept**: `application/json`
894
+
895
+
896
+ ### HTTP response details
897
+ | Status code | Description | Response headers |
898
+ |-------------|-------------|------------------|
899
+ | **200** | Public certificate details | - |
900
+ | **404** | 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
+