@easyedu/js-lsm-api 1.49.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 (79) 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/PostCertificate.d.ts +50 -0
  24. package/dist/esm/models/PostCertificate.js +49 -0
  25. package/dist/esm/models/PostCertificateConfig.d.ts +62 -0
  26. package/dist/esm/models/PostCertificateConfig.js +53 -0
  27. package/dist/esm/models/PostRevokeCertificate.d.ts +32 -0
  28. package/dist/esm/models/PostRevokeCertificate.js +41 -0
  29. package/dist/esm/models/PutCertificateConfig.d.ts +56 -0
  30. package/dist/esm/models/PutCertificateConfig.js +49 -0
  31. package/dist/esm/models/index.d.ts +10 -0
  32. package/dist/esm/models/index.js +10 -0
  33. package/dist/models/Certificate.d.ts +151 -0
  34. package/dist/models/Certificate.js +122 -0
  35. package/dist/models/CertificateConfig.d.ts +86 -0
  36. package/dist/models/CertificateConfig.js +76 -0
  37. package/dist/models/CertificatePublic.d.ts +98 -0
  38. package/dist/models/CertificatePublic.js +95 -0
  39. package/dist/models/EffectiveCertificateConfig.d.ts +62 -0
  40. package/dist/models/EffectiveCertificateConfig.js +62 -0
  41. package/dist/models/GetCertificateConfigList.d.ts +33 -0
  42. package/dist/models/GetCertificateConfigList.js +51 -0
  43. package/dist/models/GetCertificateList.d.ts +33 -0
  44. package/dist/models/GetCertificateList.js +51 -0
  45. package/dist/models/PostCertificate.d.ts +50 -0
  46. package/dist/models/PostCertificate.js +56 -0
  47. package/dist/models/PostCertificateConfig.d.ts +62 -0
  48. package/dist/models/PostCertificateConfig.js +60 -0
  49. package/dist/models/PostRevokeCertificate.d.ts +32 -0
  50. package/dist/models/PostRevokeCertificate.js +48 -0
  51. package/dist/models/PutCertificateConfig.d.ts +56 -0
  52. package/dist/models/PutCertificateConfig.js +56 -0
  53. package/dist/models/index.d.ts +10 -0
  54. package/dist/models/index.js +10 -0
  55. package/docs/Certificate.md +68 -0
  56. package/docs/CertificateApi.md +903 -0
  57. package/docs/CertificateConfig.md +52 -0
  58. package/docs/CertificatePublic.md +51 -0
  59. package/docs/EffectiveCertificateConfig.md +45 -0
  60. package/docs/GetCertificateConfigList.md +34 -0
  61. package/docs/GetCertificateList.md +34 -0
  62. package/docs/PostCertificate.md +41 -0
  63. package/docs/PostCertificateConfig.md +44 -0
  64. package/docs/PostRevokeCertificate.md +34 -0
  65. package/docs/PutCertificateConfig.md +42 -0
  66. package/package.json +1 -1
  67. package/src/apis/CertificateApi.ts +765 -0
  68. package/src/apis/index.ts +1 -0
  69. package/src/models/Certificate.ts +234 -0
  70. package/src/models/CertificateConfig.ts +142 -0
  71. package/src/models/CertificatePublic.ts +158 -0
  72. package/src/models/EffectiveCertificateConfig.ts +107 -0
  73. package/src/models/GetCertificateConfigList.ts +74 -0
  74. package/src/models/GetCertificateList.ts +74 -0
  75. package/src/models/PostCertificate.ts +90 -0
  76. package/src/models/PostCertificateConfig.ts +106 -0
  77. package/src/models/PostRevokeCertificate.ts +65 -0
  78. package/src/models/PutCertificateConfig.ts +97 -0
  79. package/src/models/index.ts +10 -0
package/src/apis/index.ts CHANGED
@@ -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';
@@ -0,0 +1,234 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface Certificate
20
+ */
21
+ export interface Certificate {
22
+ /**
23
+ * External ID (UUID) of the certificate
24
+ * @type {string}
25
+ * @memberof Certificate
26
+ */
27
+ id: string;
28
+ /**
29
+ * External ID of the portal
30
+ * @type {string}
31
+ * @memberof Certificate
32
+ */
33
+ portalId: string;
34
+ /**
35
+ * External ID of the recipient user
36
+ * @type {string}
37
+ * @memberof Certificate
38
+ */
39
+ userId: string;
40
+ /**
41
+ * External ID of the course
42
+ * @type {string}
43
+ * @memberof Certificate
44
+ */
45
+ courseId: string;
46
+ /**
47
+ * External ID of the enrollment, null for manual issuance
48
+ * @type {string}
49
+ * @memberof Certificate
50
+ */
51
+ enrollmentId?: string | null;
52
+ /**
53
+ * Unix epoch timestamp
54
+ * @type {number}
55
+ * @memberof Certificate
56
+ */
57
+ issuedAt: number;
58
+ /**
59
+ * Unix epoch timestamp, null = never expires
60
+ * @type {number}
61
+ * @memberof Certificate
62
+ */
63
+ expiresAt?: number | null;
64
+ /**
65
+ * External ID of the user who manually issued (null for auto)
66
+ * @type {string}
67
+ * @memberof Certificate
68
+ */
69
+ issuedByUserId?: string | null;
70
+ /**
71
+ *
72
+ * @type {CertificateIssuanceReasonEnum}
73
+ * @memberof Certificate
74
+ */
75
+ issuanceReason: CertificateIssuanceReasonEnum;
76
+ /**
77
+ *
78
+ * @type {CertificateStatusEnum}
79
+ * @memberof Certificate
80
+ */
81
+ status: CertificateStatusEnum;
82
+ /**
83
+ *
84
+ * @type {number}
85
+ * @memberof Certificate
86
+ */
87
+ revokedAt?: number | null;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof Certificate
92
+ */
93
+ revokedByUserId?: string | null;
94
+ /**
95
+ *
96
+ * @type {string}
97
+ * @memberof Certificate
98
+ */
99
+ revocationReason?: string | null;
100
+ /**
101
+ * Snapshotted learner name as of issue time
102
+ * @type {string}
103
+ * @memberof Certificate
104
+ */
105
+ learnerName: string;
106
+ /**
107
+ * Snapshotted course name as of issue time
108
+ * @type {string}
109
+ * @memberof Certificate
110
+ */
111
+ courseName: string;
112
+ /**
113
+ * Snapshotted portal name as of issue time
114
+ * @type {string}
115
+ * @memberof Certificate
116
+ */
117
+ portalName: string;
118
+ /**
119
+ *
120
+ * @type {number}
121
+ * @memberof Certificate
122
+ */
123
+ createdAt: number;
124
+ /**
125
+ *
126
+ * @type {number}
127
+ * @memberof Certificate
128
+ */
129
+ updatedAt: number;
130
+ }
131
+
132
+
133
+ /**
134
+ * @export
135
+ */
136
+ export const CertificateIssuanceReasonEnum = {
137
+ CourseCompletion: 'course_completion',
138
+ QuizPassed: 'quiz_passed',
139
+ Manual: 'manual'
140
+ } as const;
141
+ export type CertificateIssuanceReasonEnum = typeof CertificateIssuanceReasonEnum[keyof typeof CertificateIssuanceReasonEnum];
142
+
143
+ /**
144
+ * @export
145
+ */
146
+ export const CertificateStatusEnum = {
147
+ Active: 'active',
148
+ Revoked: 'revoked'
149
+ } as const;
150
+ export type CertificateStatusEnum = typeof CertificateStatusEnum[keyof typeof CertificateStatusEnum];
151
+
152
+
153
+ /**
154
+ * Check if a given object implements the Certificate interface.
155
+ */
156
+ export function instanceOfCertificate(value: object): value is Certificate {
157
+ if (!('id' in value) || value['id'] === undefined) return false;
158
+ if (!('portalId' in value) || value['portalId'] === undefined) return false;
159
+ if (!('userId' in value) || value['userId'] === undefined) return false;
160
+ if (!('courseId' in value) || value['courseId'] === undefined) return false;
161
+ if (!('issuedAt' in value) || value['issuedAt'] === undefined) return false;
162
+ if (!('issuanceReason' in value) || value['issuanceReason'] === undefined) return false;
163
+ if (!('status' in value) || value['status'] === undefined) return false;
164
+ if (!('learnerName' in value) || value['learnerName'] === undefined) return false;
165
+ if (!('courseName' in value) || value['courseName'] === undefined) return false;
166
+ if (!('portalName' in value) || value['portalName'] === undefined) return false;
167
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
168
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
169
+ return true;
170
+ }
171
+
172
+ export function CertificateFromJSON(json: any): Certificate {
173
+ return CertificateFromJSONTyped(json, false);
174
+ }
175
+
176
+ export function CertificateFromJSONTyped(json: any, ignoreDiscriminator: boolean): Certificate {
177
+ if (json == null) {
178
+ return json;
179
+ }
180
+ return {
181
+
182
+ 'id': json['id'],
183
+ 'portalId': json['portal_id'],
184
+ 'userId': json['user_id'],
185
+ 'courseId': json['course_id'],
186
+ 'enrollmentId': json['enrollment_id'] == null ? undefined : json['enrollment_id'],
187
+ 'issuedAt': json['issued_at'],
188
+ 'expiresAt': json['expires_at'] == null ? undefined : json['expires_at'],
189
+ 'issuedByUserId': json['issued_by_user_id'] == null ? undefined : json['issued_by_user_id'],
190
+ 'issuanceReason': json['issuance_reason'],
191
+ 'status': json['status'],
192
+ 'revokedAt': json['revoked_at'] == null ? undefined : json['revoked_at'],
193
+ 'revokedByUserId': json['revoked_by_user_id'] == null ? undefined : json['revoked_by_user_id'],
194
+ 'revocationReason': json['revocation_reason'] == null ? undefined : json['revocation_reason'],
195
+ 'learnerName': json['learner_name'],
196
+ 'courseName': json['course_name'],
197
+ 'portalName': json['portal_name'],
198
+ 'createdAt': json['created_at'],
199
+ 'updatedAt': json['updated_at'],
200
+ };
201
+ }
202
+
203
+ export function CertificateToJSON(json: any): Certificate {
204
+ return CertificateToJSONTyped(json, false);
205
+ }
206
+
207
+ export function CertificateToJSONTyped(value?: Certificate | null, ignoreDiscriminator: boolean = false): any {
208
+ if (value == null) {
209
+ return value;
210
+ }
211
+
212
+ return {
213
+
214
+ 'id': value['id'],
215
+ 'portal_id': value['portalId'],
216
+ 'user_id': value['userId'],
217
+ 'course_id': value['courseId'],
218
+ 'enrollment_id': value['enrollmentId'],
219
+ 'issued_at': value['issuedAt'],
220
+ 'expires_at': value['expiresAt'],
221
+ 'issued_by_user_id': value['issuedByUserId'],
222
+ 'issuance_reason': value['issuanceReason'],
223
+ 'status': value['status'],
224
+ 'revoked_at': value['revokedAt'],
225
+ 'revoked_by_user_id': value['revokedByUserId'],
226
+ 'revocation_reason': value['revocationReason'],
227
+ 'learner_name': value['learnerName'],
228
+ 'course_name': value['courseName'],
229
+ 'portal_name': value['portalName'],
230
+ 'created_at': value['createdAt'],
231
+ 'updated_at': value['updatedAt'],
232
+ };
233
+ }
234
+
@@ -0,0 +1,142 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CertificateConfig
20
+ */
21
+ export interface CertificateConfig {
22
+ /**
23
+ * External ID (UUID) of the config
24
+ * @type {string}
25
+ * @memberof CertificateConfig
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CertificateConfig
32
+ */
33
+ portalId: string;
34
+ /**
35
+ * null = portal default, set = course override
36
+ * @type {string}
37
+ * @memberof CertificateConfig
38
+ */
39
+ courseId?: string | null;
40
+ /**
41
+ *
42
+ * @type {boolean}
43
+ * @memberof CertificateConfig
44
+ */
45
+ enabled: boolean;
46
+ /**
47
+ * Months from issue date until expiry, null = never expires
48
+ * @type {number}
49
+ * @memberof CertificateConfig
50
+ */
51
+ expiryMonths?: number | null;
52
+ /**
53
+ * At course scope, null inherits the portal default
54
+ * @type {boolean}
55
+ * @memberof CertificateConfig
56
+ */
57
+ requireQuizPass?: boolean | null;
58
+ /**
59
+ * 0-100, only used when require_quiz_pass is true
60
+ * @type {number}
61
+ * @memberof CertificateConfig
62
+ */
63
+ minQuizScore?: number | null;
64
+ /**
65
+ * External ID of the gating quiz config
66
+ * @type {string}
67
+ * @memberof CertificateConfig
68
+ */
69
+ quizConfigId?: string | null;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof CertificateConfig
74
+ */
75
+ createdAt: number;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof CertificateConfig
80
+ */
81
+ updatedAt: number;
82
+ }
83
+
84
+ /**
85
+ * Check if a given object implements the CertificateConfig interface.
86
+ */
87
+ export function instanceOfCertificateConfig(value: object): value is CertificateConfig {
88
+ if (!('id' in value) || value['id'] === undefined) return false;
89
+ if (!('portalId' in value) || value['portalId'] === undefined) return false;
90
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
91
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
92
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
93
+ return true;
94
+ }
95
+
96
+ export function CertificateConfigFromJSON(json: any): CertificateConfig {
97
+ return CertificateConfigFromJSONTyped(json, false);
98
+ }
99
+
100
+ export function CertificateConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateConfig {
101
+ if (json == null) {
102
+ return json;
103
+ }
104
+ return {
105
+
106
+ 'id': json['id'],
107
+ 'portalId': json['portal_id'],
108
+ 'courseId': json['course_id'] == null ? undefined : json['course_id'],
109
+ 'enabled': json['enabled'],
110
+ 'expiryMonths': json['expiry_months'] == null ? undefined : json['expiry_months'],
111
+ 'requireQuizPass': json['require_quiz_pass'] == null ? undefined : json['require_quiz_pass'],
112
+ 'minQuizScore': json['min_quiz_score'] == null ? undefined : json['min_quiz_score'],
113
+ 'quizConfigId': json['quiz_config_id'] == null ? undefined : json['quiz_config_id'],
114
+ 'createdAt': json['created_at'],
115
+ 'updatedAt': json['updated_at'],
116
+ };
117
+ }
118
+
119
+ export function CertificateConfigToJSON(json: any): CertificateConfig {
120
+ return CertificateConfigToJSONTyped(json, false);
121
+ }
122
+
123
+ export function CertificateConfigToJSONTyped(value?: CertificateConfig | null, ignoreDiscriminator: boolean = false): any {
124
+ if (value == null) {
125
+ return value;
126
+ }
127
+
128
+ return {
129
+
130
+ 'id': value['id'],
131
+ 'portal_id': value['portalId'],
132
+ 'course_id': value['courseId'],
133
+ 'enabled': value['enabled'],
134
+ 'expiry_months': value['expiryMonths'],
135
+ 'require_quiz_pass': value['requireQuizPass'],
136
+ 'min_quiz_score': value['minQuizScore'],
137
+ 'quiz_config_id': value['quizConfigId'],
138
+ 'created_at': value['createdAt'],
139
+ 'updated_at': value['updatedAt'],
140
+ };
141
+ }
142
+
@@ -0,0 +1,158 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Public certificate verification view (no internal IDs)
18
+ * @export
19
+ * @interface CertificatePublic
20
+ */
21
+ export interface CertificatePublic {
22
+ /**
23
+ * External ID (UUID) of the certificate
24
+ * @type {string}
25
+ * @memberof CertificatePublic
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {CertificatePublicStatusEnum}
31
+ * @memberof CertificatePublic
32
+ */
33
+ status: CertificatePublicStatusEnum;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CertificatePublic
38
+ */
39
+ learnerName: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof CertificatePublic
44
+ */
45
+ courseName: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof CertificatePublic
50
+ */
51
+ portalName: string;
52
+ /**
53
+ *
54
+ * @type {CertificatePublicIssuanceReasonEnum}
55
+ * @memberof CertificatePublic
56
+ */
57
+ issuanceReason: CertificatePublicIssuanceReasonEnum;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof CertificatePublic
62
+ */
63
+ issuedAt: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof CertificatePublic
68
+ */
69
+ expiresAt?: number | null;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof CertificatePublic
74
+ */
75
+ revokedAt?: number | null;
76
+ }
77
+
78
+
79
+ /**
80
+ * @export
81
+ */
82
+ export const CertificatePublicStatusEnum = {
83
+ Active: 'active',
84
+ Revoked: 'revoked',
85
+ Expired: 'expired'
86
+ } as const;
87
+ export type CertificatePublicStatusEnum = typeof CertificatePublicStatusEnum[keyof typeof CertificatePublicStatusEnum];
88
+
89
+ /**
90
+ * @export
91
+ */
92
+ export const CertificatePublicIssuanceReasonEnum = {
93
+ CourseCompletion: 'course_completion',
94
+ QuizPassed: 'quiz_passed',
95
+ Manual: 'manual'
96
+ } as const;
97
+ export type CertificatePublicIssuanceReasonEnum = typeof CertificatePublicIssuanceReasonEnum[keyof typeof CertificatePublicIssuanceReasonEnum];
98
+
99
+
100
+ /**
101
+ * Check if a given object implements the CertificatePublic interface.
102
+ */
103
+ export function instanceOfCertificatePublic(value: object): value is CertificatePublic {
104
+ if (!('id' in value) || value['id'] === undefined) return false;
105
+ if (!('status' in value) || value['status'] === undefined) return false;
106
+ if (!('learnerName' in value) || value['learnerName'] === undefined) return false;
107
+ if (!('courseName' in value) || value['courseName'] === undefined) return false;
108
+ if (!('portalName' in value) || value['portalName'] === undefined) return false;
109
+ if (!('issuanceReason' in value) || value['issuanceReason'] === undefined) return false;
110
+ if (!('issuedAt' in value) || value['issuedAt'] === undefined) return false;
111
+ return true;
112
+ }
113
+
114
+ export function CertificatePublicFromJSON(json: any): CertificatePublic {
115
+ return CertificatePublicFromJSONTyped(json, false);
116
+ }
117
+
118
+ export function CertificatePublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificatePublic {
119
+ if (json == null) {
120
+ return json;
121
+ }
122
+ return {
123
+
124
+ 'id': json['id'],
125
+ 'status': json['status'],
126
+ 'learnerName': json['learner_name'],
127
+ 'courseName': json['course_name'],
128
+ 'portalName': json['portal_name'],
129
+ 'issuanceReason': json['issuance_reason'],
130
+ 'issuedAt': json['issued_at'],
131
+ 'expiresAt': json['expires_at'] == null ? undefined : json['expires_at'],
132
+ 'revokedAt': json['revoked_at'] == null ? undefined : json['revoked_at'],
133
+ };
134
+ }
135
+
136
+ export function CertificatePublicToJSON(json: any): CertificatePublic {
137
+ return CertificatePublicToJSONTyped(json, false);
138
+ }
139
+
140
+ export function CertificatePublicToJSONTyped(value?: CertificatePublic | null, ignoreDiscriminator: boolean = false): any {
141
+ if (value == null) {
142
+ return value;
143
+ }
144
+
145
+ return {
146
+
147
+ 'id': value['id'],
148
+ 'status': value['status'],
149
+ 'learner_name': value['learnerName'],
150
+ 'course_name': value['courseName'],
151
+ 'portal_name': value['portalName'],
152
+ 'issuance_reason': value['issuanceReason'],
153
+ 'issued_at': value['issuedAt'],
154
+ 'expires_at': value['expiresAt'],
155
+ 'revoked_at': value['revokedAt'],
156
+ };
157
+ }
158
+
@@ -0,0 +1,107 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Resolved effective config for a course (course override merged with portal default)
18
+ * @export
19
+ * @interface EffectiveCertificateConfig
20
+ */
21
+ export interface EffectiveCertificateConfig {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof EffectiveCertificateConfig
26
+ */
27
+ enabled: boolean;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof EffectiveCertificateConfig
32
+ */
33
+ expiryMonths?: number | null;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof EffectiveCertificateConfig
38
+ */
39
+ requireQuizPass: boolean;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof EffectiveCertificateConfig
44
+ */
45
+ minQuizScore?: number | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof EffectiveCertificateConfig
50
+ */
51
+ quizConfigId?: string | null;
52
+ /**
53
+ * External ID of the config that resolved this (course override or portal default)
54
+ * @type {string}
55
+ * @memberof EffectiveCertificateConfig
56
+ */
57
+ sourceConfigId?: string | null;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the EffectiveCertificateConfig interface.
62
+ */
63
+ export function instanceOfEffectiveCertificateConfig(value: object): value is EffectiveCertificateConfig {
64
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
65
+ if (!('requireQuizPass' in value) || value['requireQuizPass'] === undefined) return false;
66
+ return true;
67
+ }
68
+
69
+ export function EffectiveCertificateConfigFromJSON(json: any): EffectiveCertificateConfig {
70
+ return EffectiveCertificateConfigFromJSONTyped(json, false);
71
+ }
72
+
73
+ export function EffectiveCertificateConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): EffectiveCertificateConfig {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+
79
+ 'enabled': json['enabled'],
80
+ 'expiryMonths': json['expiry_months'] == null ? undefined : json['expiry_months'],
81
+ 'requireQuizPass': json['require_quiz_pass'],
82
+ 'minQuizScore': json['min_quiz_score'] == null ? undefined : json['min_quiz_score'],
83
+ 'quizConfigId': json['quiz_config_id'] == null ? undefined : json['quiz_config_id'],
84
+ 'sourceConfigId': json['source_config_id'] == null ? undefined : json['source_config_id'],
85
+ };
86
+ }
87
+
88
+ export function EffectiveCertificateConfigToJSON(json: any): EffectiveCertificateConfig {
89
+ return EffectiveCertificateConfigToJSONTyped(json, false);
90
+ }
91
+
92
+ export function EffectiveCertificateConfigToJSONTyped(value?: EffectiveCertificateConfig | null, ignoreDiscriminator: boolean = false): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+
97
+ return {
98
+
99
+ 'enabled': value['enabled'],
100
+ 'expiry_months': value['expiryMonths'],
101
+ 'require_quiz_pass': value['requireQuizPass'],
102
+ 'min_quiz_score': value['minQuizScore'],
103
+ 'quiz_config_id': value['quizConfigId'],
104
+ 'source_config_id': value['sourceConfigId'],
105
+ };
106
+ }
107
+