@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,583 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CertificateFromJSON, CertificateConfigFromJSON, CertificatePublicFromJSON, EffectiveCertificateConfigFromJSON, GetCertificateConfigListFromJSON, GetCertificateListFromJSON, PostCertificateToJSON, PostCertificateConfigToJSON, PostRevokeCertificateToJSON, PutCertificateConfigToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class CertificateApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for deleteCertificateConfig without sending the request
31
+ */
32
+ deleteCertificateConfigRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['configId'] == null) {
35
+ throw new runtime.RequiredError('configId', 'Required parameter "configId" was null or undefined when calling deleteCertificateConfig().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ let urlPath = `/certificate-configs/{configId}`;
40
+ urlPath = urlPath.replace(`{${"configId"}}`, encodeURIComponent(String(requestParameters['configId'])));
41
+ return {
42
+ path: urlPath,
43
+ method: 'DELETE',
44
+ headers: headerParameters,
45
+ query: queryParameters,
46
+ };
47
+ });
48
+ }
49
+ /**
50
+ * Delete a certificate config
51
+ */
52
+ deleteCertificateConfigRaw(requestParameters, initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const requestOptions = yield this.deleteCertificateConfigRequestOpts(requestParameters);
55
+ const response = yield this.request(requestOptions, initOverrides);
56
+ return new runtime.VoidApiResponse(response);
57
+ });
58
+ }
59
+ /**
60
+ * Delete a certificate config
61
+ */
62
+ deleteCertificateConfig(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ yield this.deleteCertificateConfigRaw(requestParameters, initOverrides);
65
+ });
66
+ }
67
+ /**
68
+ * Creates request options for getCertificate without sending the request
69
+ */
70
+ getCertificateRequestOpts(requestParameters) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters['certificateId'] == null) {
73
+ throw new runtime.RequiredError('certificateId', 'Required parameter "certificateId" was null or undefined when calling getCertificate().');
74
+ }
75
+ const queryParameters = {};
76
+ const headerParameters = {};
77
+ let urlPath = `/certificates/{certificateId}`;
78
+ urlPath = urlPath.replace(`{${"certificateId"}}`, encodeURIComponent(String(requestParameters['certificateId'])));
79
+ return {
80
+ path: urlPath,
81
+ method: 'GET',
82
+ headers: headerParameters,
83
+ query: queryParameters,
84
+ };
85
+ });
86
+ }
87
+ /**
88
+ * Get a single certificate
89
+ */
90
+ getCertificateRaw(requestParameters, initOverrides) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const requestOptions = yield this.getCertificateRequestOpts(requestParameters);
93
+ const response = yield this.request(requestOptions, initOverrides);
94
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateFromJSON(jsonValue));
95
+ });
96
+ }
97
+ /**
98
+ * Get a single certificate
99
+ */
100
+ getCertificate(requestParameters, initOverrides) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const response = yield this.getCertificateRaw(requestParameters, initOverrides);
103
+ return yield response.value();
104
+ });
105
+ }
106
+ /**
107
+ * Creates request options for getCertificateConfig without sending the request
108
+ */
109
+ getCertificateConfigRequestOpts(requestParameters) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ if (requestParameters['configId'] == null) {
112
+ throw new runtime.RequiredError('configId', 'Required parameter "configId" was null or undefined when calling getCertificateConfig().');
113
+ }
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ let urlPath = `/certificate-configs/{configId}`;
117
+ urlPath = urlPath.replace(`{${"configId"}}`, encodeURIComponent(String(requestParameters['configId'])));
118
+ return {
119
+ path: urlPath,
120
+ method: 'GET',
121
+ headers: headerParameters,
122
+ query: queryParameters,
123
+ };
124
+ });
125
+ }
126
+ /**
127
+ * Get a certificate config
128
+ */
129
+ getCertificateConfigRaw(requestParameters, initOverrides) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ const requestOptions = yield this.getCertificateConfigRequestOpts(requestParameters);
132
+ const response = yield this.request(requestOptions, initOverrides);
133
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateConfigFromJSON(jsonValue));
134
+ });
135
+ }
136
+ /**
137
+ * Get a certificate config
138
+ */
139
+ getCertificateConfig(requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ const response = yield this.getCertificateConfigRaw(requestParameters, initOverrides);
142
+ return yield response.value();
143
+ });
144
+ }
145
+ /**
146
+ * Creates request options for getCertificateConfigs without sending the request
147
+ */
148
+ getCertificateConfigsRequestOpts(requestParameters) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const queryParameters = {};
151
+ if (requestParameters['courseId'] != null) {
152
+ queryParameters['course_id'] = requestParameters['courseId'];
153
+ }
154
+ if (requestParameters['scope'] != null) {
155
+ queryParameters['scope'] = requestParameters['scope'];
156
+ }
157
+ const headerParameters = {};
158
+ let urlPath = `/certificate-configs`;
159
+ return {
160
+ path: urlPath,
161
+ method: 'GET',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ };
165
+ });
166
+ }
167
+ /**
168
+ * List certificate configs in the current portal
169
+ */
170
+ getCertificateConfigsRaw(requestParameters, initOverrides) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ const requestOptions = yield this.getCertificateConfigsRequestOpts(requestParameters);
173
+ const response = yield this.request(requestOptions, initOverrides);
174
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCertificateConfigListFromJSON(jsonValue));
175
+ });
176
+ }
177
+ /**
178
+ * List certificate configs in the current portal
179
+ */
180
+ getCertificateConfigs() {
181
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
182
+ const response = yield this.getCertificateConfigsRaw(requestParameters, initOverrides);
183
+ return yield response.value();
184
+ });
185
+ }
186
+ /**
187
+ * Creates request options for getCertificatePdf without sending the request
188
+ */
189
+ getCertificatePdfRequestOpts(requestParameters) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ if (requestParameters['certificateId'] == null) {
192
+ throw new runtime.RequiredError('certificateId', 'Required parameter "certificateId" was null or undefined when calling getCertificatePdf().');
193
+ }
194
+ const queryParameters = {};
195
+ const headerParameters = {};
196
+ let urlPath = `/certificates/{certificateId}/pdf`;
197
+ urlPath = urlPath.replace(`{${"certificateId"}}`, encodeURIComponent(String(requestParameters['certificateId'])));
198
+ return {
199
+ path: urlPath,
200
+ method: 'GET',
201
+ headers: headerParameters,
202
+ query: queryParameters,
203
+ };
204
+ });
205
+ }
206
+ /**
207
+ * Download certificate as PDF
208
+ */
209
+ getCertificatePdfRaw(requestParameters, initOverrides) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ const requestOptions = yield this.getCertificatePdfRequestOpts(requestParameters);
212
+ const response = yield this.request(requestOptions, initOverrides);
213
+ return new runtime.BlobApiResponse(response);
214
+ });
215
+ }
216
+ /**
217
+ * Download certificate as PDF
218
+ */
219
+ getCertificatePdf(requestParameters, initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const response = yield this.getCertificatePdfRaw(requestParameters, initOverrides);
222
+ return yield response.value();
223
+ });
224
+ }
225
+ /**
226
+ * Creates request options for getCertificates without sending the request
227
+ */
228
+ getCertificatesRequestOpts(requestParameters) {
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ const queryParameters = {};
231
+ if (requestParameters['userId'] != null) {
232
+ queryParameters['user_id'] = requestParameters['userId'];
233
+ }
234
+ if (requestParameters['courseId'] != null) {
235
+ queryParameters['course_id'] = requestParameters['courseId'];
236
+ }
237
+ if (requestParameters['status'] != null) {
238
+ queryParameters['status'] = requestParameters['status'];
239
+ }
240
+ if (requestParameters['issuedAfter'] != null) {
241
+ queryParameters['issued_after'] = requestParameters['issuedAfter'];
242
+ }
243
+ if (requestParameters['issuedBefore'] != null) {
244
+ queryParameters['issued_before'] = requestParameters['issuedBefore'];
245
+ }
246
+ if (requestParameters['expiresAfter'] != null) {
247
+ queryParameters['expires_after'] = requestParameters['expiresAfter'];
248
+ }
249
+ if (requestParameters['expiresBefore'] != null) {
250
+ queryParameters['expires_before'] = requestParameters['expiresBefore'];
251
+ }
252
+ if (requestParameters['expiringWithinDays'] != null) {
253
+ queryParameters['expiring_within_days'] = requestParameters['expiringWithinDays'];
254
+ }
255
+ const headerParameters = {};
256
+ let urlPath = `/certificates`;
257
+ return {
258
+ path: urlPath,
259
+ method: 'GET',
260
+ headers: headerParameters,
261
+ query: queryParameters,
262
+ };
263
+ });
264
+ }
265
+ /**
266
+ * List certificates in the current portal
267
+ */
268
+ getCertificatesRaw(requestParameters, initOverrides) {
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ const requestOptions = yield this.getCertificatesRequestOpts(requestParameters);
271
+ const response = yield this.request(requestOptions, initOverrides);
272
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCertificateListFromJSON(jsonValue));
273
+ });
274
+ }
275
+ /**
276
+ * List certificates in the current portal
277
+ */
278
+ getCertificates() {
279
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
280
+ const response = yield this.getCertificatesRaw(requestParameters, initOverrides);
281
+ return yield response.value();
282
+ });
283
+ }
284
+ /**
285
+ * Creates request options for getCurrentUserCertificates without sending the request
286
+ */
287
+ getCurrentUserCertificatesRequestOpts() {
288
+ return __awaiter(this, void 0, void 0, function* () {
289
+ const queryParameters = {};
290
+ const headerParameters = {};
291
+ let urlPath = `/certificates/current`;
292
+ return {
293
+ path: urlPath,
294
+ method: 'GET',
295
+ headers: headerParameters,
296
+ query: queryParameters,
297
+ };
298
+ });
299
+ }
300
+ /**
301
+ * List the authenticated user\'s own certificates
302
+ */
303
+ getCurrentUserCertificatesRaw(initOverrides) {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ const requestOptions = yield this.getCurrentUserCertificatesRequestOpts();
306
+ const response = yield this.request(requestOptions, initOverrides);
307
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCertificateListFromJSON(jsonValue));
308
+ });
309
+ }
310
+ /**
311
+ * List the authenticated user\'s own certificates
312
+ */
313
+ getCurrentUserCertificates(initOverrides) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ const response = yield this.getCurrentUserCertificatesRaw(initOverrides);
316
+ return yield response.value();
317
+ });
318
+ }
319
+ /**
320
+ * Creates request options for getEffectiveCertificateConfig without sending the request
321
+ */
322
+ getEffectiveCertificateConfigRequestOpts(requestParameters) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ if (requestParameters['courseId'] == null) {
325
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getEffectiveCertificateConfig().');
326
+ }
327
+ const queryParameters = {};
328
+ const headerParameters = {};
329
+ let urlPath = `/courses/{courseId}/certificate-config/effective`;
330
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
331
+ return {
332
+ path: urlPath,
333
+ method: 'GET',
334
+ headers: headerParameters,
335
+ query: queryParameters,
336
+ };
337
+ });
338
+ }
339
+ /**
340
+ * Resolve effective certificate config for a course
341
+ */
342
+ getEffectiveCertificateConfigRaw(requestParameters, initOverrides) {
343
+ return __awaiter(this, void 0, void 0, function* () {
344
+ const requestOptions = yield this.getEffectiveCertificateConfigRequestOpts(requestParameters);
345
+ const response = yield this.request(requestOptions, initOverrides);
346
+ return new runtime.JSONApiResponse(response, (jsonValue) => EffectiveCertificateConfigFromJSON(jsonValue));
347
+ });
348
+ }
349
+ /**
350
+ * Resolve effective certificate config for a course
351
+ */
352
+ getEffectiveCertificateConfig(requestParameters, initOverrides) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ const response = yield this.getEffectiveCertificateConfigRaw(requestParameters, initOverrides);
355
+ return yield response.value();
356
+ });
357
+ }
358
+ /**
359
+ * Creates request options for postCertificateConfig without sending the request
360
+ */
361
+ postCertificateConfigRequestOpts(requestParameters) {
362
+ return __awaiter(this, void 0, void 0, function* () {
363
+ if (requestParameters['postCertificateConfig'] == null) {
364
+ throw new runtime.RequiredError('postCertificateConfig', 'Required parameter "postCertificateConfig" was null or undefined when calling postCertificateConfig().');
365
+ }
366
+ const queryParameters = {};
367
+ const headerParameters = {};
368
+ headerParameters['Content-Type'] = 'application/json';
369
+ let urlPath = `/certificate-configs`;
370
+ return {
371
+ path: urlPath,
372
+ method: 'POST',
373
+ headers: headerParameters,
374
+ query: queryParameters,
375
+ body: PostCertificateConfigToJSON(requestParameters['postCertificateConfig']),
376
+ };
377
+ });
378
+ }
379
+ /**
380
+ * Create a certificate config
381
+ */
382
+ postCertificateConfigRaw(requestParameters, initOverrides) {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ const requestOptions = yield this.postCertificateConfigRequestOpts(requestParameters);
385
+ const response = yield this.request(requestOptions, initOverrides);
386
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateConfigFromJSON(jsonValue));
387
+ });
388
+ }
389
+ /**
390
+ * Create a certificate config
391
+ */
392
+ postCertificateConfig(requestParameters, initOverrides) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ const response = yield this.postCertificateConfigRaw(requestParameters, initOverrides);
395
+ return yield response.value();
396
+ });
397
+ }
398
+ /**
399
+ * Creates request options for postCourseCertificate without sending the request
400
+ */
401
+ postCourseCertificateRequestOpts(requestParameters) {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ if (requestParameters['courseId'] == null) {
404
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseCertificate().');
405
+ }
406
+ if (requestParameters['postCertificate'] == null) {
407
+ throw new runtime.RequiredError('postCertificate', 'Required parameter "postCertificate" was null or undefined when calling postCourseCertificate().');
408
+ }
409
+ const queryParameters = {};
410
+ const headerParameters = {};
411
+ headerParameters['Content-Type'] = 'application/json';
412
+ let urlPath = `/courses/{courseId}/certificates`;
413
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
414
+ return {
415
+ path: urlPath,
416
+ method: 'POST',
417
+ headers: headerParameters,
418
+ query: queryParameters,
419
+ body: PostCertificateToJSON(requestParameters['postCertificate']),
420
+ };
421
+ });
422
+ }
423
+ /**
424
+ * Manually issue a certificate for a course
425
+ */
426
+ postCourseCertificateRaw(requestParameters, initOverrides) {
427
+ return __awaiter(this, void 0, void 0, function* () {
428
+ const requestOptions = yield this.postCourseCertificateRequestOpts(requestParameters);
429
+ const response = yield this.request(requestOptions, initOverrides);
430
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateFromJSON(jsonValue));
431
+ });
432
+ }
433
+ /**
434
+ * Manually issue a certificate for a course
435
+ */
436
+ postCourseCertificate(requestParameters, initOverrides) {
437
+ return __awaiter(this, void 0, void 0, function* () {
438
+ const response = yield this.postCourseCertificateRaw(requestParameters, initOverrides);
439
+ return yield response.value();
440
+ });
441
+ }
442
+ /**
443
+ * Creates request options for postRevokeCertificate without sending the request
444
+ */
445
+ postRevokeCertificateRequestOpts(requestParameters) {
446
+ return __awaiter(this, void 0, void 0, function* () {
447
+ if (requestParameters['certificateId'] == null) {
448
+ throw new runtime.RequiredError('certificateId', 'Required parameter "certificateId" was null or undefined when calling postRevokeCertificate().');
449
+ }
450
+ if (requestParameters['postRevokeCertificate'] == null) {
451
+ throw new runtime.RequiredError('postRevokeCertificate', 'Required parameter "postRevokeCertificate" was null or undefined when calling postRevokeCertificate().');
452
+ }
453
+ const queryParameters = {};
454
+ const headerParameters = {};
455
+ headerParameters['Content-Type'] = 'application/json';
456
+ let urlPath = `/certificates/{certificateId}/revoke`;
457
+ urlPath = urlPath.replace(`{${"certificateId"}}`, encodeURIComponent(String(requestParameters['certificateId'])));
458
+ return {
459
+ path: urlPath,
460
+ method: 'POST',
461
+ headers: headerParameters,
462
+ query: queryParameters,
463
+ body: PostRevokeCertificateToJSON(requestParameters['postRevokeCertificate']),
464
+ };
465
+ });
466
+ }
467
+ /**
468
+ * Revoke a certificate
469
+ */
470
+ postRevokeCertificateRaw(requestParameters, initOverrides) {
471
+ return __awaiter(this, void 0, void 0, function* () {
472
+ const requestOptions = yield this.postRevokeCertificateRequestOpts(requestParameters);
473
+ const response = yield this.request(requestOptions, initOverrides);
474
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateFromJSON(jsonValue));
475
+ });
476
+ }
477
+ /**
478
+ * Revoke a certificate
479
+ */
480
+ postRevokeCertificate(requestParameters, initOverrides) {
481
+ return __awaiter(this, void 0, void 0, function* () {
482
+ const response = yield this.postRevokeCertificateRaw(requestParameters, initOverrides);
483
+ return yield response.value();
484
+ });
485
+ }
486
+ /**
487
+ * Creates request options for putCertificateConfig without sending the request
488
+ */
489
+ putCertificateConfigRequestOpts(requestParameters) {
490
+ return __awaiter(this, void 0, void 0, function* () {
491
+ if (requestParameters['configId'] == null) {
492
+ throw new runtime.RequiredError('configId', 'Required parameter "configId" was null or undefined when calling putCertificateConfig().');
493
+ }
494
+ if (requestParameters['putCertificateConfig'] == null) {
495
+ throw new runtime.RequiredError('putCertificateConfig', 'Required parameter "putCertificateConfig" was null or undefined when calling putCertificateConfig().');
496
+ }
497
+ const queryParameters = {};
498
+ const headerParameters = {};
499
+ headerParameters['Content-Type'] = 'application/json';
500
+ let urlPath = `/certificate-configs/{configId}`;
501
+ urlPath = urlPath.replace(`{${"configId"}}`, encodeURIComponent(String(requestParameters['configId'])));
502
+ return {
503
+ path: urlPath,
504
+ method: 'PUT',
505
+ headers: headerParameters,
506
+ query: queryParameters,
507
+ body: PutCertificateConfigToJSON(requestParameters['putCertificateConfig']),
508
+ };
509
+ });
510
+ }
511
+ /**
512
+ * Update a certificate config
513
+ */
514
+ putCertificateConfigRaw(requestParameters, initOverrides) {
515
+ return __awaiter(this, void 0, void 0, function* () {
516
+ const requestOptions = yield this.putCertificateConfigRequestOpts(requestParameters);
517
+ const response = yield this.request(requestOptions, initOverrides);
518
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificateConfigFromJSON(jsonValue));
519
+ });
520
+ }
521
+ /**
522
+ * Update a certificate config
523
+ */
524
+ putCertificateConfig(requestParameters, initOverrides) {
525
+ return __awaiter(this, void 0, void 0, function* () {
526
+ const response = yield this.putCertificateConfigRaw(requestParameters, initOverrides);
527
+ return yield response.value();
528
+ });
529
+ }
530
+ /**
531
+ * Creates request options for verifyCertificate without sending the request
532
+ */
533
+ verifyCertificateRequestOpts(requestParameters) {
534
+ return __awaiter(this, void 0, void 0, function* () {
535
+ if (requestParameters['certificateId'] == null) {
536
+ throw new runtime.RequiredError('certificateId', 'Required parameter "certificateId" was null or undefined when calling verifyCertificate().');
537
+ }
538
+ const queryParameters = {};
539
+ const headerParameters = {};
540
+ let urlPath = `/public/certificates/{certificateId}/verify`;
541
+ urlPath = urlPath.replace(`{${"certificateId"}}`, encodeURIComponent(String(requestParameters['certificateId'])));
542
+ return {
543
+ path: urlPath,
544
+ method: 'GET',
545
+ headers: headerParameters,
546
+ query: queryParameters,
547
+ };
548
+ });
549
+ }
550
+ /**
551
+ * Public certificate verification (no auth)
552
+ */
553
+ verifyCertificateRaw(requestParameters, initOverrides) {
554
+ return __awaiter(this, void 0, void 0, function* () {
555
+ const requestOptions = yield this.verifyCertificateRequestOpts(requestParameters);
556
+ const response = yield this.request(requestOptions, initOverrides);
557
+ return new runtime.JSONApiResponse(response, (jsonValue) => CertificatePublicFromJSON(jsonValue));
558
+ });
559
+ }
560
+ /**
561
+ * Public certificate verification (no auth)
562
+ */
563
+ verifyCertificate(requestParameters, initOverrides) {
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ const response = yield this.verifyCertificateRaw(requestParameters, initOverrides);
566
+ return yield response.value();
567
+ });
568
+ }
569
+ }
570
+ /**
571
+ * @export
572
+ */
573
+ export const GetCertificateConfigsScopeEnum = {
574
+ Portal: 'portal',
575
+ Course: 'course'
576
+ };
577
+ /**
578
+ * @export
579
+ */
580
+ export const GetCertificatesStatusEnum = {
581
+ Active: 'active',
582
+ Revoked: 'revoked'
583
+ };
@@ -1,3 +1,4 @@
1
+ export * from './CertificateApi';
1
2
  export * from './ChatApi';
2
3
  export * from './ContentApi';
3
4
  export * from './CourseApi';
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './CertificateApi';
3
4
  export * from './ChatApi';
4
5
  export * from './ContentApi';
5
6
  export * from './CourseApi';