@learncard/ler-rs-plugin 0.1.3 → 0.1.4

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.
@@ -0,0 +1,3 @@
1
+ export { getLerRsPlugin } from './ler-rs';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./ler-rs-plugin.cjs.production.min.js');
5
+ } else {
6
+ module.exports = require('./ler-rs-plugin.cjs.development.js');
7
+ }
@@ -0,0 +1,410 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ LEGACY_LER_RS_TYPE_TOKEN: () => LEGACY_LER_RS_TYPE_TOKEN,
25
+ LEGACY_LER_RS_TYPE_URI_V44: () => LEGACY_LER_RS_TYPE_URI_V44,
26
+ LER_RS_CREDENTIAL_CONTEXT_V1: () => LER_RS_CREDENTIAL_CONTEXT_V1,
27
+ LER_RS_CREDENTIAL_CONTEXT_V2: () => LER_RS_CREDENTIAL_CONTEXT_V2,
28
+ LER_RS_TYPE_URI_V45: () => LER_RS_TYPE_URI_V45,
29
+ LER_RS_VC_CONTEXT_V45: () => LER_RS_VC_CONTEXT_V45,
30
+ TCP_CONTEXT_V1: () => TCP_CONTEXT_V1,
31
+ TCP_WRAPPER_TYPE: () => TCP_WRAPPER_TYPE,
32
+ getLerRsPlugin: () => getLerRsPlugin
33
+ });
34
+ module.exports = __toCommonJS(src_exports);
35
+
36
+ // src/types.ts
37
+ var LER_RS_CREDENTIAL_CONTEXT_V1 = "https://www.w3.org/2018/credentials/v1";
38
+ var LER_RS_CREDENTIAL_CONTEXT_V2 = "https://www.w3.org/ns/credentials/v2";
39
+ var LER_RS_VC_CONTEXT_V45 = "http://schema.hropenstandards.org/4.5/recruiting/json/VerifiableCredentialLER-RSType.json";
40
+ var LER_RS_TYPE_URI_V45 = "http://schema.hropenstandards.org/4.5/recruiting/json/LER-RSType.json";
41
+ var LEGACY_LER_RS_TYPE_URI_V44 = "http://schema.hropenstandards.org/4.4/recruiting/json/ler-rs/LER-RSType.json";
42
+ var LEGACY_LER_RS_TYPE_TOKEN = "LERRS";
43
+ var TCP_CONTEXT_V1 = "https://ctx.learncard.com/tcp/1.0.0.json";
44
+ var TCP_WRAPPER_TYPE = "TrustedCareerProfile";
45
+
46
+ // src/ler-rs.ts
47
+ var getItemVerifications = /* @__PURE__ */ __name((item) => {
48
+ if (item.verifications?.length)
49
+ return item.verifications;
50
+ if (item.verifiableCredential)
51
+ return [item.verifiableCredential];
52
+ return [];
53
+ }, "getItemVerifications");
54
+ var toArray = /* @__PURE__ */ __name((maybe) => maybe == null ? [] : Array.isArray(maybe) ? maybe : [maybe], "toArray");
55
+ var inlineLerRsContext = {
56
+ "@version": 1.1,
57
+ hrrec: "http://schema.hropenstandards.org/recruiting/",
58
+ "@vocab": "http://schema.hropenstandards.org/recruiting/"
59
+ };
60
+ var credentialHasLerRsType = /* @__PURE__ */ __name((credential) => {
61
+ const typeList = Array.isArray(credential.type) ? credential.type : [credential.type];
62
+ if (typeList.some(
63
+ (type) => [LEGACY_LER_RS_TYPE_TOKEN, LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(
64
+ type
65
+ )
66
+ ))
67
+ return true;
68
+ const credentialSubject = credential.credentialSubject;
69
+ if (!credentialSubject)
70
+ return false;
71
+ const inlineType = credentialSubject.type;
72
+ if (typeof inlineType === "string" && [LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(inlineType))
73
+ return true;
74
+ const nestedType = credentialSubject.lerrsType?.type;
75
+ return typeof nestedType === "string" && [LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(nestedType);
76
+ }, "credentialHasLerRsType");
77
+ var buildEmploymentHistories = /* @__PURE__ */ __name((items) => {
78
+ return items.map((item) => {
79
+ const {
80
+ narrative,
81
+ descriptions,
82
+ verifiableCredential,
83
+ verifications,
84
+ position,
85
+ employer,
86
+ start,
87
+ end,
88
+ current,
89
+ ...rest
90
+ } = item;
91
+ const container = { ...rest };
92
+ if (typeof current === "boolean")
93
+ container.current = current;
94
+ if (employer)
95
+ container.organization = { tradeName: employer };
96
+ if (position || start || end || typeof current === "boolean") {
97
+ const ph = {};
98
+ if (position)
99
+ ph.title = position;
100
+ if (start)
101
+ ph.start = start;
102
+ if (end)
103
+ ph.end = end;
104
+ if (typeof current === "boolean")
105
+ ph.current = current;
106
+ if (descriptions?.length)
107
+ ph.descriptions = descriptions;
108
+ container.positionHistories = [ph];
109
+ }
110
+ if (narrative)
111
+ container.narrative = narrative;
112
+ if (descriptions?.length && !container.positionHistories)
113
+ container.descriptions = descriptions;
114
+ const containerVerifications = getItemVerifications({
115
+ verifiableCredential,
116
+ verifications
117
+ });
118
+ return {
119
+ ...container,
120
+ ...containerVerifications.length ? { verifications: containerVerifications } : {}
121
+ };
122
+ });
123
+ }, "buildEmploymentHistories");
124
+ var buildEducationAndLearnings = /* @__PURE__ */ __name((items) => {
125
+ return items.map((item) => {
126
+ const {
127
+ narrative,
128
+ descriptions,
129
+ verifiableCredential,
130
+ verifications,
131
+ institution,
132
+ start,
133
+ end,
134
+ current,
135
+ degree,
136
+ specializations,
137
+ ...rest
138
+ } = item;
139
+ const container = { ...rest };
140
+ if (institution)
141
+ container.institution = { name: institution };
142
+ if (start)
143
+ container.start = start;
144
+ if (end)
145
+ container.end = end;
146
+ if (typeof current === "boolean")
147
+ container.current = current;
148
+ if (descriptions?.length)
149
+ container.descriptions = descriptions;
150
+ if (degree || specializations) {
151
+ container.educationDegrees = [
152
+ {
153
+ ...degree ? { name: degree } : {},
154
+ ...specializations ? {
155
+ specializations: specializations.map((specialization) => ({
156
+ name: specialization
157
+ }))
158
+ } : {}
159
+ }
160
+ ];
161
+ }
162
+ if (narrative)
163
+ container.narrative = narrative;
164
+ const containerVerifications = getItemVerifications({
165
+ verifiableCredential,
166
+ verifications
167
+ });
168
+ return {
169
+ ...container,
170
+ ...containerVerifications.length ? { verifications: containerVerifications } : {}
171
+ };
172
+ });
173
+ }, "buildEducationAndLearnings");
174
+ var buildCertifications = /* @__PURE__ */ __name((items) => {
175
+ return items.map((item) => {
176
+ const {
177
+ narrative,
178
+ descriptions,
179
+ start,
180
+ end,
181
+ effectiveTimePeriod,
182
+ verifiableCredential,
183
+ verifications,
184
+ ...rest
185
+ } = item;
186
+ const container = { ...rest };
187
+ if (narrative)
188
+ container.narrative = narrative;
189
+ if (descriptions?.length)
190
+ container.descriptions = descriptions;
191
+ if (effectiveTimePeriod || start || end) {
192
+ container.effectiveTimePeriod = {
193
+ ...effectiveTimePeriod ?? {},
194
+ ...start ? { validFrom: start } : {},
195
+ ...end ? { validTo: end } : {}
196
+ };
197
+ }
198
+ const containerVerifications = getItemVerifications({
199
+ verifiableCredential,
200
+ verifications
201
+ });
202
+ return {
203
+ ...container,
204
+ ...containerVerifications.length ? { verifications: containerVerifications } : {}
205
+ };
206
+ });
207
+ }, "buildCertifications");
208
+ var getLerRsPlugin = /* @__PURE__ */ __name((initLearnCard) => {
209
+ return {
210
+ name: "LER-RS",
211
+ displayName: "LER-RS",
212
+ description: "Create, package, and verify Learning & Employment Record Resume (LER-RS) credentials",
213
+ methods: {
214
+ createLerRecord: async (_learnCard, params) => {
215
+ const signer = params.learnCard ?? _learnCard;
216
+ const did = signer.id.did();
217
+ const issuedAt = new Date().toISOString();
218
+ const documentId = crypto.randomUUID();
219
+ const personSection = {
220
+ name: {
221
+ given: params.person.givenName,
222
+ family: params.person.familyName,
223
+ formattedName: params.person.formattedName ?? `${params.person.givenName} ${params.person.familyName}`
224
+ }
225
+ };
226
+ const hasAddress = !!params.person.address?.formattedAddress || !!params.person.address?.line || !!params.person.address?.city || !!params.person.address?.postalCode || !!params.person.address?.countryCode;
227
+ const webEntries = (params.person.web || []).filter((entry) => entry?.url);
228
+ const socialEntries = (params.person.social || []).filter((entry) => entry?.uri);
229
+ const communication = params.person.email || params.person.phone || hasAddress || webEntries.length > 0 || socialEntries.length > 0 ? {
230
+ ...params.person.email ? { email: [{ address: params.person.email }] } : {},
231
+ ...params.person.phone ? { phone: [{ formattedNumber: params.person.phone }] } : {},
232
+ ...webEntries.length ? { web: webEntries.map((entry) => ({ url: entry.url, name: entry.name })) } : {},
233
+ ...socialEntries.length ? {
234
+ social: socialEntries.map((entry) => ({
235
+ uri: entry.uri,
236
+ ...entry.name ? { name: entry.name } : {}
237
+ }))
238
+ } : {},
239
+ ...hasAddress ? {
240
+ address: [
241
+ {
242
+ ...params.person.address?.formattedAddress ? {
243
+ formattedAddress: params.person.address.formattedAddress
244
+ } : {},
245
+ ...params.person.address?.line ? { line: params.person.address.line } : {},
246
+ ...params.person.address?.city ? { city: params.person.address.city } : {},
247
+ ...params.person.address?.postalCode ? { postalCode: params.person.address.postalCode } : {},
248
+ ...params.person.address?.countryCode ? {
249
+ countryCode: params.person.address.countryCode
250
+ } : {}
251
+ }
252
+ ]
253
+ } : {}
254
+ } : void 0;
255
+ const lerRecord = {
256
+ type: LER_RS_TYPE_URI_V45,
257
+ documentId: { value: documentId },
258
+ person: personSection,
259
+ ...communication ? { communication } : {},
260
+ skills: (params.skills || []).map((s) => ({ name: s })),
261
+ narratives: params.narratives,
262
+ employmentHistories: params.workHistory ? buildEmploymentHistories(params.workHistory) : void 0,
263
+ educationAndLearnings: params.educationHistory ? buildEducationAndLearnings(params.educationHistory) : void 0,
264
+ certifications: params.certifications ? buildCertifications(params.certifications) : void 0,
265
+ attachments: params.attachments
266
+ };
267
+ const unsignedVC = {
268
+ "@context": [LER_RS_CREDENTIAL_CONTEXT_V2, inlineLerRsContext],
269
+ id: `urn:uuid:${documentId}`,
270
+ type: ["VerifiableCredential", LER_RS_TYPE_URI_V45],
271
+ issuer: did,
272
+ validFrom: issuedAt,
273
+ credentialSubject: {
274
+ id: params.person.id,
275
+ ...lerRecord
276
+ }
277
+ };
278
+ return initLearnCard.invoke.issueCredential(unsignedVC, {
279
+ proofPurpose: "assertionMethod"
280
+ });
281
+ },
282
+ createLerPresentation: async (_learnCard, params) => {
283
+ const signer = params.learnCard ?? _learnCard;
284
+ const did = signer.id.did();
285
+ if (!params.credentials.length)
286
+ throw new Error(
287
+ "createLerPresentation: credentials array must contain at least one credential"
288
+ );
289
+ const containsLer = params.credentials.some(credentialHasLerRsType);
290
+ if (!containsLer)
291
+ throw new Error(
292
+ "createLerPresentation: credentials must include at least one LER-RS credential"
293
+ );
294
+ const vp = {
295
+ "@context": [LER_RS_CREDENTIAL_CONTEXT_V2],
296
+ type: ["VerifiablePresentation"],
297
+ holder: did,
298
+ verifiableCredential: params.credentials.length === 1 ? params.credentials[0] : params.credentials
299
+ };
300
+ return initLearnCard.invoke.issuePresentation(vp, {
301
+ ...params.domain ? { domain: params.domain } : {},
302
+ ...params.challenge ? { challenge: params.challenge } : {}
303
+ });
304
+ },
305
+ verifyLerPresentation: async (_learnCard, { presentation, domain, challenge }) => {
306
+ const presCheck = await initLearnCard.invoke.verifyPresentation(presentation, {
307
+ ...domain ? { domain } : {},
308
+ ...challenge ? { challenge } : {}
309
+ });
310
+ const presentationResult = {
311
+ verified: presCheck.errors.length === 0,
312
+ errors: presCheck.errors.length ? presCheck.errors : void 0
313
+ };
314
+ const credentialResults = [];
315
+ if (typeof presentation !== "string") {
316
+ const holder = presentation.holder;
317
+ const vcs = toArray(
318
+ presentation.verifiableCredential
319
+ );
320
+ for (const credential of vcs) {
321
+ try {
322
+ const credCheck = await initLearnCard.invoke.verifyCredential(
323
+ credential
324
+ );
325
+ const issuerDid = typeof credential.issuer === "string" ? credential.issuer : credential.issuer?.id;
326
+ const isSelfIssued = credentialHasLerRsType(credential) || !!holder && !!issuerDid && issuerDid === holder;
327
+ credentialResults.push({
328
+ credential,
329
+ verified: credCheck.errors.length === 0,
330
+ isSelfIssued,
331
+ errors: credCheck.errors.length ? credCheck.errors : void 0
332
+ });
333
+ } catch (err) {
334
+ credentialResults.push({
335
+ credential,
336
+ verified: false,
337
+ isSelfIssued: false,
338
+ errors: [
339
+ err instanceof Error ? err.message : "Unknown error verifying credential"
340
+ ]
341
+ });
342
+ }
343
+ }
344
+ }
345
+ return {
346
+ verified: presentationResult.verified && credentialResults.every((r) => r.verified || r.isSelfIssued),
347
+ presentationResult,
348
+ credentialResults
349
+ };
350
+ },
351
+ createTcpWrapperVc: async (_learnCard, params) => {
352
+ const signer = params.learnCard ?? _learnCard;
353
+ const did = signer.id.did();
354
+ const issuedAt = params.issuanceDate ?? new Date().toISOString();
355
+ const generatedAt = params.generatedAt ?? issuedAt;
356
+ const subjectDid = params.subjectDid ?? did;
357
+ if (params.enableCoSign) {
358
+ throw new Error("createTcpWrapperVc: co-signing is not enabled in MVP");
359
+ }
360
+ if (params.coSignerDid) {
361
+ throw new Error(
362
+ "createTcpWrapperVc: coSignerDid is reserved for future co-sign support"
363
+ );
364
+ }
365
+ const inlineTcpContext = {
366
+ "@version": 1.1,
367
+ id: "@id",
368
+ type: "@type",
369
+ TrustedCareerProfile: "https://ctx.learncard.com/tcp#TrustedCareerProfile",
370
+ ResumePackage: "https://ctx.learncard.com/tcp#ResumePackage",
371
+ pdfUrl: {
372
+ "@id": "https://ctx.learncard.com/tcp#pdfUrl",
373
+ "@type": "@id"
374
+ },
375
+ pdfHash: "https://ctx.learncard.com/tcp#pdfHash",
376
+ hashAlgorithm: "https://ctx.learncard.com/tcp#hashAlgorithm",
377
+ includedCredentials: {
378
+ "@id": "https://ctx.learncard.com/tcp#includedCredentials",
379
+ "@container": "@set"
380
+ },
381
+ category: "https://ctx.learncard.com/tcp#category",
382
+ generatedAt: {
383
+ "@id": "https://ctx.learncard.com/tcp#generatedAt",
384
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
385
+ }
386
+ };
387
+ const unsignedVC = {
388
+ "@context": [LER_RS_CREDENTIAL_CONTEXT_V2, inlineTcpContext],
389
+ type: ["VerifiableCredential", TCP_WRAPPER_TYPE],
390
+ id: params.wrapperId,
391
+ issuer: did,
392
+ validFrom: issuedAt,
393
+ credentialSubject: {
394
+ id: subjectDid,
395
+ type: "ResumePackage",
396
+ pdfUrl: params.pdfUrl,
397
+ pdfHash: params.pdfHash,
398
+ hashAlgorithm: "SHA-256",
399
+ includedCredentials: params.includedCredentials,
400
+ generatedAt
401
+ }
402
+ };
403
+ return initLearnCard.invoke.issueCredential(unsignedVC, {
404
+ proofPurpose: "assertionMethod"
405
+ });
406
+ }
407
+ }
408
+ };
409
+ }, "getLerRsPlugin");
410
+ //# sourceMappingURL=ler-rs-plugin.cjs.development.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/types.ts", "../src/ler-rs.ts"],
4
+ "sourcesContent": ["export { getLerRsPlugin } from './ler-rs';\nexport * from './types';\n", "import { Plugin, LearnCard } from '@learncard/core';\nimport {\n VC as VerifiableCredential,\n VP as VerifiablePresentation,\n UnsignedVC,\n UnsignedVP,\n VerificationCheck,\n} from '@learncard/types';\nimport type { VCPluginMethods, VCPluginDependentMethods } from '@learncard/vc-plugin';\n\n/**\n * Legacy W3C VC v1 context kept for interop with previously issued records.\n */\nexport const LER_RS_CREDENTIAL_CONTEXT_V1 = 'https://www.w3.org/2018/credentials/v1';\n/**\n * Base W3C VC v2 context used by newly issued LER-RS credentials and presentations.\n */\nexport const LER_RS_CREDENTIAL_CONTEXT_V2 = 'https://www.w3.org/ns/credentials/v2';\n/**\n * HR Open Standards VC wrapper context for LER-RS v4.5.\n */\nexport const LER_RS_VC_CONTEXT_V45 =\n 'http://schema.hropenstandards.org/4.5/recruiting/json/VerifiableCredentialLER-RSType.json';\n/**\n * Canonical LER-RS type URI for v4.5.\n */\nexport const LER_RS_TYPE_URI_V45 =\n 'http://schema.hropenstandards.org/4.5/recruiting/json/LER-RSType.json';\n/**\n * Legacy LER-RS type URI for v4.4 interop.\n */\nexport const LEGACY_LER_RS_TYPE_URI_V44 =\n 'http://schema.hropenstandards.org/4.4/recruiting/json/ler-rs/LER-RSType.json';\n/**\n * Legacy short type token used by older issuers.\n */\nexport const LEGACY_LER_RS_TYPE_TOKEN = 'LERRS';\n/**\n * Hosted TCP JSON-LD context URL.\n *\n * Note: current local wrapper issuance can inline context during local testing.\n */\nexport const TCP_CONTEXT_V1 = 'https://ctx.learncard.com/tcp/1.0.0.json';\n/**\n * LearnCard-defined wrapper VC type for TCP resume package artifacts.\n *\n * This is intentionally NOT a canonical HR Open Standards LER-RS type;\n * it is a custom wrapper used to bind PDF URL/hash + included credential refs.\n */\nexport const TCP_WRAPPER_TYPE = 'TrustedCareerProfile';\n\n/**\n * Identity details used to populate `credentialSubject.person`.\n */\nexport interface PersonProfile {\n /** Subject DID for the issued LER-RS record. */\n id: string;\n /** Given/first name. */\n givenName: string;\n /** Family/last name. */\n familyName: string;\n /** Optional display name override. */\n formattedName?: string;\n /** Optional contact email to include in communication block. */\n email?: string;\n /** Optional contact phone to include in communication block. */\n phone?: string;\n /** Optional physical/mailing address to include in communication block. */\n address?: {\n formattedAddress?: string;\n line?: string;\n city?: string;\n postalCode?: string;\n countryCode?: string;\n };\n /** Optional website URLs to include in communication block. */\n web?: Array<{ url: string; name?: string }>;\n /** Optional social profile URLs to include in communication block. */\n social?: Array<{ uri: string; name?: string }>;\n}\n\n/**\n * Skill item structure used inside generated LER-RS records.\n */\nexport interface LerSkill {\n name: string;\n comments?: string[];\n description?: string;\n yearsOfExperience?: number;\n endorsers?: Array<{\n person?: { name?: { formattedName?: string } };\n organization?: { name?: string };\n }>;\n}\n\n/**\n * Source work history entry. Can be self-asserted fields and/or third-party verification VCs.\n */\nexport interface WorkHistoryItem {\n narrative?: string;\n descriptions?: string[];\n verifiableCredential?: VerifiableCredential;\n verifications?: VerifiableCredential[];\n // Common self-asserted fields\n position?: string;\n employer?: string;\n start?: string;\n end?: string;\n current?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Source education entry. Can include freeform fields and optional verification VCs.\n */\nexport interface EducationHistoryItem {\n narrative?: string;\n descriptions?: string[];\n verifiableCredential?: VerifiableCredential;\n verifications?: VerifiableCredential[];\n institution?: string;\n start?: string;\n end?: string;\n current?: boolean;\n degree?: string;\n specializations?: string[];\n [key: string]: unknown;\n}\n\n/**\n * Source certification entry for `credentialSubject.certifications`.\n */\nexport interface CertificationItem {\n narrative?: string;\n descriptions?: string[];\n verifiableCredential?: VerifiableCredential;\n verifications?: VerifiableCredential[];\n name?: string;\n issuingAuthority?: string | Record<string, unknown>;\n status?: string;\n start?: string;\n end?: string;\n effectiveTimePeriod?: { validFrom?: string; validTo?: string };\n [key: string]: unknown;\n}\n\n/**\n * Narrative section block supported by LER-RS schema.\n */\nexport interface LerNarrative {\n name: string;\n texts: Array<{\n name: string;\n lines: string[];\n }>;\n}\n\n/**\n * Typed shape of the LER-RS object embedded into `credentialSubject`.\n */\nexport interface LerRsRecord {\n type: string;\n documentId?: { value: string };\n person: {\n name: {\n given: string;\n family: string;\n formattedName?: string;\n };\n };\n communication?: {\n email?: { address: string }[];\n web?: { url: string; name?: string }[];\n phone?: Array<Record<string, unknown>>;\n address?: Array<Record<string, unknown>>;\n social?: Array<Record<string, unknown>>;\n };\n skills?: LerSkill[];\n narratives?: LerNarrative[];\n educationAndLearnings?: Array<\n { verifications?: VerifiableCredential[] } & Record<string, unknown>\n >;\n employmentHistories?: Array<\n { verifications?: VerifiableCredential[] } & Record<string, unknown>\n >;\n licenses?: Array<{ verifications?: VerifiableCredential[] } & Record<string, unknown>>;\n certifications?: Array<{ verifications?: VerifiableCredential[] } & Record<string, unknown>>;\n employmentPreferences?: Array<Record<string, unknown>>;\n positionPreferences?: Array<Record<string, unknown>>;\n attachments?: Array<Record<string, unknown>>;\n}\n\n/**\n * Parameters for issuing a signed LER-RS VC from normalized source data.\n */\nexport interface CreateLerRecordParams {\n learnCard: LearnCard<any, 'id', VCPluginMethods & VCPluginDependentMethods>;\n person: PersonProfile;\n workHistory?: WorkHistoryItem[];\n educationHistory?: EducationHistoryItem[];\n certifications?: CertificationItem[];\n skills?: string[];\n narratives?: LerNarrative[];\n attachments?: Array<Record<string, unknown>>;\n}\n\n/**\n * Parameters for issuing a VP that packages one or more credentials including at least one LER-RS credential.\n */\nexport interface CreateLerPresentationParams {\n learnCard: LearnCard<any, 'id', VCPluginMethods & VCPluginDependentMethods>;\n credentials: VerifiableCredential[];\n domain?: string;\n challenge?: string;\n}\n\n/**\n * Parameters for verifying a LER-focused VP and nested credentials.\n */\nexport interface VerifyLerPresentationParams {\n presentation: VerifiablePresentation | string;\n domain?: string;\n challenge?: string;\n}\n\n/**\n * Credential reference stored in TCP wrapper VC.\n */\nexport interface TcpIncludedCredentialRef {\n /** Resolved VC id when available; falls back to URI if id is unavailable. */\n id: string;\n /** Category label used for UI grouping and downstream filtering. */\n category: string;\n}\n\n/**\n * Parameters for issuing TrustedCareerProfile wrapper VCs.\n */\nexport interface CreateTcpWrapperVcParams {\n learnCard: LearnCard<any, 'id', VCPluginMethods & VCPluginDependentMethods>;\n wrapperId: string;\n subjectDid?: string;\n pdfUrl: string;\n pdfHash: string;\n includedCredentials: TcpIncludedCredentialRef[];\n generatedAt?: string;\n /** Timestamp used as the issued credential's `validFrom` value. */\n issuanceDate?: string;\n coSignerDid?: string;\n enableCoSign?: boolean;\n}\n\n/**\n * Structured verification output for LER presentation verification.\n */\nexport interface VerificationResult {\n verified: boolean; // Overall status\n presentationResult: {\n verified: boolean;\n errors?: string[];\n };\n credentialResults: {\n credential: VerifiableCredential;\n verified: boolean;\n isSelfIssued: boolean;\n errors?: string[];\n }[];\n}\n\n/**\n * LearnCard dependency contract required by this plugin.\n */\nexport type LERRSDependentLearnCard = LearnCard<\n any,\n 'id',\n VCPluginMethods & VCPluginDependentMethods\n>;\n\n/**\n * Public invoke methods exposed by the LER-RS plugin.\n */\nexport type LERRSPluginMethods = {\n createLerRecord: (params: CreateLerRecordParams) => Promise<VerifiableCredential>;\n createLerPresentation: (params: CreateLerPresentationParams) => Promise<VerifiablePresentation>;\n verifyLerPresentation: (params: VerifyLerPresentationParams) => Promise<VerificationResult>;\n createTcpWrapperVc: (params: CreateTcpWrapperVcParams) => Promise<VerifiableCredential>;\n};\n\n/**\n * Plugin type definition for registration in LearnCard.\n */\nexport type LERRSPlugin = Plugin<\n 'LER-RS',\n never,\n LERRSPluginMethods,\n 'id',\n VCPluginMethods & VCPluginDependentMethods\n>;\n", "import {\n VC as VerifiableCredential,\n UnsignedVC,\n VP as VerifiablePresentation,\n UnsignedVP,\n} from '@learncard/types';\nimport {\n LERRSDependentLearnCard,\n LERRSPlugin,\n CreateLerRecordParams,\n CreateLerPresentationParams,\n VerifyLerPresentationParams,\n VerificationResult,\n LerRsRecord,\n LER_RS_CREDENTIAL_CONTEXT_V2,\n LER_RS_TYPE_URI_V45,\n LEGACY_LER_RS_TYPE_URI_V44,\n LEGACY_LER_RS_TYPE_TOKEN,\n TCP_WRAPPER_TYPE,\n} from './types';\n\n/**\n * Normalizes verification containers from either:\n * - `verifications: VC[]`\n * - `verifiableCredential: VC`\n */\nconst getItemVerifications = (item: {\n verifiableCredential?: VerifiableCredential;\n verifications?: VerifiableCredential[];\n}): VerifiableCredential[] => {\n if (item.verifications?.length) return item.verifications;\n if (item.verifiableCredential) return [item.verifiableCredential];\n return [];\n};\n\n/**\n * Converts scalar-or-array values into a normalized array.\n */\nconst toArray = <T>(maybe: T | T[] | undefined): T[] =>\n maybe == null ? [] : Array.isArray(maybe) ? maybe : [maybe];\n\n/**\n * Inline LER-RS JSON-LD context used for signing stability.\n *\n * The published HR Open URL is schema-oriented and can trigger additional remote\n * context resolution during expansion. Inlining this base context avoids network\n * dependency at issue time while preserving deterministic term expansion.\n */\nconst inlineLerRsContext = {\n '@version': 1.1,\n hrrec: 'http://schema.hropenstandards.org/recruiting/',\n '@vocab': 'http://schema.hropenstandards.org/recruiting/',\n};\n\n/**\n * Determines whether a VC represents a LER-RS credential (legacy and current forms).\n *\n * Checks:\n * - VC `type` array/token values\n * - `credentialSubject.type`\n * - nested `credentialSubject.lerrsType.type`\n */\nconst credentialHasLerRsType = (credential: VerifiableCredential): boolean => {\n const typeList = Array.isArray(credential.type) ? credential.type : [credential.type];\n if (\n typeList.some(type =>\n [LEGACY_LER_RS_TYPE_TOKEN, LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(\n type\n )\n )\n )\n return true;\n\n const credentialSubject = credential.credentialSubject as Record<string, unknown> | undefined;\n if (!credentialSubject) return false;\n\n const inlineType = credentialSubject.type;\n if (\n typeof inlineType === 'string' &&\n [LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(inlineType)\n )\n return true;\n\n const nestedType = (credentialSubject.lerrsType as Record<string, unknown> | undefined)?.type;\n return (\n typeof nestedType === 'string' &&\n [LEGACY_LER_RS_TYPE_URI_V44, LER_RS_TYPE_URI_V45].includes(nestedType)\n );\n};\n\n/**\n * Maps application work history items to LER-RS `employmentHistories` shape.\n */\nconst buildEmploymentHistories = (\n items: NonNullable<CreateLerRecordParams['workHistory']>\n): LerRsRecord['employmentHistories'] => {\n return items.map(item => {\n const {\n narrative,\n descriptions,\n verifiableCredential,\n verifications,\n position,\n employer,\n start,\n end,\n current,\n ...rest\n } = item;\n\n const container: Record<string, unknown> = { ...rest };\n if (typeof current === 'boolean') container.current = current;\n\n if (employer) container.organization = { tradeName: employer };\n if (position || start || end || typeof current === 'boolean') {\n const ph: Record<string, unknown> = {};\n if (position) ph.title = position;\n if (start) ph.start = start;\n if (end) ph.end = end;\n if (typeof current === 'boolean') ph.current = current;\n if (descriptions?.length) ph.descriptions = descriptions;\n container.positionHistories = [ph];\n }\n if (narrative) container.narrative = narrative;\n if (descriptions?.length && !container.positionHistories) container.descriptions = descriptions;\n\n const containerVerifications = getItemVerifications({\n verifiableCredential,\n verifications,\n });\n return {\n ...container,\n ...(containerVerifications.length ? { verifications: containerVerifications } : {}),\n };\n });\n};\n\n/**\n * Maps education source items into LER-RS `educationAndLearnings`.\n */\nconst buildEducationAndLearnings = (\n items: NonNullable<CreateLerRecordParams['educationHistory']>\n): LerRsRecord['educationAndLearnings'] => {\n return items.map(item => {\n const {\n narrative,\n descriptions,\n verifiableCredential,\n verifications,\n institution,\n start,\n end,\n current,\n degree,\n specializations,\n ...rest\n } = item;\n\n const container: Record<string, unknown> = { ...rest };\n if (institution) container.institution = { name: institution };\n if (start) container.start = start;\n if (end) container.end = end;\n if (typeof current === 'boolean') container.current = current;\n if (descriptions?.length) container.descriptions = descriptions;\n if (degree || specializations) {\n container.educationDegrees = [\n {\n ...(degree ? { name: degree } : {}),\n ...(specializations\n ? {\n specializations: specializations.map(specialization => ({\n name: specialization,\n })),\n }\n : {}),\n },\n ];\n }\n if (narrative) container.narrative = narrative;\n\n const containerVerifications = getItemVerifications({\n verifiableCredential,\n verifications,\n });\n return {\n ...container,\n ...(containerVerifications.length ? { verifications: containerVerifications } : {}),\n };\n });\n};\n\n/**\n * Maps certification source items to LER-RS `certifications`.\n */\nconst buildCertifications = (\n items: NonNullable<CreateLerRecordParams['certifications']>\n): LerRsRecord['certifications'] => {\n return items.map(item => {\n const {\n narrative,\n descriptions,\n start,\n end,\n effectiveTimePeriod,\n verifiableCredential,\n verifications,\n ...rest\n } = item;\n\n const container: Record<string, unknown> = { ...rest };\n if (narrative) container.narrative = narrative;\n if (descriptions?.length) container.descriptions = descriptions;\n if (effectiveTimePeriod || start || end) {\n container.effectiveTimePeriod = {\n ...(effectiveTimePeriod ?? {}),\n ...(start ? { validFrom: start } : {}),\n ...(end ? { validTo: end } : {}),\n };\n }\n\n const containerVerifications = getItemVerifications({\n verifiableCredential,\n verifications,\n });\n return {\n ...container,\n ...(containerVerifications.length ? { verifications: containerVerifications } : {}),\n };\n });\n};\n\n/**\n * Returns the LearnCard LER-RS plugin with methods for:\n * - issuing LER-RS VCs\n * - packaging/verifying LER presentations\n * - issuing TCP wrapper VCs for resume packages\n */\nexport const getLerRsPlugin = (initLearnCard: LERRSDependentLearnCard): LERRSPlugin => {\n return {\n name: 'LER-RS',\n displayName: 'LER-RS',\n description:\n 'Create, package, and verify Learning & Employment Record Resume (LER-RS) credentials',\n methods: {\n /**\n * Issues a signed LER-RS VC from normalized person/work/education/certification data.\n *\n * The method:\n * 1. Builds a compliant LER-RS `credentialSubject`\n * 2. Applies VC + LER-RS contexts\n * 3. Signs via `invoke.issueCredential`\n */\n createLerRecord: async (_learnCard, params): Promise<VerifiableCredential> => {\n const signer = params.learnCard ?? _learnCard;\n const did = signer.id.did();\n const issuedAt = new Date().toISOString();\n const documentId = crypto.randomUUID();\n\n const personSection: LerRsRecord['person'] = {\n name: {\n given: params.person.givenName,\n family: params.person.familyName,\n formattedName:\n params.person.formattedName ??\n `${params.person.givenName} ${params.person.familyName}`,\n },\n };\n\n const hasAddress =\n !!params.person.address?.formattedAddress ||\n !!params.person.address?.line ||\n !!params.person.address?.city ||\n !!params.person.address?.postalCode ||\n !!params.person.address?.countryCode;\n const webEntries = (params.person.web || []).filter(entry => entry?.url);\n const socialEntries = (params.person.social || []).filter(entry => entry?.uri);\n\n const communication: LerRsRecord['communication'] | undefined =\n params.person.email ||\n params.person.phone ||\n hasAddress ||\n webEntries.length > 0 ||\n socialEntries.length > 0\n ? {\n ...(params.person.email\n ? { email: [{ address: params.person.email }] }\n : {}),\n ...(params.person.phone\n ? { phone: [{ formattedNumber: params.person.phone }] }\n : {}),\n ...(webEntries.length\n ? { web: webEntries.map(entry => ({ url: entry.url, name: entry.name })) }\n : {}),\n ...(socialEntries.length\n ? {\n social: socialEntries.map(entry => ({\n uri: entry.uri,\n ...(entry.name ? { name: entry.name } : {}),\n })),\n }\n : {}),\n ...(hasAddress\n ? {\n address: [\n {\n ...(params.person.address?.formattedAddress\n ? {\n formattedAddress:\n params.person.address.formattedAddress,\n }\n : {}),\n ...(params.person.address?.line\n ? { line: params.person.address.line }\n : {}),\n ...(params.person.address?.city\n ? { city: params.person.address.city }\n : {}),\n ...(params.person.address?.postalCode\n ? { postalCode: params.person.address.postalCode }\n : {}),\n ...(params.person.address?.countryCode\n ? {\n countryCode:\n params.person.address.countryCode,\n }\n : {}),\n },\n ],\n }\n : {}),\n }\n : undefined;\n\n const lerRecord: LerRsRecord = {\n type: LER_RS_TYPE_URI_V45,\n documentId: { value: documentId },\n person: personSection,\n ...(communication ? { communication } : {}),\n skills: (params.skills || []).map(s => ({ name: s })),\n narratives: params.narratives,\n employmentHistories: params.workHistory\n ? buildEmploymentHistories(params.workHistory)\n : undefined,\n educationAndLearnings: params.educationHistory\n ? buildEducationAndLearnings(params.educationHistory)\n : undefined,\n certifications: params.certifications\n ? buildCertifications(params.certifications)\n : undefined,\n attachments: params.attachments,\n };\n\n const unsignedVC: UnsignedVC = {\n '@context': [LER_RS_CREDENTIAL_CONTEXT_V2, inlineLerRsContext],\n id: `urn:uuid:${documentId}`,\n type: ['VerifiableCredential', LER_RS_TYPE_URI_V45],\n issuer: did,\n validFrom: issuedAt,\n credentialSubject: {\n id: params.person.id,\n ...lerRecord,\n },\n };\n\n return initLearnCard.invoke.issueCredential(unsignedVC, {\n proofPurpose: 'assertionMethod',\n });\n },\n\n /**\n * Issues a VP containing at least one LER-RS credential.\n *\n * Throws if:\n * - credentials list is empty\n * - none of the credentials match LER-RS type checks\n */\n createLerPresentation: async (_learnCard, params): Promise<VerifiablePresentation> => {\n const signer = params.learnCard ?? _learnCard;\n const did = signer.id.did();\n\n if (!params.credentials.length)\n throw new Error(\n 'createLerPresentation: credentials array must contain at least one credential'\n );\n const containsLer = params.credentials.some(credentialHasLerRsType);\n if (!containsLer)\n throw new Error(\n 'createLerPresentation: credentials must include at least one LER-RS credential'\n );\n\n const vp: UnsignedVP = {\n '@context': [LER_RS_CREDENTIAL_CONTEXT_V2],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential:\n params.credentials.length === 1\n ? params.credentials[0]\n : params.credentials,\n };\n\n return initLearnCard.invoke.issuePresentation(vp, {\n ...(params.domain ? { domain: params.domain } : {}),\n ...(params.challenge ? { challenge: params.challenge } : {}),\n });\n },\n\n /**\n * Verifies a LER-focused VP and returns structured result details.\n *\n * Overall `verified` allows explicitly self-issued items when determining\n * final status, while still surfacing per-credential verification results.\n */\n verifyLerPresentation: async (\n _learnCard,\n { presentation, domain, challenge }: VerifyLerPresentationParams\n ): Promise<VerificationResult> => {\n const presCheck = await initLearnCard.invoke.verifyPresentation(presentation, {\n ...(domain ? { domain } : {}),\n ...(challenge ? { challenge } : {}),\n });\n\n const presentationResult = {\n verified: presCheck.errors.length === 0,\n errors: presCheck.errors.length ? presCheck.errors : undefined,\n };\n\n const credentialResults: VerificationResult['credentialResults'] = [];\n\n if (typeof presentation !== 'string') {\n const holder = presentation.holder;\n const vcs = toArray<VerifiableCredential>(\n presentation.verifiableCredential as any\n );\n\n for (const credential of vcs) {\n try {\n const credCheck = await initLearnCard.invoke.verifyCredential(\n credential\n );\n const issuerDid =\n typeof credential.issuer === 'string'\n ? credential.issuer\n : credential.issuer?.id;\n const isSelfIssued =\n credentialHasLerRsType(credential) ||\n (!!holder && !!issuerDid && issuerDid === holder);\n\n credentialResults.push({\n credential,\n verified: credCheck.errors.length === 0,\n isSelfIssued,\n errors: credCheck.errors.length ? credCheck.errors : undefined,\n });\n } catch (err) {\n credentialResults.push({\n credential,\n verified: false,\n isSelfIssued: false,\n errors: [\n err instanceof Error\n ? err.message\n : 'Unknown error verifying credential',\n ],\n });\n }\n }\n }\n\n return {\n verified:\n presentationResult.verified &&\n credentialResults.every(r => r.verified || r.isSelfIssued),\n presentationResult,\n credentialResults,\n };\n },\n\n /**\n * Issues a signed TrustedCareerProfile wrapper VC for resume package publishing.\n *\n * Includes:\n * - public PDF URL\n * - PDF SHA-256 hash\n * - included credential references\n * - generation timestamp\n *\n * Co-sign fields are intentionally stubbed for MVP and currently rejected.\n */\n createTcpWrapperVc: async (_learnCard, params): Promise<VerifiableCredential> => {\n const signer = params.learnCard ?? _learnCard;\n const did = signer.id.did();\n const issuedAt = params.issuanceDate ?? new Date().toISOString();\n const generatedAt = params.generatedAt ?? issuedAt;\n const subjectDid = params.subjectDid ?? did;\n\n if (params.enableCoSign) {\n throw new Error('createTcpWrapperVc: co-signing is not enabled in MVP');\n }\n\n if (params.coSignerDid) {\n throw new Error(\n 'createTcpWrapperVc: coSignerDid is reserved for future co-sign support'\n );\n }\n\n // NOTE: We inline the TCP context for local testing while the hosted\n // context URL is not yet available in all environments.\n const inlineTcpContext = {\n '@version': 1.1,\n id: '@id',\n type: '@type',\n TrustedCareerProfile: 'https://ctx.learncard.com/tcp#TrustedCareerProfile',\n ResumePackage: 'https://ctx.learncard.com/tcp#ResumePackage',\n pdfUrl: {\n '@id': 'https://ctx.learncard.com/tcp#pdfUrl',\n '@type': '@id',\n },\n pdfHash: 'https://ctx.learncard.com/tcp#pdfHash',\n hashAlgorithm: 'https://ctx.learncard.com/tcp#hashAlgorithm',\n includedCredentials: {\n '@id': 'https://ctx.learncard.com/tcp#includedCredentials',\n '@container': '@set',\n },\n category: 'https://ctx.learncard.com/tcp#category',\n generatedAt: {\n '@id': 'https://ctx.learncard.com/tcp#generatedAt',\n '@type': 'http://www.w3.org/2001/XMLSchema#dateTime',\n },\n };\n\n const unsignedVC: UnsignedVC = {\n '@context': [LER_RS_CREDENTIAL_CONTEXT_V2, inlineTcpContext],\n type: ['VerifiableCredential', TCP_WRAPPER_TYPE],\n id: params.wrapperId,\n issuer: did,\n validFrom: issuedAt,\n credentialSubject: {\n id: subjectDid,\n type: 'ResumePackage',\n pdfUrl: params.pdfUrl,\n pdfHash: params.pdfHash,\n hashAlgorithm: 'SHA-256',\n includedCredentials: params.includedCredentials,\n generatedAt,\n },\n };\n\n return initLearnCard.invoke.issueCredential(unsignedVC, {\n proofPurpose: 'assertionMethod',\n });\n },\n },\n };\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,IAAM,+BAA+B;AAIrC,IAAM,+BAA+B;AAIrC,IAAM,wBACT;AAIG,IAAM,sBACT;AAIG,IAAM,6BACT;AAIG,IAAM,2BAA2B;AAMjC,IAAM,iBAAiB;AAOvB,IAAM,mBAAmB;;;ACvBhC,IAAM,uBAAuB,wBAAC,SAGA;AAC1B,MAAI,KAAK,eAAe;AAAQ,WAAO,KAAK;AAC5C,MAAI,KAAK;AAAsB,WAAO,CAAC,KAAK,oBAAoB;AAChE,SAAO,CAAC;AACZ,GAP6B;AAY7B,IAAM,UAAU,wBAAI,UAChB,SAAS,OAAO,CAAC,IAAI,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK,GAD9C;AAUhB,IAAM,qBAAqB;AAAA,EACvB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,UAAU;AACd;AAUA,IAAM,yBAAyB,wBAAC,eAA8C;AA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,8BAA8B,gBAAgB;AAAA,UAC3D,MAAM,CAAC,wBAAwB,gBAAgB;AAAA,UAC/C,IAAI,OAAO;AAAA,UACX,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,mBAAmB;AAAA,YACf,IAAI;AAAA,YACJ,MAAM;AAAA,YACN,QAAQ,OAAO;AAAA,YACf,SAAS,OAAO;AAAA,YAChB,eAAe;AAAA,YACf,qBAAqB,OAAO;AAAA,YAC5B;AAAA,UACJ;AAAA,QACJ;AAEA,eAAO,cAAc,OAAO,gBAAgB,YAAY;AAAA,UACpD,cAAc;AAAA,QAClB,CAAC;AAAA,MACL;AAAA,IACJ;AAAA,EACJ;AACJ,GA5T8B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var h=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var C=(r,t)=>h(r,"name",{value:t,configurable:!0});var k=(r,t)=>{for(var e in t)h(r,e,{get:t[e],enumerable:!0})},S=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of T(t))!A.call(r,n)&&n!==e&&h(r,n,{get:()=>t[n],enumerable:!(s=w(t,n))||s.enumerable});return r};var _=r=>S(h({},"__esModule",{value:!0}),r);var Y={};k(Y,{LEGACY_LER_RS_TYPE_TOKEN:()=>P,LEGACY_LER_RS_TYPE_URI_V44:()=>y,LER_RS_CREDENTIAL_CONTEXT_V1:()=>x,LER_RS_CREDENTIAL_CONTEXT_V2:()=>m,LER_RS_TYPE_URI_V45:()=>R,LER_RS_VC_CONTEXT_V45:()=>N,TCP_CONTEXT_V1:()=>I,TCP_WRAPPER_TYPE:()=>v,getLerRsPlugin:()=>b});module.exports=_(Y);var x="https://www.w3.org/2018/credentials/v1",m="https://www.w3.org/ns/credentials/v2",N="http://schema.hropenstandards.org/4.5/recruiting/json/VerifiableCredentialLER-RSType.json",R="http://schema.hropenstandards.org/4.5/recruiting/json/LER-RSType.json",y="http://schema.hropenstandards.org/4.4/recruiting/json/ler-rs/LER-RSType.json",P="LERRS",I="https://ctx.learncard.com/tcp/1.0.0.json",v="TrustedCareerProfile";var V=C(r=>r.verifications?.length?r.verifications:r.verifiableCredential?[r.verifiableCredential]:[],"getItemVerifications"),D=C(r=>r==null?[]:Array.isArray(r)?r:[r],"toArray"),H={"@version":1.1,hrrec:"http://schema.hropenstandards.org/recruiting/","@vocab":"http://schema.hropenstandards.org/recruiting/"},L=C(r=>{if((Array.isArray(r.type)?r.type:[r.type]).some(a=>[P,y,R].includes(a)))return!0;let e=r.credentialSubject;if(!e)return!1;let s=e.type;if(typeof s=="string"&&[y,R].includes(s))return!0;let n=e.lerrsType?.type;return typeof n=="string"&&[y,R].includes(n)},"credentialHasLerRsType"),U=C(r=>r.map(t=>{let{narrative:e,descriptions:s,verifiableCredential:n,verifications:a,position:d,employer:f,start:c,end:g,current:i,...l}=t,p={...l};if(typeof i=="boolean"&&(p.current=i),f&&(p.organization={tradeName:f}),d||c||g||typeof i=="boolean"){let o={};d&&(o.title=d),c&&(o.start=c),g&&(o.end=g),typeof i=="boolean"&&(o.current=i),s?.length&&(o.descriptions=s),p.positionHistories=[o]}e&&(p.narrative=e),s?.length&&!p.positionHistories&&(p.descriptions=s);let u=V({verifiableCredential:n,verifications:a});return{...p,...u.length?{verifications:u}:{}}}),"buildEmploymentHistories"),M=C(r=>r.map(t=>{let{narrative:e,descriptions:s,verifiableCredential:n,verifications:a,institution:d,start:f,end:c,current:g,degree:i,specializations:l,...p}=t,u={...p};d&&(u.institution={name:d}),f&&(u.start=f),c&&(u.end=c),typeof g=="boolean"&&(u.current=g),s?.length&&(u.descriptions=s),(i||l)&&(u.educationDegrees=[{...i?{name:i}:{},...l?{specializations:l.map(E=>({name:E}))}:{}}]),e&&(u.narrative=e);let o=V({verifiableCredential:n,verifications:a});return{...u,...o.length?{verifications:o}:{}}}),"buildEducationAndLearnings"),j=C(r=>r.map(t=>{let{narrative:e,descriptions:s,start:n,end:a,effectiveTimePeriod:d,verifiableCredential:f,verifications:c,...g}=t,i={...g};e&&(i.narrative=e),s?.length&&(i.descriptions=s),(d||n||a)&&(i.effectiveTimePeriod={...d??{},...n?{validFrom:n}:{},...a?{validTo:a}:{}});let l=V({verifiableCredential:f,verifications:c});return{...i,...l.length?{verifications:l}:{}}}),"buildCertifications"),b=C(r=>({name:"LER-RS",displayName:"LER-RS",description:"Create, package, and verify Learning & Employment Record Resume (LER-RS) credentials",methods:{createLerRecord:async(t,e)=>{let n=(e.learnCard??t).id.did(),a=new Date().toISOString(),d=crypto.randomUUID(),f={name:{given:e.person.givenName,family:e.person.familyName,formattedName:e.person.formattedName??`${e.person.givenName} ${e.person.familyName}`}},c=!!e.person.address?.formattedAddress||!!e.person.address?.line||!!e.person.address?.city||!!e.person.address?.postalCode||!!e.person.address?.countryCode,g=(e.person.web||[]).filter(o=>o?.url),i=(e.person.social||[]).filter(o=>o?.uri),l=e.person.email||e.person.phone||c||g.length>0||i.length>0?{...e.person.email?{email:[{address:e.person.email}]}:{},...e.person.phone?{phone:[{formattedNumber:e.person.phone}]}:{},...g.length?{web:g.map(o=>({url:o.url,name:o.name}))}:{},...i.length?{social:i.map(o=>({uri:o.uri,...o.name?{name:o.name}:{}}))}:{},...c?{address:[{...e.person.address?.formattedAddress?{formattedAddress:e.person.address.formattedAddress}:{},...e.person.address?.line?{line:e.person.address.line}:{},...e.person.address?.city?{city:e.person.address.city}:{},...e.person.address?.postalCode?{postalCode:e.person.address.postalCode}:{},...e.person.address?.countryCode?{countryCode:e.person.address.countryCode}:{}}]}:{}}:void 0,p={type:R,documentId:{value:d},person:f,...l?{communication:l}:{},skills:(e.skills||[]).map(o=>({name:o})),narratives:e.narratives,employmentHistories:e.workHistory?U(e.workHistory):void 0,educationAndLearnings:e.educationHistory?M(e.educationHistory):void 0,certifications:e.certifications?j(e.certifications):void 0,attachments:e.attachments},u={"@context":[m,H],id:`urn:uuid:${d}`,type:["VerifiableCredential",R],issuer:n,validFrom:a,credentialSubject:{id:e.person.id,...p}};return r.invoke.issueCredential(u,{proofPurpose:"assertionMethod"})},createLerPresentation:async(t,e)=>{let n=(e.learnCard??t).id.did();if(!e.credentials.length)throw new Error("createLerPresentation: credentials array must contain at least one credential");if(!e.credentials.some(L))throw new Error("createLerPresentation: credentials must include at least one LER-RS credential");let d={"@context":[m],type:["VerifiablePresentation"],holder:n,verifiableCredential:e.credentials.length===1?e.credentials[0]:e.credentials};return r.invoke.issuePresentation(d,{...e.domain?{domain:e.domain}:{},...e.challenge?{challenge:e.challenge}:{}})},verifyLerPresentation:async(t,{presentation:e,domain:s,challenge:n})=>{let a=await r.invoke.verifyPresentation(e,{...s?{domain:s}:{},...n?{challenge:n}:{}}),d={verified:a.errors.length===0,errors:a.errors.length?a.errors:void 0},f=[];if(typeof e!="string"){let c=e.holder,g=D(e.verifiableCredential);for(let i of g)try{let l=await r.invoke.verifyCredential(i),p=typeof i.issuer=="string"?i.issuer:i.issuer?.id,u=L(i)||!!c&&!!p&&p===c;f.push({credential:i,verified:l.errors.length===0,isSelfIssued:u,errors:l.errors.length?l.errors:void 0})}catch(l){f.push({credential:i,verified:!1,isSelfIssued:!1,errors:[l instanceof Error?l.message:"Unknown error verifying credential"]})}}return{verified:d.verified&&f.every(c=>c.verified||c.isSelfIssued),presentationResult:d,credentialResults:f}},createTcpWrapperVc:async(t,e)=>{let n=(e.learnCard??t).id.did(),a=e.issuanceDate??new Date().toISOString(),d=e.generatedAt??a,f=e.subjectDid??n;if(e.enableCoSign)throw new Error("createTcpWrapperVc: co-signing is not enabled in MVP");if(e.coSignerDid)throw new Error("createTcpWrapperVc: coSignerDid is reserved for future co-sign support");let g={"@context":[m,{"@version":1.1,id:"@id",type:"@type",TrustedCareerProfile:"https://ctx.learncard.com/tcp#TrustedCareerProfile",ResumePackage:"https://ctx.learncard.com/tcp#ResumePackage",pdfUrl:{"@id":"https://ctx.learncard.com/tcp#pdfUrl","@type":"@id"},pdfHash:"https://ctx.learncard.com/tcp#pdfHash",hashAlgorithm:"https://ctx.learncard.com/tcp#hashAlgorithm",includedCredentials:{"@id":"https://ctx.learncard.com/tcp#includedCredentials","@container":"@set"},category:"https://ctx.learncard.com/tcp#category",generatedAt:{"@id":"https://ctx.learncard.com/tcp#generatedAt","@type":"http://www.w3.org/2001/XMLSchema#dateTime"}}],type:["VerifiableCredential",v],id:e.wrapperId,issuer:n,validFrom:a,credentialSubject:{id:f,type:"ResumePackage",pdfUrl:e.pdfUrl,pdfHash:e.pdfHash,hashAlgorithm:"SHA-256",includedCredentials:e.includedCredentials,generatedAt:d}};return r.invoke.issueCredential(g,{proofPurpose:"assertionMethod"})}}}),"getLerRsPlugin");
2
+ //# sourceMappingURL=ler-rs-plugin.cjs.production.min.js.map