academe-kit 0.9.0 → 0.9.1
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/dist/index.cjs +24 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +668 -114
- package/dist/index.esm.js +24 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/types/services/CertificateService.d.ts +95 -83
- package/dist/types/services/userService.d.ts +2 -0
- package/dist/types/types/academe-api.d.ts +556 -16
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5539,15 +5539,6 @@ function createQuizService(apiClient) {
|
|
|
5539
5539
|
|
|
5540
5540
|
function createCertificateService(apiClient) {
|
|
5541
5541
|
return {
|
|
5542
|
-
/**
|
|
5543
|
-
* List all certificates
|
|
5544
|
-
*/
|
|
5545
|
-
getMe() {
|
|
5546
|
-
return apiClient.GET("/certificates/me");
|
|
5547
|
-
},
|
|
5548
|
-
getAll() {
|
|
5549
|
-
return apiClient.GET("/certificates");
|
|
5550
|
-
},
|
|
5551
5542
|
/**
|
|
5552
5543
|
* Get current user's certificates
|
|
5553
5544
|
*/
|
|
@@ -5556,6 +5547,14 @@ function createCertificateService(apiClient) {
|
|
|
5556
5547
|
params: { query },
|
|
5557
5548
|
});
|
|
5558
5549
|
},
|
|
5550
|
+
/**
|
|
5551
|
+
* List all certificates
|
|
5552
|
+
*/
|
|
5553
|
+
getAll(query) {
|
|
5554
|
+
return apiClient.GET("/certificates", {
|
|
5555
|
+
params: { query },
|
|
5556
|
+
});
|
|
5557
|
+
},
|
|
5559
5558
|
/**
|
|
5560
5559
|
* Get certificate by ID
|
|
5561
5560
|
*/
|
|
@@ -5564,6 +5563,14 @@ function createCertificateService(apiClient) {
|
|
|
5564
5563
|
params: { path: { id } },
|
|
5565
5564
|
});
|
|
5566
5565
|
},
|
|
5566
|
+
/**
|
|
5567
|
+
* Download certificate PDF
|
|
5568
|
+
*/
|
|
5569
|
+
download(id) {
|
|
5570
|
+
return apiClient.GET("/certificates/{id}/download", {
|
|
5571
|
+
params: { path: { id } },
|
|
5572
|
+
});
|
|
5573
|
+
},
|
|
5567
5574
|
/**
|
|
5568
5575
|
* Create a new certificate
|
|
5569
5576
|
*/
|
|
@@ -5572,6 +5579,14 @@ function createCertificateService(apiClient) {
|
|
|
5572
5579
|
body: data,
|
|
5573
5580
|
});
|
|
5574
5581
|
},
|
|
5582
|
+
/**
|
|
5583
|
+
* Generate a certificate PDF server-side
|
|
5584
|
+
*/
|
|
5585
|
+
generate(data) {
|
|
5586
|
+
return apiClient.POST("/certificates/generate", {
|
|
5587
|
+
body: data,
|
|
5588
|
+
});
|
|
5589
|
+
},
|
|
5575
5590
|
/**
|
|
5576
5591
|
* Update certificate
|
|
5577
5592
|
*/
|