@learncard/credential-library 2.0.4 → 2.0.5
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/bundles/index.d.ts +5 -0
- package/dist/bundles/index.d.ts.map +1 -0
- package/dist/bundles/student.d.ts +3 -0
- package/dist/bundles/student.d.ts.map +1 -0
- package/dist/bundles/types.d.ts +24 -0
- package/dist/bundles/types.d.ts.map +1 -0
- package/dist/credential-library.cjs.development.js +10817 -682
- package/dist/credential-library.cjs.development.js.map +4 -4
- package/dist/credential-library.cjs.production.min.js +11 -1
- package/dist/credential-library.cjs.production.min.js.map +4 -4
- package/dist/credential-library.esm.js +10813 -676
- package/dist/credential-library.esm.js.map +4 -4
- package/dist/fixtures/clr/achievement-id-associations.d.ts +3 -0
- package/dist/fixtures/clr/achievement-id-associations.d.ts.map +1 -0
- package/dist/fixtures/clr/employment-record.d.ts +8 -0
- package/dist/fixtures/clr/employment-record.d.ts.map +1 -0
- package/dist/fixtures/clr/licensing-regulatory-record.d.ts +8 -0
- package/dist/fixtures/clr/licensing-regulatory-record.d.ts.map +1 -0
- package/dist/fixtures/clr/military-training-record.d.ts +8 -0
- package/dist/fixtures/clr/military-training-record.d.ts.map +1 -0
- package/dist/fixtures/clr/mixed-career-record.d.ts +8 -0
- package/dist/fixtures/clr/mixed-career-record.d.ts.map +1 -0
- package/dist/fixtures/clr/professional-organization-record.d.ts +8 -0
- package/dist/fixtures/clr/professional-organization-record.d.ts.map +1 -0
- package/dist/fixtures/clr/student-official-academic-transcript.d.ts +3 -0
- package/dist/fixtures/clr/student-official-academic-transcript.d.ts.map +1 -0
- package/dist/fixtures/clr/training-provider-record.d.ts +8 -0
- package/dist/fixtures/clr/training-provider-record.d.ts.map +1 -0
- package/dist/fixtures/index.d.ts +11 -1
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/obv3/student-additional-credentials.d.ts +3 -0
- package/dist/fixtures/obv3/student-additional-credentials.d.ts.map +1 -0
- package/dist/fixtures/obv3/student-sample-badges.d.ts +586 -0
- package/dist/fixtures/obv3/student-sample-badges.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/prepare.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/__tests__/bundles.test.ts +234 -0
- package/src/__tests__/clr-non-academic.test.ts +220 -0
- package/src/__tests__/registry.test.ts +31 -0
- package/src/bundles/index.ts +19 -0
- package/src/bundles/student.ts +251 -0
- package/src/bundles/types.ts +25 -0
- package/src/fixtures/clr/README.md +142 -0
- package/src/fixtures/clr/achievement-id-associations.ts +342 -0
- package/src/fixtures/clr/employment-record.ts +487 -0
- package/src/fixtures/clr/licensing-regulatory-record.ts +388 -0
- package/src/fixtures/clr/military-training-record.ts +468 -0
- package/src/fixtures/clr/mixed-career-record.ts +814 -0
- package/src/fixtures/clr/professional-organization-record.ts +403 -0
- package/src/fixtures/clr/student-official-academic-transcript.ts +3202 -0
- package/src/fixtures/clr/training-provider-record.ts +510 -0
- package/src/fixtures/index.ts +41 -0
- package/src/fixtures/obv3/student-additional-credentials.ts +3912 -0
- package/src/fixtures/obv3/student-sample-badges.ts +424 -0
- package/src/index.ts +2 -0
- package/src/prepare.ts +55 -11
- package/dist/__tests__/docs-json.test.d.ts +0 -2
- package/dist/__tests__/docs-json.test.d.ts.map +0 -1
- package/dist/__tests__/issuance.test.d.ts +0 -2
- package/dist/__tests__/issuance.test.d.ts.map +0 -1
- package/dist/__tests__/registry.test.d.ts +0 -2
- package/dist/__tests__/registry.test.d.ts.map +0 -1
- package/dist/__tests__/sd-jwt-vc.test.d.ts +0 -2
- package/dist/__tests__/sd-jwt-vc.test.d.ts.map +0 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const clrAchievementIdAssociations: CredentialFixture = {
|
|
4
|
+
id: 'clr/achievement-id-associations',
|
|
5
|
+
name: 'Achievement-ID Relationship Transcript',
|
|
6
|
+
description:
|
|
7
|
+
'A CLR v2 transcript whose relationships use Achievement.id values and cover every association type.',
|
|
8
|
+
spec: 'clr-v2',
|
|
9
|
+
profile: 'learner-record',
|
|
10
|
+
features: ['results', 'alignment', 'associations', 'nested-credentials'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['transcript', 'relationships', 'achievement-ids'],
|
|
15
|
+
credential: {
|
|
16
|
+
'@context': [
|
|
17
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
18
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
19
|
+
'https://purl.imsglobal.org/spec/clr/v2p0/context.json',
|
|
20
|
+
],
|
|
21
|
+
id: 'urn:uuid:relationship-clr',
|
|
22
|
+
type: ['VerifiableCredential', 'ClrCredential'],
|
|
23
|
+
name: 'Relationship Transcript',
|
|
24
|
+
issuer: {
|
|
25
|
+
id: 'did:example:relationship-college',
|
|
26
|
+
type: ['Profile'],
|
|
27
|
+
name: 'Relationship College',
|
|
28
|
+
},
|
|
29
|
+
validFrom: '2026-01-15T00:00:00Z',
|
|
30
|
+
credentialSubject: {
|
|
31
|
+
id: 'did:example:relationship-learner',
|
|
32
|
+
type: ['ClrSubject'],
|
|
33
|
+
identifier: [
|
|
34
|
+
{
|
|
35
|
+
type: 'IdentityObject',
|
|
36
|
+
identityHash: 'Jordan Rivera',
|
|
37
|
+
identityType: 'name',
|
|
38
|
+
hashed: false,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
verifiableCredential: [
|
|
42
|
+
{
|
|
43
|
+
'@context': [
|
|
44
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
45
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
46
|
+
],
|
|
47
|
+
id: 'urn:uuid:relationship-foundation-credential',
|
|
48
|
+
type: ['VerifiableCredential', 'AchievementCredential'],
|
|
49
|
+
name: 'Foundations Course Credential',
|
|
50
|
+
issuer: {
|
|
51
|
+
id: 'did:example:relationship-college',
|
|
52
|
+
type: ['Profile'],
|
|
53
|
+
name: 'Relationship College',
|
|
54
|
+
},
|
|
55
|
+
validFrom: '2025-05-15T00:00:00Z',
|
|
56
|
+
credentialSubject: {
|
|
57
|
+
id: 'did:example:relationship-learner',
|
|
58
|
+
type: ['AchievementSubject'],
|
|
59
|
+
achievement: {
|
|
60
|
+
id: 'urn:achievement:relationship-foundation',
|
|
61
|
+
type: ['Achievement'],
|
|
62
|
+
achievementType: 'Course',
|
|
63
|
+
name: 'Foundations of Systems Thinking',
|
|
64
|
+
humanCode: 'SYS 101',
|
|
65
|
+
creditsAvailable: 3,
|
|
66
|
+
resultDescription: [
|
|
67
|
+
{
|
|
68
|
+
id: 'urn:result-description:relationship-grade',
|
|
69
|
+
type: ['ResultDescription'],
|
|
70
|
+
name: 'Mastery Level',
|
|
71
|
+
resultType: 'PerformanceLevel',
|
|
72
|
+
allowedValue: [
|
|
73
|
+
'Beginning',
|
|
74
|
+
'Developing',
|
|
75
|
+
'Proficient',
|
|
76
|
+
'Advanced',
|
|
77
|
+
],
|
|
78
|
+
requiredValue: 'Proficient',
|
|
79
|
+
alignment: [
|
|
80
|
+
{
|
|
81
|
+
type: ['Alignment'],
|
|
82
|
+
targetName: 'Systems Thinking',
|
|
83
|
+
targetFramework: 'Relationship Skills Framework',
|
|
84
|
+
targetType: 'CFItem',
|
|
85
|
+
targetUrl:
|
|
86
|
+
'https://example.edu/framework/systems-thinking',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
result: [
|
|
93
|
+
{
|
|
94
|
+
type: ['Result'],
|
|
95
|
+
value: 'Advanced',
|
|
96
|
+
resultDescription: 'urn:result-description:relationship-grade',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
creditsEarned: 3,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
'@context': [
|
|
104
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
105
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
106
|
+
],
|
|
107
|
+
id: 'urn:uuid:relationship-advanced-credential',
|
|
108
|
+
type: ['VerifiableCredential', 'AchievementCredential'],
|
|
109
|
+
name: 'Advanced Course Credential',
|
|
110
|
+
issuer: {
|
|
111
|
+
id: 'did:example:relationship-college',
|
|
112
|
+
type: ['Profile'],
|
|
113
|
+
name: 'Relationship College',
|
|
114
|
+
},
|
|
115
|
+
validFrom: '2025-12-15T00:00:00Z',
|
|
116
|
+
credentialSubject: {
|
|
117
|
+
id: 'did:example:relationship-learner',
|
|
118
|
+
type: ['AchievementSubject'],
|
|
119
|
+
achievement: {
|
|
120
|
+
id: 'urn:achievement:relationship-advanced',
|
|
121
|
+
type: ['Achievement'],
|
|
122
|
+
achievementType: 'Course',
|
|
123
|
+
name: 'Applied Systems Design',
|
|
124
|
+
humanCode: 'SYS 201',
|
|
125
|
+
creditsAvailable: 3,
|
|
126
|
+
resultDescription: [
|
|
127
|
+
{
|
|
128
|
+
id: 'urn:result-description:relationship-score',
|
|
129
|
+
type: ['ResultDescription'],
|
|
130
|
+
name: 'Final Score',
|
|
131
|
+
resultType: 'Percent',
|
|
132
|
+
valueMin: '0',
|
|
133
|
+
valueMax: '100',
|
|
134
|
+
requiredValue: '70',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
result: [
|
|
139
|
+
{
|
|
140
|
+
type: ['Result'],
|
|
141
|
+
value: 86,
|
|
142
|
+
resultDescription: 'urn:result-description:relationship-score',
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
creditsEarned: 3,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
'@context': [
|
|
150
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
151
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
152
|
+
],
|
|
153
|
+
id: 'urn:uuid:relationship-program-credential',
|
|
154
|
+
type: ['VerifiableCredential', 'AchievementCredential'],
|
|
155
|
+
name: 'Systems Design Program Credential',
|
|
156
|
+
issuer: {
|
|
157
|
+
id: 'did:example:relationship-college',
|
|
158
|
+
type: ['Profile'],
|
|
159
|
+
name: 'Relationship College',
|
|
160
|
+
},
|
|
161
|
+
validFrom: '2026-01-15T00:00:00Z',
|
|
162
|
+
credentialSubject: {
|
|
163
|
+
id: 'did:example:relationship-learner',
|
|
164
|
+
type: ['AchievementSubject'],
|
|
165
|
+
achievement: {
|
|
166
|
+
id: 'urn:achievement:relationship-program',
|
|
167
|
+
type: ['Achievement'],
|
|
168
|
+
achievementType: 'BachelorDegree',
|
|
169
|
+
name: 'Systems Design Certificate',
|
|
170
|
+
resultDescription: [
|
|
171
|
+
{
|
|
172
|
+
id: 'urn:result-description:relationship-status',
|
|
173
|
+
type: ['ResultDescription'],
|
|
174
|
+
name: 'Program Status',
|
|
175
|
+
resultType: 'Status',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
result: [
|
|
180
|
+
{
|
|
181
|
+
type: ['Result'],
|
|
182
|
+
status: 'Completed',
|
|
183
|
+
resultDescription: 'urn:result-description:relationship-status',
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
'@context': [
|
|
190
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
191
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
192
|
+
],
|
|
193
|
+
id: 'urn:uuid:relationship-assessment-credential',
|
|
194
|
+
type: ['VerifiableCredential', 'AchievementCredential'],
|
|
195
|
+
name: 'Systems Assessment Credential',
|
|
196
|
+
issuer: {
|
|
197
|
+
id: 'did:example:relationship-college',
|
|
198
|
+
type: ['Profile'],
|
|
199
|
+
name: 'Relationship College',
|
|
200
|
+
},
|
|
201
|
+
validFrom: '2025-12-10T00:00:00Z',
|
|
202
|
+
credentialSubject: {
|
|
203
|
+
id: 'did:example:relationship-learner',
|
|
204
|
+
type: ['AchievementSubject'],
|
|
205
|
+
achievement: {
|
|
206
|
+
id: 'urn:achievement:relationship-assessment',
|
|
207
|
+
type: ['Achievement'],
|
|
208
|
+
achievementType: 'Assessment',
|
|
209
|
+
name: 'Systems Design Assessment',
|
|
210
|
+
resultDescription: [
|
|
211
|
+
{
|
|
212
|
+
id: 'urn:result-description:relationship-rubric',
|
|
213
|
+
type: ['ResultDescription'],
|
|
214
|
+
name: 'Design Quality',
|
|
215
|
+
resultType: 'RubricCriterionLevel',
|
|
216
|
+
requiredLevel: 'urn:rubric-level:proficient',
|
|
217
|
+
rubricCriterionLevel: [
|
|
218
|
+
{
|
|
219
|
+
id: 'urn:rubric-level:developing',
|
|
220
|
+
type: ['RubricCriterionLevel'],
|
|
221
|
+
name: 'Developing',
|
|
222
|
+
level: 'Developing',
|
|
223
|
+
description: 'Applies parts of the design process.',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 'urn:rubric-level:proficient',
|
|
227
|
+
type: ['RubricCriterionLevel'],
|
|
228
|
+
name: 'Proficient',
|
|
229
|
+
level: 'Proficient',
|
|
230
|
+
description:
|
|
231
|
+
'Applies the complete design process independently.',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
id: 'urn:rubric-level:advanced',
|
|
235
|
+
type: ['RubricCriterionLevel'],
|
|
236
|
+
name: 'Advanced',
|
|
237
|
+
level: 'Advanced',
|
|
238
|
+
description:
|
|
239
|
+
'Adapts the design process to complex constraints.',
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
result: [
|
|
246
|
+
{
|
|
247
|
+
type: ['Result'],
|
|
248
|
+
value: 'Advanced',
|
|
249
|
+
achievedLevel: 'urn:rubric-level:advanced',
|
|
250
|
+
resultDescription: 'urn:result-description:relationship-rubric',
|
|
251
|
+
alignment: [
|
|
252
|
+
{
|
|
253
|
+
type: ['Alignment'],
|
|
254
|
+
targetName: 'Design Quality',
|
|
255
|
+
targetFramework: 'Relationship Skills Framework',
|
|
256
|
+
targetType: 'CFItem',
|
|
257
|
+
targetUrl: 'https://example.edu/framework/design-quality',
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
'@context': [
|
|
266
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
267
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
268
|
+
],
|
|
269
|
+
id: 'urn:uuid:relationship-competency-credential',
|
|
270
|
+
type: ['VerifiableCredential', 'AchievementCredential'],
|
|
271
|
+
name: 'Systems Thinking Competency Credential',
|
|
272
|
+
issuer: {
|
|
273
|
+
id: 'did:example:relationship-college',
|
|
274
|
+
type: ['Profile'],
|
|
275
|
+
name: 'Relationship College',
|
|
276
|
+
},
|
|
277
|
+
validFrom: '2025-12-10T00:00:00Z',
|
|
278
|
+
credentialSubject: {
|
|
279
|
+
id: 'did:example:relationship-learner',
|
|
280
|
+
type: ['AchievementSubject'],
|
|
281
|
+
achievement: {
|
|
282
|
+
id: 'urn:achievement:relationship-competency',
|
|
283
|
+
type: ['Achievement'],
|
|
284
|
+
achievementType: 'Competency',
|
|
285
|
+
name: 'Systems Thinking',
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
association: [
|
|
291
|
+
{
|
|
292
|
+
type: ['Association'],
|
|
293
|
+
associationType: 'isChildOf',
|
|
294
|
+
sourceId: 'urn:achievement:relationship-foundation',
|
|
295
|
+
targetId: 'urn:achievement:relationship-program',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: ['Association'],
|
|
299
|
+
associationType: 'isParentOf',
|
|
300
|
+
sourceId: 'urn:achievement:relationship-program',
|
|
301
|
+
targetId: 'urn:achievement:relationship-advanced',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
type: ['Association'],
|
|
305
|
+
associationType: 'isPartOf',
|
|
306
|
+
sourceId: 'urn:achievement:relationship-assessment',
|
|
307
|
+
targetId: 'urn:achievement:relationship-program',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
type: ['Association'],
|
|
311
|
+
associationType: 'precedes',
|
|
312
|
+
sourceId: 'urn:achievement:relationship-foundation',
|
|
313
|
+
targetId: 'urn:achievement:relationship-advanced',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
type: ['Association'],
|
|
317
|
+
associationType: 'isPeerOf',
|
|
318
|
+
sourceId: 'urn:achievement:relationship-foundation',
|
|
319
|
+
targetId: 'urn:achievement:relationship-assessment',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
type: ['Association'],
|
|
323
|
+
associationType: 'exactMatchOf',
|
|
324
|
+
sourceId: 'urn:achievement:relationship-competency',
|
|
325
|
+
targetId: 'urn:achievement:relationship-assessment',
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
type: ['Association'],
|
|
329
|
+
associationType: 'replacedBy',
|
|
330
|
+
sourceId: 'urn:achievement:relationship-foundation',
|
|
331
|
+
targetId: 'urn:achievement:relationship-advanced',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
type: ['Association'],
|
|
335
|
+
associationType: 'isRelatedTo',
|
|
336
|
+
sourceId: 'urn:achievement:relationship-competency',
|
|
337
|
+
targetId: 'urn:achievement:relationship-advanced',
|
|
338
|
+
},
|
|
339
|
+
],
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
};
|