@cooperation/vc-storage 1.0.23 → 1.0.24
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/models/ResumeVC.js +110 -7
- package/dist/types/utils/context.d.ts +76 -2
- package/dist/utils/context.js +99 -9
- package/package.json +1 -1
package/dist/models/ResumeVC.js
CHANGED
@@ -33,7 +33,6 @@ export class ResumeVC {
|
|
33
33
|
const unsignedResumeVC = {
|
34
34
|
'@context': [
|
35
35
|
'https://www.w3.org/2018/credentials/v1',
|
36
|
-
'https://schema.hropenstandards.org/4.4/context.jsonld',
|
37
36
|
inlineResumeContext['@context'], // Inline context
|
38
37
|
],
|
39
38
|
id: `urn:uuid:${uuidv4()}`, // Generate a unique UUID
|
@@ -44,16 +43,120 @@ export class ResumeVC {
|
|
44
43
|
type: 'Resume',
|
45
44
|
person: {
|
46
45
|
name: {
|
47
|
-
formattedName: formData.
|
46
|
+
formattedName: formData.name || '',
|
47
|
+
},
|
48
|
+
primaryLanguage: 'en',
|
49
|
+
contact: {
|
50
|
+
fullName: formData.contact.fullName || '',
|
51
|
+
email: formData.contact.email || '',
|
52
|
+
phone: formData.contact.phone || '',
|
53
|
+
location: {
|
54
|
+
street: formData.contact.location.street || '',
|
55
|
+
city: formData.contact.location.city || '',
|
56
|
+
state: formData.contact.location.state || '',
|
57
|
+
country: formData.contact.location.country || '',
|
58
|
+
postalCode: formData.contact.location.postalCode || '',
|
59
|
+
},
|
60
|
+
socialLinks: {
|
61
|
+
linkedin: formData.contact.socialLinks.linkedin || '',
|
62
|
+
github: formData.contact.socialLinks.github || '',
|
63
|
+
portfolio: formData.contact.socialLinks.portfolio || '',
|
64
|
+
twitter: formData.contact.socialLinks.twitter || '',
|
65
|
+
},
|
48
66
|
},
|
49
|
-
primaryLanguage: formData.primaryLanguage || 'en',
|
50
67
|
},
|
51
68
|
narrative: {
|
52
|
-
text: formData.
|
69
|
+
text: formData.summary || '',
|
53
70
|
},
|
54
|
-
|
55
|
-
|
56
|
-
|
71
|
+
// Employment History
|
72
|
+
employmentHistory: formData.experience.items.map((exp) => ({
|
73
|
+
organization: {
|
74
|
+
tradeName: exp.company || '',
|
75
|
+
},
|
76
|
+
title: exp.title || '',
|
77
|
+
description: exp.description || '',
|
78
|
+
startDate: exp.startDate || '',
|
79
|
+
endDate: exp.endDate || '',
|
80
|
+
stillEmployed: exp.stillEmployed || false,
|
81
|
+
})),
|
82
|
+
// Duplicated Experience (Raw)
|
83
|
+
experience: formData.experience.items.map((exp) => ({
|
84
|
+
company: exp.company || '',
|
85
|
+
title: exp.title || '',
|
86
|
+
description: exp.description || '',
|
87
|
+
startDate: exp.startDate || '',
|
88
|
+
endDate: exp.endDate || '',
|
89
|
+
stillEmployed: exp.stillEmployed || false,
|
90
|
+
})),
|
91
|
+
// Skills
|
92
|
+
skills: formData.skills.items.map((skill) => ({
|
93
|
+
name: skill.name || '',
|
94
|
+
})),
|
95
|
+
// Education
|
96
|
+
educationAndLearning: formData.education.items.map((edu) => ({
|
97
|
+
institution: edu.institution || '',
|
98
|
+
degree: edu.degree || '',
|
99
|
+
fieldOfStudy: edu.fieldOfStudy || '',
|
100
|
+
startDate: edu.startDate || '',
|
101
|
+
endDate: edu.endDate || '',
|
102
|
+
})),
|
103
|
+
// Awards
|
104
|
+
awards: formData.awards.items.map((award) => ({
|
105
|
+
title: award.title || '',
|
106
|
+
issuer: award.issuer || '',
|
107
|
+
date: award.date || '',
|
108
|
+
description: award.description || '',
|
109
|
+
})),
|
110
|
+
// Publications
|
111
|
+
publications: formData.publications.items.map((pub) => ({
|
112
|
+
title: pub.title || '',
|
113
|
+
publisher: pub.publisher || '',
|
114
|
+
date: pub.date || '',
|
115
|
+
url: pub.url || '',
|
116
|
+
})),
|
117
|
+
// Certifications
|
118
|
+
certifications: formData.certifications.items.map((cert) => ({
|
119
|
+
name: cert.name || '',
|
120
|
+
issuer: cert.issuer || '',
|
121
|
+
date: cert.date || '',
|
122
|
+
url: cert.url || '',
|
123
|
+
})),
|
124
|
+
// Professional Affiliations
|
125
|
+
professionalAffiliations: formData.professionalAffiliations.items.map((aff) => ({
|
126
|
+
organization: aff.organization || '',
|
127
|
+
role: aff.role || '',
|
128
|
+
startDate: aff.startDate || '',
|
129
|
+
endDate: aff.endDate || '',
|
130
|
+
})),
|
131
|
+
// Volunteer Work
|
132
|
+
volunteerWork: formData.volunteerWork.items.map((vol) => ({
|
133
|
+
organization: vol.organization || '',
|
134
|
+
role: vol.role || '',
|
135
|
+
description: vol.description || '',
|
136
|
+
startDate: vol.startDate || '',
|
137
|
+
endDate: vol.endDate || '',
|
138
|
+
})),
|
139
|
+
// Hobbies and Interests
|
140
|
+
hobbiesAndInterests: formData.hobbiesAndInterests || [],
|
141
|
+
// Languages
|
142
|
+
languages: formData.languages.items.map((lang) => ({
|
143
|
+
language: lang.language || '',
|
144
|
+
proficiency: lang.proficiency || '',
|
145
|
+
})),
|
146
|
+
// Testimonials
|
147
|
+
testimonials: formData.testimonials.items.map((testi) => ({
|
148
|
+
author: testi.author || '',
|
149
|
+
text: testi.text || '',
|
150
|
+
date: testi.date || '',
|
151
|
+
})),
|
152
|
+
// Projects
|
153
|
+
projects: formData.projects.items.map((proj) => ({
|
154
|
+
name: proj.name || '',
|
155
|
+
description: proj.description || '',
|
156
|
+
url: proj.url || '',
|
157
|
+
startDate: proj.startDate || '',
|
158
|
+
endDate: proj.endDate || '',
|
159
|
+
})),
|
57
160
|
},
|
58
161
|
};
|
59
162
|
return unsignedResumeVC;
|
@@ -6,23 +6,97 @@ export declare const inlineResumeContext: {
|
|
6
6
|
primaryLanguage: string;
|
7
7
|
narrative: string;
|
8
8
|
text: string;
|
9
|
+
contact: string;
|
10
|
+
email: string;
|
11
|
+
phone: string;
|
12
|
+
location: string;
|
13
|
+
street: string;
|
14
|
+
city: string;
|
15
|
+
state: string;
|
16
|
+
country: string;
|
17
|
+
postalCode: string;
|
18
|
+
socialLinks: {
|
19
|
+
'@id': string;
|
20
|
+
'@container': string;
|
21
|
+
};
|
22
|
+
linkedin: string;
|
23
|
+
github: string;
|
24
|
+
portfolio: string;
|
25
|
+
twitter: string;
|
26
|
+
experience: {
|
27
|
+
'@id': string;
|
28
|
+
'@container': string;
|
29
|
+
};
|
9
30
|
employmentHistory: {
|
10
31
|
'@id': string;
|
11
32
|
'@container': string;
|
12
33
|
};
|
13
34
|
company: string;
|
14
35
|
position: string;
|
36
|
+
description: string;
|
37
|
+
startDate: string;
|
38
|
+
endDate: string;
|
39
|
+
stillEmployed: string;
|
15
40
|
duration: string;
|
16
41
|
skills: {
|
17
42
|
'@id': string;
|
18
43
|
'@container': string;
|
19
44
|
};
|
20
|
-
educationAndLearning:
|
45
|
+
educationAndLearning: {
|
46
|
+
'@id': string;
|
47
|
+
'@container': string;
|
48
|
+
};
|
21
49
|
degree: string;
|
50
|
+
fieldOfStudy: string;
|
22
51
|
institution: string;
|
23
52
|
year: string;
|
24
|
-
|
53
|
+
awards: {
|
54
|
+
'@id': string;
|
55
|
+
'@container': string;
|
56
|
+
};
|
57
|
+
title: string;
|
25
58
|
issuer: string;
|
59
|
+
date: string;
|
60
|
+
publications: {
|
61
|
+
'@id': string;
|
62
|
+
'@container': string;
|
63
|
+
};
|
64
|
+
publisher: string;
|
65
|
+
url: string;
|
66
|
+
certifications: {
|
67
|
+
'@id': string;
|
68
|
+
'@container': string;
|
69
|
+
};
|
70
|
+
professionalAffiliations: {
|
71
|
+
'@id': string;
|
72
|
+
'@container': string;
|
73
|
+
};
|
74
|
+
organization: string;
|
75
|
+
role: string;
|
76
|
+
volunteerWork: {
|
77
|
+
'@id': string;
|
78
|
+
'@container': string;
|
79
|
+
};
|
80
|
+
hobbiesAndInterests: {
|
81
|
+
'@id': string;
|
82
|
+
'@container': string;
|
83
|
+
};
|
84
|
+
languages: {
|
85
|
+
'@id': string;
|
86
|
+
'@container': string;
|
87
|
+
};
|
88
|
+
language: string;
|
89
|
+
proficiency: string;
|
90
|
+
testimonials: {
|
91
|
+
'@id': string;
|
92
|
+
'@container': string;
|
93
|
+
};
|
94
|
+
author: string;
|
95
|
+
projects: {
|
96
|
+
'@id': string;
|
97
|
+
'@container': string;
|
98
|
+
};
|
99
|
+
issuanceDate: string;
|
26
100
|
credentialSubject: string;
|
27
101
|
person: string;
|
28
102
|
Resume: string;
|
package/dist/utils/context.js
CHANGED
@@ -1,31 +1,121 @@
|
|
1
1
|
export const inlineResumeContext = {
|
2
2
|
'@context': {
|
3
3
|
'@vocab': 'https://schema.hropenstandards.org/4.4/',
|
4
|
+
// Basic details
|
4
5
|
name: 'https://schema.org/name',
|
5
6
|
formattedName: 'https://schema.org/formattedName',
|
6
7
|
primaryLanguage: 'https://schema.org/primaryLanguage',
|
8
|
+
// Narrative
|
7
9
|
narrative: 'https://schema.org/narrative',
|
8
10
|
text: 'https://schema.org/text',
|
11
|
+
// Contact Information
|
12
|
+
contact: 'https://schema.org/ContactPoint',
|
13
|
+
email: 'https://schema.org/email',
|
14
|
+
phone: 'https://schema.org/telephone',
|
15
|
+
location: 'https://schema.org/address',
|
16
|
+
street: 'https://schema.org/streetAddress',
|
17
|
+
city: 'https://schema.org/addressLocality',
|
18
|
+
state: 'https://schema.org/addressRegion',
|
19
|
+
country: 'https://schema.org/addressCountry',
|
20
|
+
postalCode: 'https://schema.org/postalCode',
|
21
|
+
socialLinks: {
|
22
|
+
'@id': 'https://schema.org/URL',
|
23
|
+
'@container': '@set',
|
24
|
+
},
|
25
|
+
linkedin: 'https://schema.org/sameAs',
|
26
|
+
github: 'https://schema.org/sameAs',
|
27
|
+
portfolio: 'https://schema.org/url',
|
28
|
+
twitter: 'https://schema.org/sameAs',
|
29
|
+
// Experience & Employment History
|
30
|
+
experience: {
|
31
|
+
'@id': 'https://schema.org/WorkExperience',
|
32
|
+
'@container': '@list',
|
33
|
+
},
|
9
34
|
employmentHistory: {
|
10
35
|
'@id': 'https://schema.org/employmentHistory',
|
11
|
-
'@container': '@list',
|
36
|
+
'@container': '@list',
|
12
37
|
},
|
13
|
-
company: 'https://schema.org/
|
38
|
+
company: 'https://schema.org/worksFor',
|
14
39
|
position: 'https://schema.org/jobTitle',
|
40
|
+
description: 'https://schema.org/description',
|
41
|
+
startDate: 'https://schema.org/startDate',
|
42
|
+
endDate: 'https://schema.org/endDate',
|
43
|
+
stillEmployed: 'https://schema.org/Boolean',
|
15
44
|
duration: 'https://schema.org/temporalCoverage',
|
45
|
+
// Skills
|
16
46
|
skills: {
|
17
47
|
'@id': 'https://schema.org/skills',
|
18
|
-
'@container': '@list',
|
48
|
+
'@container': '@list',
|
19
49
|
},
|
20
|
-
|
21
|
-
|
22
|
-
|
50
|
+
// Education
|
51
|
+
educationAndLearning: {
|
52
|
+
'@id': 'https://schema.org/EducationalOccupationalProgram',
|
53
|
+
'@container': '@list',
|
54
|
+
},
|
55
|
+
degree: 'https://schema.org/educationalCredentialAwarded',
|
56
|
+
fieldOfStudy: 'https://schema.org/studyField',
|
57
|
+
institution: 'https://schema.org/educationalInstitution',
|
23
58
|
year: 'https://schema.org/year',
|
24
|
-
|
59
|
+
// Awards
|
60
|
+
awards: {
|
61
|
+
'@id': 'https://schema.org/Achievement',
|
62
|
+
'@container': '@list',
|
63
|
+
},
|
64
|
+
title: 'https://schema.org/name',
|
25
65
|
issuer: 'https://schema.org/issuer',
|
66
|
+
date: 'https://schema.org/dateReceived',
|
67
|
+
// Publications
|
68
|
+
publications: {
|
69
|
+
'@id': 'https://schema.org/CreativeWork',
|
70
|
+
'@container': '@list',
|
71
|
+
},
|
72
|
+
publisher: 'https://schema.org/publisher',
|
73
|
+
url: 'https://schema.org/url',
|
74
|
+
// Certifications
|
75
|
+
certifications: {
|
76
|
+
'@id': 'https://schema.org/EducationalOccupationalCredential',
|
77
|
+
'@container': '@list',
|
78
|
+
},
|
79
|
+
// Professional Affiliations
|
80
|
+
professionalAffiliations: {
|
81
|
+
'@id': 'https://schema.org/OrganizationRole',
|
82
|
+
'@container': '@list',
|
83
|
+
},
|
84
|
+
organization: 'https://schema.org/memberOf',
|
85
|
+
role: 'https://schema.org/jobTitle',
|
86
|
+
// Volunteer Work
|
87
|
+
volunteerWork: {
|
88
|
+
'@id': 'https://schema.org/VolunteerRole',
|
89
|
+
'@container': '@list',
|
90
|
+
},
|
91
|
+
// Hobbies and Interests
|
92
|
+
hobbiesAndInterests: {
|
93
|
+
'@id': 'https://schema.org/knowsAbout',
|
94
|
+
'@container': '@set',
|
95
|
+
},
|
96
|
+
// Languages
|
97
|
+
languages: {
|
98
|
+
'@id': 'https://schema.org/knowsLanguage',
|
99
|
+
'@container': '@list',
|
100
|
+
},
|
101
|
+
language: 'https://schema.org/inLanguage',
|
102
|
+
proficiency: 'https://schema.org/proficiencyLevel',
|
103
|
+
// Testimonials
|
104
|
+
testimonials: {
|
105
|
+
'@id': 'https://schema.org/Review',
|
106
|
+
'@container': '@list',
|
107
|
+
},
|
108
|
+
author: 'https://schema.org/author',
|
109
|
+
// Projects
|
110
|
+
projects: {
|
111
|
+
'@id': 'https://schema.org/Project',
|
112
|
+
'@container': '@list',
|
113
|
+
},
|
114
|
+
// Issuance Information
|
115
|
+
issuanceDate: 'https://schema.org/issuanceDate',
|
26
116
|
credentialSubject: 'https://schema.org/credentialSubject',
|
27
|
-
person: 'https://schema.org/Person', //
|
28
|
-
Resume: 'https://schema.hropenstandards.org/4.4#Resume',
|
117
|
+
person: 'https://schema.org/Person', // Map to Person schema
|
118
|
+
Resume: 'https://schema.hropenstandards.org/4.4#Resume',
|
29
119
|
},
|
30
120
|
};
|
31
121
|
let localOBContext = {
|