@learncard/learn-cloud-plugin 2.3.45 → 2.3.47

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.
@@ -21238,7 +21238,18 @@ var ProofValidator = external_exports.object({
21238
21238
  verificationMethod: external_exports.string(),
21239
21239
  jws: external_exports.string().optional()
21240
21240
  }).catchall(external_exports.any()).superRefine((proof, ctx) => {
21241
- if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
21241
+ if (proof.created === void 0 && // These standardized Data Integrity suites make created optional.
21242
+ // Keep the prior requirement for legacy and unknown proof suites.
21243
+ // https://www.w3.org/TR/vc-di-eddsa/#proof-configuration-eddsa-jcs-2022
21244
+ // https://www.w3.org/TR/vc-di-bbs/#proof-configuration
21245
+ (proof.type !== "DataIntegrityProof" || ![
21246
+ "ecdsa-rdfc-2019",
21247
+ "ecdsa-jcs-2019",
21248
+ "ecdsa-sd-2023",
21249
+ "eddsa-rdfc-2022",
21250
+ "eddsa-jcs-2022",
21251
+ "bbs-2023"
21252
+ ].includes(proof.cryptosuite))) {
21242
21253
  ctx.addIssue({
21243
21254
  code: "custom",
21244
21255
  path: ["created"],
@@ -21495,6 +21506,7 @@ var AchievementSubjectValidator = external_exports.object({
21495
21506
  term: external_exports.string().optional()
21496
21507
  }).catchall(external_exports.any());
21497
21508
  var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({
21509
+ awardedDate: external_exports.string().optional(),
21498
21510
  name: external_exports.string().optional(),
21499
21511
  description: external_exports.string().optional(),
21500
21512
  image: ImageValidator.optional(),
@@ -24329,6 +24341,17 @@ var ShareLinkPublicContentViewValidator = external_exports.object({
24329
24341
  contentUrl: external_exports.string(),
24330
24342
  receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
24331
24343
  }).strict();
24344
+ var SKILL_ICON_MAX_NAMES_PER_REQUEST = 100;
24345
+ var SKILL_ICON_MAX_CHARACTERS_PER_REQUEST = 2500;
24346
+ var SkillIconNamesValidator = external_exports.array(external_exports.string().nonempty()).min(1).max(SKILL_ICON_MAX_NAMES_PER_REQUEST, {
24347
+ message: `A maximum of ${SKILL_ICON_MAX_NAMES_PER_REQUEST} skill names can be sent per request`
24348
+ }).refine(
24349
+ (names) => names.reduce((total, name) => total + name.length, 0) <= SKILL_ICON_MAX_CHARACTERS_PER_REQUEST,
24350
+ {
24351
+ message: `Skill names may total at most ${SKILL_ICON_MAX_CHARACTERS_PER_REQUEST} characters per request`
24352
+ }
24353
+ );
24354
+ var GenerateSkillIconsInputValidator = external_exports.object({ names: SkillIconNamesValidator });
24332
24355
 
24333
24356
  // src/helpers.ts
24334
24357
  var import_json_stringify_deterministic = __toESM(require_lib(), 1);