@learncard/helpers 1.3.0 → 1.3.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/dist/helpers.d.ts CHANGED
@@ -181,6 +181,32 @@ declare const UnsignedVCValidator: z.ZodObject<{
181
181
  audience: z.ZodOptional<z.ZodString>;
182
182
  }, z.core.$catchall<z.ZodAny>>>
183
183
  ]>>;
184
+ renderMethod: z.ZodOptional<z.ZodUnion<readonly [
185
+ z.ZodUnion<readonly [
186
+ z.ZodObject<{
187
+ type: z.ZodLiteral<"TemplateRenderMethod">;
188
+ renderSuite: z.ZodString;
189
+ template: z.ZodString;
190
+ renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
191
+ outputPreference: z.ZodOptional<z.ZodObject<{
192
+ mediaType: z.ZodString;
193
+ }, z.core.$strip>>;
194
+ }, z.core.$strip>,
195
+ z.ZodRecord<z.ZodString, z.ZodAny>
196
+ ]>,
197
+ z.ZodArray<z.ZodUnion<readonly [
198
+ z.ZodObject<{
199
+ type: z.ZodLiteral<"TemplateRenderMethod">;
200
+ renderSuite: z.ZodString;
201
+ template: z.ZodString;
202
+ renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
203
+ outputPreference: z.ZodOptional<z.ZodObject<{
204
+ mediaType: z.ZodString;
205
+ }, z.core.$strip>>;
206
+ }, z.core.$strip>,
207
+ z.ZodRecord<z.ZodString, z.ZodAny>
208
+ ]>>
209
+ ]>>;
184
210
  }, z.core.$catchall<z.ZodAny>>;
185
211
  export type UnsignedVC = z.infer<typeof UnsignedVCValidator>;
186
212
  declare const VCValidator: z.ZodObject<{
@@ -359,6 +385,32 @@ declare const VCValidator: z.ZodObject<{
359
385
  audience: z.ZodOptional<z.ZodString>;
360
386
  }, z.core.$catchall<z.ZodAny>>>
361
387
  ]>>;
388
+ renderMethod: z.ZodOptional<z.ZodUnion<readonly [
389
+ z.ZodUnion<readonly [
390
+ z.ZodObject<{
391
+ type: z.ZodLiteral<"TemplateRenderMethod">;
392
+ renderSuite: z.ZodString;
393
+ template: z.ZodString;
394
+ renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
395
+ outputPreference: z.ZodOptional<z.ZodObject<{
396
+ mediaType: z.ZodString;
397
+ }, z.core.$strip>>;
398
+ }, z.core.$strip>,
399
+ z.ZodRecord<z.ZodString, z.ZodAny>
400
+ ]>,
401
+ z.ZodArray<z.ZodUnion<readonly [
402
+ z.ZodObject<{
403
+ type: z.ZodLiteral<"TemplateRenderMethod">;
404
+ renderSuite: z.ZodString;
405
+ template: z.ZodString;
406
+ renderProperty: z.ZodOptional<z.ZodArray<z.ZodString>>;
407
+ outputPreference: z.ZodOptional<z.ZodObject<{
408
+ mediaType: z.ZodString;
409
+ }, z.core.$strip>>;
410
+ }, z.core.$strip>,
411
+ z.ZodRecord<z.ZodString, z.ZodAny>
412
+ ]>>
413
+ ]>>;
362
414
  proof: z.ZodUnion<[
363
415
  z.ZodObject<{
364
416
  type: z.ZodString;
@@ -248,6 +248,7 @@ var require_types_cjs_development = __commonJS({
248
248
  RefreshServiceValidator: /* @__PURE__ */ __name(() => RefreshServiceValidator, "RefreshServiceValidator"),
249
249
  RegExpValidator: /* @__PURE__ */ __name(() => RegExpValidator, "RegExpValidator"),
250
250
  RelatedValidator: /* @__PURE__ */ __name(() => RelatedValidator, "RelatedValidator"),
251
+ RenderMethodValidator: /* @__PURE__ */ __name(() => RenderMethodValidator, "RenderMethodValidator"),
251
252
  ReplaceSkillFrameworkSkillsInputValidator: /* @__PURE__ */ __name(() => ReplaceSkillFrameworkSkillsInputValidator, "ReplaceSkillFrameworkSkillsInputValidator"),
252
253
  ReplaceSkillFrameworkSkillsResultValidator: /* @__PURE__ */ __name(() => ReplaceSkillFrameworkSkillsResultValidator, "ReplaceSkillFrameworkSkillsResultValidator"),
253
254
  RequestLearnerContextEventValidator: /* @__PURE__ */ __name(() => RequestLearnerContextEventValidator, "RequestLearnerContextEventValidator"),
@@ -290,6 +291,7 @@ var require_types_cjs_development = __commonJS({
290
291
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
291
292
  SyncFrameworkInputValidator: /* @__PURE__ */ __name(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
292
293
  TagValidator: /* @__PURE__ */ __name(() => TagValidator, "TagValidator"),
294
+ TemplateRenderMethodValidator: /* @__PURE__ */ __name(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
293
295
  TermsOfUseValidator: /* @__PURE__ */ __name(() => TermsOfUseValidator, "TermsOfUseValidator"),
294
296
  UnsignedAchievementCredentialValidator: /* @__PURE__ */ __name(() => UnsignedAchievementCredentialValidator, "UnsignedAchievementCredentialValidator"),
295
297
  UnsignedClrCredentialValidator: /* @__PURE__ */ __name(() => UnsignedClrCredentialValidator, "UnsignedClrCredentialValidator"),
@@ -13769,6 +13771,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13769
13771
  genre: external_exports.string().optional(),
13770
13772
  audience: external_exports.string().optional()
13771
13773
  }).catchall(external_exports.any());
13774
+ var TemplateRenderMethodValidator = external_exports.object({
13775
+ type: external_exports.literal("TemplateRenderMethod"),
13776
+ renderSuite: external_exports.string(),
13777
+ template: external_exports.string(),
13778
+ renderProperty: external_exports.array(external_exports.string()).optional(),
13779
+ outputPreference: external_exports.object({
13780
+ mediaType: external_exports.string()
13781
+ }).optional()
13782
+ });
13783
+ var RenderMethodValidator = external_exports.union([
13784
+ TemplateRenderMethodValidator,
13785
+ external_exports.record(external_exports.string(), external_exports.any())
13786
+ ]);
13772
13787
  var UnsignedVCValidator = external_exports.object({
13773
13788
  "@context": ContextValidator,
13774
13789
  id: external_exports.string().optional(),
@@ -13792,7 +13807,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13792
13807
  validUntil: external_exports.string().optional(),
13793
13808
  status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
13794
13809
  termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
13795
- evidence: external_exports.union([VC2EvidenceValidator, external_exports.array(VC2EvidenceValidator)]).optional()
13810
+ evidence: external_exports.union([VC2EvidenceValidator, external_exports.array(VC2EvidenceValidator)]).optional(),
13811
+ renderMethod: external_exports.union([RenderMethodValidator, external_exports.array(RenderMethodValidator)]).optional()
13796
13812
  }).catchall(external_exports.any());
13797
13813
  var ProofValidator = external_exports.object({
13798
13814
  type: external_exports.string(),
@@ -14101,16 +14117,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14101
14117
  proof: ProofValidator.or(ProofValidator.array())
14102
14118
  });
14103
14119
  var StatusCheckEntryValidator = external_exports.object({
14120
+ /**
14121
+ * The `credentialStatus.type` as it appeared on the credential.
14122
+ * One of `BitstringStatusListEntry`, `StatusList2021Entry`,
14123
+ * `RevocationList2020Status`, or any future custom status type.
14124
+ */
14104
14125
  entryType: external_exports.string(),
14126
+ /**
14127
+ * The claimed purpose of the entry. Standard values are
14128
+ * `"revocation"` and `"suspension"`; the spec allows arbitrary
14129
+ * strings.
14130
+ */
14105
14131
  statusPurpose: external_exports.string(),
14132
+ /**
14133
+ * Whether the bit at the credential's index in the status list
14134
+ * bitstring was set.
14135
+ */
14106
14136
  isSet: external_exports.boolean(),
14137
+ /** URL of the status list credential, when known. */
14107
14138
  statusListCredential: external_exports.string().optional(),
14139
+ /** Original (string) index within the status list. */
14108
14140
  statusListIndex: external_exports.string().optional()
14109
14141
  });
14110
14142
  var VerificationCheckValidator = external_exports.object({
14111
14143
  checks: external_exports.string().array(),
14112
14144
  warnings: external_exports.string().array(),
14113
14145
  errors: external_exports.string().array(),
14146
+ /**
14147
+ * Per-entry results for the `credentialStatus` check, populated
14148
+ * by `@learncard/didkit-plugin` when the verified credential
14149
+ * carries one or more `credentialStatus` entries. Empty / absent
14150
+ * for credentials without a status entry.
14151
+ *
14152
+ * Marked `.optional()` because the underlying `ssi-ldp`
14153
+ * serializer omits the field when empty (`skip_serializing_if`),
14154
+ * so older WASM builds that pre-date the structured-status
14155
+ * change still validate against this schema.
14156
+ */
14114
14157
  status: StatusCheckEntryValidator.array().optional()
14115
14158
  });
14116
14159
  var VerificationStatusValidator = external_exports.enum(["Success", "Failed", "Error"]);