@learncard/types 5.15.0 → 5.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.esm.js CHANGED
@@ -97,6 +97,19 @@ var VC2EvidenceValidator = z.object({
97
97
  genre: z.string().optional(),
98
98
  audience: z.string().optional()
99
99
  }).catchall(z.any());
100
+ var TemplateRenderMethodValidator = z.object({
101
+ type: z.literal("TemplateRenderMethod"),
102
+ renderSuite: z.string(),
103
+ template: z.string(),
104
+ renderProperty: z.array(z.string()).optional(),
105
+ outputPreference: z.object({
106
+ mediaType: z.string()
107
+ }).optional()
108
+ });
109
+ var RenderMethodValidator = z.union([
110
+ TemplateRenderMethodValidator,
111
+ z.record(z.string(), z.any())
112
+ ]);
100
113
  var UnsignedVCValidator = z.object({
101
114
  "@context": ContextValidator,
102
115
  id: z.string().optional(),
@@ -120,7 +133,8 @@ var UnsignedVCValidator = z.object({
120
133
  validUntil: z.string().optional(),
121
134
  status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
122
135
  termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
123
- evidence: z.union([VC2EvidenceValidator, z.array(VC2EvidenceValidator)]).optional()
136
+ evidence: z.union([VC2EvidenceValidator, z.array(VC2EvidenceValidator)]).optional(),
137
+ renderMethod: z.union([RenderMethodValidator, z.array(RenderMethodValidator)]).optional()
124
138
  }).catchall(z.any());
125
139
  var ProofValidator = z.object({
126
140
  type: z.string(),
@@ -446,16 +460,43 @@ var ClrCredentialValidator = UnsignedClrCredentialValidator.extend({
446
460
  // src/learncard.ts
447
461
  import { z as z6 } from "zod";
448
462
  var StatusCheckEntryValidator = z6.object({
463
+ /**
464
+ * The `credentialStatus.type` as it appeared on the credential.
465
+ * One of `BitstringStatusListEntry`, `StatusList2021Entry`,
466
+ * `RevocationList2020Status`, or any future custom status type.
467
+ */
449
468
  entryType: z6.string(),
469
+ /**
470
+ * The claimed purpose of the entry. Standard values are
471
+ * `"revocation"` and `"suspension"`; the spec allows arbitrary
472
+ * strings.
473
+ */
450
474
  statusPurpose: z6.string(),
475
+ /**
476
+ * Whether the bit at the credential's index in the status list
477
+ * bitstring was set.
478
+ */
451
479
  isSet: z6.boolean(),
480
+ /** URL of the status list credential, when known. */
452
481
  statusListCredential: z6.string().optional(),
482
+ /** Original (string) index within the status list. */
453
483
  statusListIndex: z6.string().optional()
454
484
  });
455
485
  var VerificationCheckValidator = z6.object({
456
486
  checks: z6.string().array(),
457
487
  warnings: z6.string().array(),
458
488
  errors: z6.string().array(),
489
+ /**
490
+ * Per-entry results for the `credentialStatus` check, populated
491
+ * by `@learncard/didkit-plugin` when the verified credential
492
+ * carries one or more `credentialStatus` entries. Empty / absent
493
+ * for credentials without a status entry.
494
+ *
495
+ * Marked `.optional()` because the underlying `ssi-ldp`
496
+ * serializer omits the field when empty (`skip_serializing_if`),
497
+ * so older WASM builds that pre-date the structured-status
498
+ * change still validate against this schema.
499
+ */
459
500
  status: StatusCheckEntryValidator.array().optional()
460
501
  });
461
502
  var VerificationStatusValidator = z6.enum(["Success", "Failed", "Error"]);
@@ -2101,6 +2142,7 @@ export {
2101
2142
  RefreshServiceValidator,
2102
2143
  RegExpValidator,
2103
2144
  RelatedValidator,
2145
+ RenderMethodValidator,
2104
2146
  ReplaceSkillFrameworkSkillsInputValidator,
2105
2147
  ReplaceSkillFrameworkSkillsResultValidator,
2106
2148
  RequestLearnerContextEventValidator,
@@ -2143,6 +2185,7 @@ export {
2143
2185
  SummaryCredentialKeywordValidator,
2144
2186
  SyncFrameworkInputValidator,
2145
2187
  TagValidator,
2188
+ TemplateRenderMethodValidator,
2146
2189
  TermsOfUseValidator,
2147
2190
  UnsignedAchievementCredentialValidator,
2148
2191
  UnsignedClrCredentialValidator,