@learncard/credential-library 2.0.5 → 2.1.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/README.md +30 -1
- package/SOURCES.md +63 -0
- package/dist/credential-library.cjs.development.js +1577 -32
- package/dist/credential-library.cjs.development.js.map +4 -4
- package/dist/credential-library.cjs.production.min.js +3 -3
- package/dist/credential-library.cjs.production.min.js.map +4 -4
- package/dist/credential-library.esm.js +1563 -18
- package/dist/credential-library.esm.js.map +4 -4
- package/dist/fixtures/clr/military-comprehensive-record.d.ts +4 -0
- package/dist/fixtures/clr/military-comprehensive-record.d.ts.map +1 -0
- package/dist/fixtures/clr/mixed-role-portfolio.d.ts +3 -0
- package/dist/fixtures/clr/mixed-role-portfolio.d.ts.map +1 -0
- package/dist/fixtures/custom/course-enrollment.d.ts +3 -0
- package/dist/fixtures/custom/course-enrollment.d.ts.map +1 -0
- package/dist/fixtures/custom/exam-accommodation.d.ts +3 -0
- package/dist/fixtures/custom/exam-accommodation.d.ts.map +1 -0
- package/dist/fixtures/index.d.ts +16 -1
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/obv3/food-allergen-facilitator.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-facilitator.d.ts.map +1 -0
- package/dist/fixtures/obv3/food-allergen-practice-fr.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-practice-fr.d.ts.map +1 -0
- package/dist/fixtures/obv3/food-allergen-practice.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-practice.d.ts.map +1 -0
- package/dist/fixtures/obv3/phishing-transfer.d.ts +3 -0
- package/dist/fixtures/obv3/phishing-transfer.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-apprenticeship.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-apprenticeship.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-badge-override.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-badge-override.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-certification.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-certification.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-expired.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-expired.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-journeyman.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-journeyman.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-license.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-license.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-master.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-master.d.ts.map +1 -0
- package/package.json +7 -6
- package/src/__tests__/curated-examples.test.ts +248 -0
- package/src/__tests__/issuance.test.ts +35 -0
- package/src/fixtures/clr/military-comprehensive-record.ts +155 -0
- package/src/fixtures/clr/mixed-role-portfolio.ts +490 -0
- package/src/fixtures/custom/course-enrollment.ts +56 -0
- package/src/fixtures/custom/exam-accommodation.ts +56 -0
- package/src/fixtures/index.ts +49 -0
- package/src/fixtures/obv3/food-allergen-facilitator.ts +108 -0
- package/src/fixtures/obv3/food-allergen-practice-fr.ts +107 -0
- package/src/fixtures/obv3/food-allergen-practice.ts +105 -0
- package/src/fixtures/obv3/phishing-transfer.ts +163 -0
- package/src/fixtures/obv3/qualification-apprenticeship.ts +58 -0
- package/src/fixtures/obv3/qualification-badge-override.ts +64 -0
- package/src/fixtures/obv3/qualification-certification.ts +59 -0
- package/src/fixtures/obv3/qualification-expired.ts +59 -0
- package/src/fixtures/obv3/qualification-journeyman.ts +58 -0
- package/src/fixtures/obv3/qualification-license.ts +58 -0
- package/src/fixtures/obv3/qualification-master.ts +58 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
// Example corpus provenance and alignment attribution: ../../../SOURCES.md.
|
|
6
|
+
export const obv3PhishingTransfer: CredentialFixture = {
|
|
7
|
+
id: 'obv3/phishing-transfer',
|
|
8
|
+
name: 'Phishing Recognition Transfer Project',
|
|
9
|
+
description:
|
|
10
|
+
'Independent project with an achieved-level-only rubric result and a separate RawScore result.',
|
|
11
|
+
spec: 'obv3',
|
|
12
|
+
profile: 'micro-credential',
|
|
13
|
+
features: ['evidence', 'alignment', 'results', 'expiration'],
|
|
14
|
+
source: 'synthetic',
|
|
15
|
+
signed: false,
|
|
16
|
+
validity: 'valid',
|
|
17
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
18
|
+
tags: ['phishing', 'mixed-results', 'achieved-level-only', 'learner'],
|
|
19
|
+
|
|
20
|
+
credential: {
|
|
21
|
+
'@context': [
|
|
22
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
23
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
24
|
+
],
|
|
25
|
+
id: 'urn:uuid:670ef7c6-b8de-532c-9667-9817a0c942e8',
|
|
26
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
27
|
+
name: 'Phishing recognition — independent transfer project',
|
|
28
|
+
description:
|
|
29
|
+
'Adapt this task to a new fictional setting: Classify synthetic suspicious email examples. Complete an independently planned transfer project, recording assumptions, an initial failed approach and a supported revision.',
|
|
30
|
+
issuer: {
|
|
31
|
+
id: 'did:example:issuer123',
|
|
32
|
+
type: ['Profile'],
|
|
33
|
+
name: 'Tech Academy',
|
|
34
|
+
url: 'https://techacademy.example.com',
|
|
35
|
+
},
|
|
36
|
+
validFrom: '2026-09-01T00:00:00Z',
|
|
37
|
+
validUntil: '2028-09-01T00:00:00Z',
|
|
38
|
+
credentialSubject: {
|
|
39
|
+
id: 'https://fixtures.example.org/frenchfry/personas/ddf7bc68efd4',
|
|
40
|
+
type: ['AchievementSubject'],
|
|
41
|
+
achievement: {
|
|
42
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer',
|
|
43
|
+
type: ['Achievement'],
|
|
44
|
+
achievementType: 'MicroCredential',
|
|
45
|
+
name: 'Phishing recognition — independent transfer project',
|
|
46
|
+
description:
|
|
47
|
+
'Adapt this task to a new fictional setting: Classify synthetic suspicious email examples. Complete an independently planned transfer project, recording assumptions, an initial failed approach and a supported revision.',
|
|
48
|
+
criteria: {
|
|
49
|
+
narrative:
|
|
50
|
+
'Identify cues without following links or sharing secrets; compare two alternative approaches and justify one under time and resource constraints.',
|
|
51
|
+
},
|
|
52
|
+
fieldOfStudy: 'technology',
|
|
53
|
+
inLanguage: 'en',
|
|
54
|
+
tag: ['technology', 'Phishing recognition', 'learner'],
|
|
55
|
+
resultDescription: [
|
|
56
|
+
{
|
|
57
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric',
|
|
58
|
+
type: ['ResultDescription'],
|
|
59
|
+
name: 'Independent transfer rubric',
|
|
60
|
+
resultType: 'RubricCriterionLevel',
|
|
61
|
+
requiredLevel:
|
|
62
|
+
'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/proficient',
|
|
63
|
+
rubricCriterionLevel: [
|
|
64
|
+
{
|
|
65
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/developing',
|
|
66
|
+
type: ['RubricCriterionLevel'],
|
|
67
|
+
name: 'Developing',
|
|
68
|
+
level: '1',
|
|
69
|
+
description:
|
|
70
|
+
'Needs support to complete: Adapt this task to a new fictional setting: Classify synthetic suspicious email examples',
|
|
71
|
+
points: '1',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/proficient',
|
|
75
|
+
type: ['RubricCriterionLevel'],
|
|
76
|
+
name: 'Proficient',
|
|
77
|
+
level: '2',
|
|
78
|
+
description:
|
|
79
|
+
'Meets the task criterion: Identify cues without following links or sharing secrets; compare two alternative approaches and justify one under time and resource constraints.',
|
|
80
|
+
points: '2',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/advanced',
|
|
84
|
+
type: ['RubricCriterionLevel'],
|
|
85
|
+
name: 'Advanced',
|
|
86
|
+
level: '3',
|
|
87
|
+
description:
|
|
88
|
+
'Meets criterion and explains limits and alternative approaches.',
|
|
89
|
+
points: '3',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/functional-checks',
|
|
95
|
+
type: ['ResultDescription'],
|
|
96
|
+
name: 'Simulated functional acceptance checks',
|
|
97
|
+
resultType: 'RawScore',
|
|
98
|
+
valueMin: '0',
|
|
99
|
+
valueMax: '10',
|
|
100
|
+
requiredValue: '8',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
alignment: [
|
|
104
|
+
{
|
|
105
|
+
type: ['Alignment'],
|
|
106
|
+
targetName: 'Critical Thinking',
|
|
107
|
+
targetUrl:
|
|
108
|
+
'https://www.onetcenter.org/ctdlasn/resources/ce-07c26361-9119-11e8-b852-782bcb5df6ac',
|
|
109
|
+
targetFramework:
|
|
110
|
+
'O*NET Content Model Worker Requirements - Essential Skills: U.S. Department of Labor (DOL)',
|
|
111
|
+
targetDescription:
|
|
112
|
+
'Using logic and reasoning to identify the strengths and weaknesses of alternative solutions, conclusions, or approaches to problems.',
|
|
113
|
+
targetType: 'ceasn:Competency',
|
|
114
|
+
targetCode: '2.A.2.a',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
role: 'learner',
|
|
119
|
+
narrative:
|
|
120
|
+
'Complete an independently planned transfer project, recording assumptions, an initial failed approach and a supported revision.',
|
|
121
|
+
activityStartDate: '2026-08-01T00:00:00Z',
|
|
122
|
+
activityEndDate: '2026-08-31T00:00:00Z',
|
|
123
|
+
result: [
|
|
124
|
+
{
|
|
125
|
+
type: ['Result'],
|
|
126
|
+
resultDescription:
|
|
127
|
+
'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric',
|
|
128
|
+
achievedLevel:
|
|
129
|
+
'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/proficient',
|
|
130
|
+
status: 'Completed',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: ['Result'],
|
|
134
|
+
resultDescription:
|
|
135
|
+
'https://fixtures.example.org/frenchfry/achievements/ddf7bc68efd4/transfer/rubric/functional-checks',
|
|
136
|
+
value: '9',
|
|
137
|
+
status: 'Completed',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
evidence: [
|
|
142
|
+
{
|
|
143
|
+
id: 'https://fixtures.example.org/frenchfry/evidence/ddf7bc68efd4/transfer',
|
|
144
|
+
type: ['Evidence'],
|
|
145
|
+
name: 'Independent project dossier; Classification worksheet and explanation',
|
|
146
|
+
description:
|
|
147
|
+
'Adapt this task to a new fictional setting: Classify synthetic suspicious email examples; evaluation considered: Identify cues without following links or sharing secrets; compare two alternative approaches and justify one under time and resource constraints.',
|
|
148
|
+
narrative:
|
|
149
|
+
'Adapt this task to a new fictional setting: Classify synthetic suspicious email examples; evaluation considered: Identify cues without following links or sharing secrets; compare two alternative approaches and justify one under time and resource constraints.',
|
|
150
|
+
genre: 'Portfolio',
|
|
151
|
+
audience: 'Assessors',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'https://fixtures.example.org/frenchfry/evidence/ddf7bc68efd4/transfer-review',
|
|
155
|
+
type: ['Evidence'],
|
|
156
|
+
name: 'Revision and peer critique record',
|
|
157
|
+
narrative:
|
|
158
|
+
'An initial approach was reviewed; the learner documented assumptions, evaluated an alternative and revised the work.',
|
|
159
|
+
genre: 'Reflective critique',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationApprenticeship: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-apprenticeship',
|
|
6
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
7
|
+
'description': 'LC-2111 ApprenticeshipCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'apprenticeship'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000003',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
24
|
+
'description': 'Recognizes completion of supervised electrical training.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F6E0.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Apprenticeship tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/apprenticeship',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'ApprenticeshipCertificate',
|
|
44
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
45
|
+
'description': 'Recognizes completion of supervised electrical training.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F6E0.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Apprenticeship tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationBadgeOverride: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-badge-override',
|
|
6
|
+
'name': 'Safety Certification — Badge Layout',
|
|
7
|
+
'description': 'LC-2111 Certification classification and explicit display override test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'display', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'badge-override'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
'https://ctx.learncard.com/boosts/1.0.3.json',
|
|
21
|
+
],
|
|
22
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000007',
|
|
23
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
|
|
24
|
+
'name': 'Safety Certification — Badge Layout',
|
|
25
|
+
'description':
|
|
26
|
+
'A qualification with an explicit badge layout instead of the default certificate.',
|
|
27
|
+
'image': {
|
|
28
|
+
id: 'https://openmoji.org/data/color/svg/1F6E1.svg',
|
|
29
|
+
type: 'Image',
|
|
30
|
+
caption: 'Safety certification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
31
|
+
},
|
|
32
|
+
'issuer': {
|
|
33
|
+
'id': 'did:example:qualification-issuer',
|
|
34
|
+
'type': ['Profile'],
|
|
35
|
+
'name': 'Example Professional Training Academy',
|
|
36
|
+
},
|
|
37
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
38
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
39
|
+
'credentialSubject': {
|
|
40
|
+
'id': 'did:example:qualification-holder',
|
|
41
|
+
'type': ['AchievementSubject'],
|
|
42
|
+
'achievement': {
|
|
43
|
+
'id': 'https://example.org/qualifications/badge-override',
|
|
44
|
+
'type': ['Achievement'],
|
|
45
|
+
'achievementType': 'Certification',
|
|
46
|
+
'name': 'Safety Certification — Badge Layout',
|
|
47
|
+
'description':
|
|
48
|
+
'A qualification with an explicit badge layout instead of the default certificate.',
|
|
49
|
+
'image': {
|
|
50
|
+
id: 'https://openmoji.org/data/color/svg/1F6E1.svg',
|
|
51
|
+
type: 'Image',
|
|
52
|
+
caption: 'Safety certification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
53
|
+
},
|
|
54
|
+
'criteria': {
|
|
55
|
+
'narrative':
|
|
56
|
+
'Complete the required training and pass the practical assessment.',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
'display': {
|
|
61
|
+
'displayType': 'badge',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationCertification: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-certification',
|
|
6
|
+
'name': 'Project Management Certification',
|
|
7
|
+
'description': 'LC-2111 Certification classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'certification'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000002',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Project Management Certification',
|
|
24
|
+
'description': 'Demonstrates competency in planning, delivering, and evaluating projects.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F4CB.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Project management illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/certification',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'Certification',
|
|
44
|
+
'name': 'Project Management Certification',
|
|
45
|
+
'description':
|
|
46
|
+
'Demonstrates competency in planning, delivering, and evaluating projects.',
|
|
47
|
+
'image': {
|
|
48
|
+
id: 'https://openmoji.org/data/color/svg/1F4CB.svg',
|
|
49
|
+
type: 'Image',
|
|
50
|
+
caption: 'Project management illustration — OpenMoji (CC BY-SA 4.0)',
|
|
51
|
+
},
|
|
52
|
+
'criteria': {
|
|
53
|
+
'narrative':
|
|
54
|
+
'Complete the required training and pass the practical assessment.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationExpired: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-expired',
|
|
6
|
+
'name': 'Expired Safety Certification',
|
|
7
|
+
'description':
|
|
8
|
+
'LC-2111 expiration test. Enable Keep fixture dates in the viewer to retain the past expiration.',
|
|
9
|
+
'spec': 'obv3',
|
|
10
|
+
'profile': 'certificate',
|
|
11
|
+
'features': ['expiration', 'image'],
|
|
12
|
+
'source': 'synthetic',
|
|
13
|
+
'signed': false,
|
|
14
|
+
'validity': 'valid',
|
|
15
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
16
|
+
'tags': ['qualifications', 'lc-2111', 'expired'],
|
|
17
|
+
'credential': {
|
|
18
|
+
'@context': [
|
|
19
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
20
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
21
|
+
],
|
|
22
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000006',
|
|
23
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
24
|
+
'name': 'Expired Safety Certification',
|
|
25
|
+
'description': 'An expired qualification that must remain visible and selectable.',
|
|
26
|
+
'image': {
|
|
27
|
+
id: 'https://openmoji.org/data/color/svg/26A0.svg',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'Safety warning illustration — OpenMoji (CC BY-SA 4.0)',
|
|
30
|
+
},
|
|
31
|
+
'issuer': {
|
|
32
|
+
'id': 'did:example:qualification-issuer',
|
|
33
|
+
'type': ['Profile'],
|
|
34
|
+
'name': 'Example Professional Training Academy',
|
|
35
|
+
},
|
|
36
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
37
|
+
'validUntil': '2024-01-01T00:00:00Z',
|
|
38
|
+
'credentialSubject': {
|
|
39
|
+
'id': 'did:example:qualification-holder',
|
|
40
|
+
'type': ['AchievementSubject'],
|
|
41
|
+
'achievement': {
|
|
42
|
+
'id': 'https://example.org/qualifications/expired',
|
|
43
|
+
'type': ['Achievement'],
|
|
44
|
+
'achievementType': 'Certification',
|
|
45
|
+
'name': 'Expired Safety Certification',
|
|
46
|
+
'description': 'An expired qualification that must remain visible and selectable.',
|
|
47
|
+
'image': {
|
|
48
|
+
id: 'https://openmoji.org/data/color/svg/26A0.svg',
|
|
49
|
+
type: 'Image',
|
|
50
|
+
caption: 'Safety warning illustration — OpenMoji (CC BY-SA 4.0)',
|
|
51
|
+
},
|
|
52
|
+
'criteria': {
|
|
53
|
+
'narrative':
|
|
54
|
+
'Complete the safety course; renewal is required after expiration.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationJourneyman: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-journeyman',
|
|
6
|
+
'name': 'Journeyman Electrician Certificate',
|
|
7
|
+
'description': 'LC-2111 JourneymanCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'journeyman'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000004',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Journeyman Electrician Certificate',
|
|
24
|
+
'description': 'Recognizes qualification to work independently as an electrician.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F527.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Journeyman tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/journeyman',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'JourneymanCertificate',
|
|
44
|
+
'name': 'Journeyman Electrician Certificate',
|
|
45
|
+
'description': 'Recognizes qualification to work independently as an electrician.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F527.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Journeyman tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationLicense: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-license',
|
|
6
|
+
'name': 'Professional Electrical License',
|
|
7
|
+
'description': 'LC-2111 License classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'license',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'license'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000001',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Professional Electrical License',
|
|
24
|
+
'description': 'Authorizes supervised electrical installation and maintenance.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F50C.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Electrical license illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/license',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'License',
|
|
44
|
+
'name': 'Professional Electrical License',
|
|
45
|
+
'description': 'Authorizes supervised electrical installation and maintenance.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F50C.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Electrical license illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationMaster: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-master',
|
|
6
|
+
'name': 'Master Electrician Certificate',
|
|
7
|
+
'description': 'LC-2111 MasterCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'master'],
|
|
16
|
+
'credential': {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000005',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Master Electrician Certificate',
|
|
24
|
+
'description': 'Recognizes advanced electrical design and supervisory competence.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F3C6.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Master qualification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/master',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'MasterCertificate',
|
|
44
|
+
'name': 'Master Electrician Certificate',
|
|
45
|
+
'description': 'Recognizes advanced electrical design and supervisory competence.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F3C6.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Master qualification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|