@learncard/helpers 1.3.10 → 1.3.12

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.
@@ -6847,7 +6847,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6847
6847
  var Rn = i.object({ type: i.string().min(1).or(i.string().array().nonempty()), identifier: i.string(), identifierType: Cp });
6848
6848
  var _e = i.string().or(i.object({ id: i.string().optional(), type: i.string().or(i.string().array().nonempty().optional()), name: i.string().optional(), url: i.string().optional(), phone: i.string().optional(), description: i.string().optional(), endorsement: i.any().array().optional(), image: $e.optional(), email: i.string().email().optional(), address: jp.optional(), otherIdentifier: Rn.array().optional(), official: i.string().optional(), parentOrg: i.any().optional(), familyName: i.string().optional(), givenName: i.string().optional(), additionalName: i.string().optional(), patronymicName: i.string().optional(), honorificPrefix: i.string().optional(), honorificSuffix: i.string().optional(), familyNamePrefix: i.string().optional(), dateOfBirth: i.string().optional() }).catchall(i.any()));
6849
6849
  var Qt = i.object({ id: i.string().optional() }).catchall(i.any());
6850
- var qt = i.object({ type: i.string(), id: i.string() }).catchall(i.any());
6850
+ var qt = i.object({ type: i.string(), id: i.string().optional() }).catchall(i.any());
6851
6851
  var tu = i.object({ id: i.string(), type: i.string() }).catchall(i.any());
6852
6852
  var ru = i.object({ id: i.string().optional(), type: i.string() }).catchall(i.any());
6853
6853
  var nu = i.object({ type: i.string(), id: i.string().optional() }).catchall(i.any());
@@ -7136,7 +7136,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7136
7136
  var xf = ["revocation", "suspension"];
7137
7137
  var Nx = 131072;
7138
7138
  var to = i.enum(xf);
7139
- var bf = i.object({ id: i.string().optional(), type: i.literal("BitstringStatusListEntry"), statusPurpose: to, statusListIndex: i.string(), statusListCredential: i.string() });
7139
+ var bf = i.object({ id: i.string().optional(), type: i.literal("BitstringStatusListEntry"), statusPurpose: to, statusListIndex: i.string().or(i.number().int().nonnegative()), statusListCredential: i.string() });
7140
7140
  var Ax = bf.extend({ id: i.string() });
7141
7141
  var Ox = i.object({ id: i.string().optional(), type: i.literal("BitstringStatusList"), statusPurpose: to, encodedList: i.string() });
7142
7142
  var Zx = i.object({ statusPurposes: i.array(to).optional(), listSize: i.number().int().positive().optional() }).default({});
@@ -22814,7 +22814,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
22814
22814
  }).catchall(external_exports.any())
22815
22815
  );
22816
22816
  var CredentialSubjectValidator = external_exports.object({ id: external_exports.string().optional() }).catchall(external_exports.any());
22817
- var CredentialStatusValidator = external_exports.object({ type: external_exports.string(), id: external_exports.string() }).catchall(external_exports.any());
22817
+ var CredentialStatusValidator = external_exports.object({ type: external_exports.string(), id: external_exports.string().optional() }).catchall(external_exports.any());
22818
22818
  var CredentialSchemaValidator = external_exports.object({ id: external_exports.string(), type: external_exports.string() }).catchall(external_exports.any());
22819
22819
  var RefreshServiceValidator = external_exports.object({ id: external_exports.string().optional(), type: external_exports.string() }).catchall(external_exports.any());
22820
22820
  var TermsOfUseValidator = external_exports.object({ type: external_exports.string(), id: external_exports.string().optional() }).catchall(external_exports.any());
@@ -23215,8 +23215,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
23215
23215
  statusListIndex: external_exports.string().optional()
23216
23216
  });
23217
23217
  var VerificationCheckValidator = external_exports.object({
23218
+ /**
23219
+ * Checks that completed successfully. This does not imply that warnings can be ignored.
23220
+ */
23218
23221
  checks: external_exports.string().array(),
23222
+ /**
23223
+ * Security-relevant conditions that did not prevent the requested cryptographic checks from
23224
+ * completing. In particular, a non-DID issuer warning means the signature is valid but the
23225
+ * named URL issuer's authorization of that signing key was not established.
23226
+ */
23219
23227
  warnings: external_exports.string().array(),
23228
+ /** Verification failures that prevented one or more requested checks from succeeding. */
23220
23229
  errors: external_exports.string().array(),
23221
23230
  /**
23222
23231
  * Per-entry results for the `credentialStatus` check, populated
@@ -24677,7 +24686,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
24677
24686
  id: external_exports.string().optional(),
24678
24687
  type: external_exports.literal("BitstringStatusListEntry"),
24679
24688
  statusPurpose: BitstringStatusPurposeValidator,
24680
- statusListIndex: external_exports.string(),
24689
+ statusListIndex: external_exports.string().or(external_exports.number().int().nonnegative()),
24681
24690
  statusListCredential: external_exports.string()
24682
24691
  });
24683
24692
  var AllocatedBitstringStatusListEntryValidator = BitstringStatusListEntryValidator.extend({
@@ -25242,7 +25251,8 @@ var getCredentialStatusArray = /* @__PURE__ */ __name((credential) => {
25242
25251
  var isBitstringStatusListEntry = /* @__PURE__ */ __name((status) => {
25243
25252
  if (!status || typeof status !== "object") return false;
25244
25253
  const record = status;
25245
- return record.type === "BitstringStatusListEntry" && (record.statusPurpose === "revocation" || record.statusPurpose === "suspension") && typeof record.statusListIndex === "string" && typeof record.statusListCredential === "string";
25254
+ const statusListIndex = record.statusListIndex;
25255
+ return record.type === "BitstringStatusListEntry" && (record.statusPurpose === "revocation" || record.statusPurpose === "suspension") && (typeof statusListIndex === "string" || typeof statusListIndex === "number" && Number.isInteger(statusListIndex) && statusListIndex >= 0) && typeof record.statusListCredential === "string";
25246
25256
  }, "isBitstringStatusListEntry");
25247
25257
  var getBitstringStatusListEntries = /* @__PURE__ */ __name((credential) => {
25248
25258
  if (!credential || typeof credential !== "object" || Array.isArray(credential)) return [];