@learncard/network-brain-client 2.5.32 → 2.5.34

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @learncard/network-brain-client
2
2
 
3
+ ## 2.5.34
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`773bbd425d2e87796d5d713450397723e3c21c71`](https://github.com/learningeconomy/LearnCard/commit/773bbd425d2e87796d5d713450397723e3c21c71), [`b61cfb80e80f382b22d673e7e826fc60528161e7`](https://github.com/learningeconomy/LearnCard/commit/b61cfb80e80f382b22d673e7e826fc60528161e7), [`5d402748c33bbe4f23aa38f45953d03274f38b65`](https://github.com/learningeconomy/LearnCard/commit/5d402748c33bbe4f23aa38f45953d03274f38b65)]:
8
+ - @learncard/network-brain-service@3.15.0
9
+
10
+ ## 2.5.33
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies []:
15
+ - @learncard/network-brain-service@3.14.5
16
+
3
17
  ## 2.5.32
4
18
 
5
19
  ### Patch Changes
@@ -100,6 +100,8 @@ var require_helpers_cjs_development = __commonJS({
100
100
  AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator, "AgeRatingValidator"),
101
101
  AlignmentTargetTypeValidator: /* @__PURE__ */ __name2(() => AlignmentTargetTypeValidator, "AlignmentTargetTypeValidator"),
102
102
  AlignmentValidator: /* @__PURE__ */ __name2(() => AlignmentValidator, "AlignmentValidator"),
103
+ AllocateCredentialStatusInputValidator: /* @__PURE__ */ __name2(() => AllocateCredentialStatusInputValidator, "AllocateCredentialStatusInputValidator"),
104
+ AllocatedBitstringStatusListEntryValidator: /* @__PURE__ */ __name2(() => AllocatedBitstringStatusListEntryValidator, "AllocatedBitstringStatusListEntryValidator"),
103
105
  AllowConnectionRequestsEnum: /* @__PURE__ */ __name2(() => AllowConnectionRequestsEnum, "AllowConnectionRequestsEnum"),
104
106
  AppBoostValidator: /* @__PURE__ */ __name2(() => AppBoostValidator, "AppBoostValidator"),
105
107
  AppEventInputValidator: /* @__PURE__ */ __name2(() => AppEventInputValidator, "AppEventInputValidator"),
@@ -117,6 +119,10 @@ var require_helpers_cjs_development = __commonJS({
117
119
  AuthGrantValidator: /* @__PURE__ */ __name2(() => AuthGrantValidator, "AuthGrantValidator"),
118
120
  AuthSessionError: /* @__PURE__ */ __name2(() => AuthSessionError, "AuthSessionError"),
119
121
  AutoBoostConfigValidator: /* @__PURE__ */ __name2(() => AutoBoostConfigValidator, "AutoBoostConfigValidator"),
122
+ BITSTRING_STATUS_PURPOSES: /* @__PURE__ */ __name2(() => BITSTRING_STATUS_PURPOSES, "BITSTRING_STATUS_PURPOSES"),
123
+ BitstringStatusListCredentialSubjectValidator: /* @__PURE__ */ __name2(() => BitstringStatusListCredentialSubjectValidator, "BitstringStatusListCredentialSubjectValidator"),
124
+ BitstringStatusListEntryValidator: /* @__PURE__ */ __name2(() => BitstringStatusListEntryValidator, "BitstringStatusListEntryValidator"),
125
+ BitstringStatusPurposeValidator: /* @__PURE__ */ __name2(() => BitstringStatusPurposeValidator, "BitstringStatusPurposeValidator"),
120
126
  BoostPermissionsQueryValidator: /* @__PURE__ */ __name2(() => BoostPermissionsQueryValidator, "BoostPermissionsQueryValidator"),
121
127
  BoostPermissionsValidator: /* @__PURE__ */ __name2(() => BoostPermissionsValidator, "BoostPermissionsValidator"),
122
128
  BoostQueryValidator: /* @__PURE__ */ __name2(() => BoostQueryValidator, "BoostQueryValidator"),
@@ -178,6 +184,7 @@ var require_helpers_cjs_development = __commonJS({
178
184
  CredentialStatusValidator: /* @__PURE__ */ __name2(() => CredentialStatusValidator, "CredentialStatusValidator"),
179
185
  CredentialSubjectValidator: /* @__PURE__ */ __name2(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
180
186
  CriteriaValidator: /* @__PURE__ */ __name2(() => CriteriaValidator, "CriteriaValidator"),
187
+ DEFAULT_BITSTRING_STATUS_LIST_SIZE: /* @__PURE__ */ __name2(() => DEFAULT_BITSTRING_STATUS_LIST_SIZE, "DEFAULT_BITSTRING_STATUS_LIST_SIZE"),
181
188
  DeleteFrameworkInputValidator: /* @__PURE__ */ __name2(() => DeleteFrameworkInputValidator, "DeleteFrameworkInputValidator"),
182
189
  DeleteSkillInputValidator: /* @__PURE__ */ __name2(() => DeleteSkillInputValidator, "DeleteSkillInputValidator"),
183
190
  DidDocumentValidator: /* @__PURE__ */ __name2(() => DidDocumentValidator, "DidDocumentValidator"),
@@ -313,6 +320,7 @@ var require_helpers_cjs_development = __commonJS({
313
320
  SkillTreeNodeInputValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
314
321
  SkillTreeNodeValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
315
322
  SkillValidator: /* @__PURE__ */ __name2(() => SkillValidator, "SkillValidator"),
323
+ StatusCheckEntryValidator: /* @__PURE__ */ __name2(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
316
324
  StringQuery: /* @__PURE__ */ __name2(() => StringQuery, "StringQuery"),
317
325
  SummaryCredentialDataValidator: /* @__PURE__ */ __name2(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
318
326
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name2(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
@@ -14550,10 +14558,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14550
14558
  var ClrCredentialValidator = UnsignedClrCredentialValidator.extend({
14551
14559
  proof: ProofValidator.or(ProofValidator.array())
14552
14560
  });
14561
+ var StatusCheckEntryValidator = external_exports.object({
14562
+ entryType: external_exports.string(),
14563
+ statusPurpose: external_exports.string(),
14564
+ isSet: external_exports.boolean(),
14565
+ statusListCredential: external_exports.string().optional(),
14566
+ statusListIndex: external_exports.string().optional()
14567
+ });
14553
14568
  var VerificationCheckValidator = external_exports.object({
14554
14569
  checks: external_exports.string().array(),
14555
14570
  warnings: external_exports.string().array(),
14556
- errors: external_exports.string().array()
14571
+ errors: external_exports.string().array(),
14572
+ status: StatusCheckEntryValidator.array().optional()
14557
14573
  });
14558
14574
  var VerificationStatusValidator = external_exports.enum(["Success", "Failed", "Error"]);
14559
14575
  var VerificationStatusEnum = VerificationStatusValidator.enum;
@@ -15964,6 +15980,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15964
15980
  __name22(this, "AuthSessionError");
15965
15981
  }
15966
15982
  };
15983
+ var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
15984
+ var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
15985
+ var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
15986
+ var BitstringStatusListEntryValidator = external_exports.object({
15987
+ id: external_exports.string().optional(),
15988
+ type: external_exports.literal("BitstringStatusListEntry"),
15989
+ statusPurpose: BitstringStatusPurposeValidator,
15990
+ statusListIndex: external_exports.string(),
15991
+ statusListCredential: external_exports.string()
15992
+ });
15993
+ var AllocatedBitstringStatusListEntryValidator = BitstringStatusListEntryValidator.extend({
15994
+ id: external_exports.string()
15995
+ });
15996
+ var BitstringStatusListCredentialSubjectValidator = external_exports.object({
15997
+ id: external_exports.string().optional(),
15998
+ type: external_exports.literal("BitstringStatusList"),
15999
+ statusPurpose: BitstringStatusPurposeValidator,
16000
+ encodedList: external_exports.string()
16001
+ });
16002
+ var AllocateCredentialStatusInputValidator = external_exports.object({
16003
+ statusPurposes: external_exports.array(BitstringStatusPurposeValidator).optional(),
16004
+ listSize: external_exports.number().int().positive().optional()
16005
+ }).default({});
15967
16006
  }
15968
16007
  });
15969
16008
  var require_dist2 = __commonJS2({
@@ -15999,6 +16038,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15999
16038
  fixUrl: /* @__PURE__ */ __name(() => fixUrl4, "fixUrl"),
16000
16039
  formatNumber: /* @__PURE__ */ __name(() => formatNumber, "formatNumber"),
16001
16040
  generateSrcSet: /* @__PURE__ */ __name(() => generateSrcSet4, "generateSrcSet"),
16041
+ getBitstringStatusListBit: /* @__PURE__ */ __name(() => getBitstringStatusListBit, "getBitstringStatusListBit"),
16042
+ getBitstringStatusListEntries: /* @__PURE__ */ __name(() => getBitstringStatusListEntries, "getBitstringStatusListEntries"),
16043
+ getBitstringStatusListEntryForPurpose: /* @__PURE__ */ __name(() => getBitstringStatusListEntryForPurpose, "getBitstringStatusListEntryForPurpose"),
16044
+ getCredentialStatusArray: /* @__PURE__ */ __name(() => getCredentialStatusArray, "getCredentialStatusArray"),
16002
16045
  getProvider: /* @__PURE__ */ __name(() => getProvider, "getProvider"),
16003
16046
  getUrlsFromSrcSet: /* @__PURE__ */ __name(() => getUrlsFromSrcSet, "getUrlsFromSrcSet"),
16004
16047
  immerArraySlice: /* @__PURE__ */ __name(() => immerArraySlice, "immerArraySlice"),
@@ -16007,6 +16050,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16007
16050
  innerReactOuterImmer: /* @__PURE__ */ __name(() => innerReactOuterImmer, "innerReactOuterImmer"),
16008
16051
  innerReactOuterReact: /* @__PURE__ */ __name(() => innerReactOuterReact, "innerReactOuterReact"),
16009
16052
  isAppDidWeb: /* @__PURE__ */ __name(() => isAppDidWeb, "isAppDidWeb"),
16053
+ isBitstringStatusListEntry: /* @__PURE__ */ __name(() => isBitstringStatusListEntry, "isBitstringStatusListEntry"),
16010
16054
  isEncrypted: /* @__PURE__ */ __name(() => isEncrypted, "isEncrypted"),
16011
16055
  isHex: /* @__PURE__ */ __name(() => isHex, "isHex"),
16012
16056
  isNotMaybe: /* @__PURE__ */ __name(() => isNotMaybe, "isNotMaybe"),
@@ -16014,6 +16058,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16014
16058
  isVC2Format: /* @__PURE__ */ __name(() => isVC2Format, "isVC2Format"),
16015
16059
  quantizeValue: /* @__PURE__ */ __name(() => quantizeValue, "quantizeValue"),
16016
16060
  resizeAndChangeQuality: /* @__PURE__ */ __name(() => resizeAndChangeQuality4, "resizeAndChangeQuality"),
16061
+ setBitstringStatusListBit: /* @__PURE__ */ __name(() => setBitstringStatusListBit, "setBitstringStatusListBit"),
16017
16062
  unwrapBoostCredential: /* @__PURE__ */ __name(() => unwrapBoostCredential, "unwrapBoostCredential")
16018
16063
  });
16019
16064
  module2.exports = __toCommonJS2(index_exports2);
@@ -16811,6 +16856,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16811
16856
  if (!value) return updateSlice(index);
16812
16857
  return updateSlice(index, value);
16813
16858
  }), "immerArraySlice");
16859
+ var getCredentialStatusArray = /* @__PURE__ */ __name2((credential) => {
16860
+ if (!credential || typeof credential !== "object" || Array.isArray(credential)) return [];
16861
+ const status = credential.credentialStatus;
16862
+ if (!status) return [];
16863
+ return Array.isArray(status) ? status : [status];
16864
+ }, "getCredentialStatusArray");
16865
+ var isBitstringStatusListEntry = /* @__PURE__ */ __name2((status) => {
16866
+ if (!status || typeof status !== "object") return false;
16867
+ const record = status;
16868
+ return record.type === "BitstringStatusListEntry" && (record.statusPurpose === "revocation" || record.statusPurpose === "suspension") && typeof record.statusListIndex === "string" && typeof record.statusListCredential === "string";
16869
+ }, "isBitstringStatusListEntry");
16870
+ var getBitstringStatusListEntries = /* @__PURE__ */ __name2((credential) => {
16871
+ if (!credential || typeof credential !== "object" || Array.isArray(credential)) return [];
16872
+ const record = credential;
16873
+ const statuses = getCredentialStatusArray(record);
16874
+ return [
16875
+ ...statuses.filter(isBitstringStatusListEntry),
16876
+ ...getBitstringStatusListEntries(record.boostCredential)
16877
+ ];
16878
+ }, "getBitstringStatusListEntries");
16879
+ var getBitstringStatusListEntryForPurpose = /* @__PURE__ */ __name2((credential, statusPurpose) => getBitstringStatusListEntries(credential).find((entry) => entry.statusPurpose === statusPurpose), "getBitstringStatusListEntryForPurpose");
16880
+ var getBitstringStatusListBit = /* @__PURE__ */ __name2((bitstring, index) => {
16881
+ if (!Number.isInteger(index) || index < 0) {
16882
+ throw new Error("Bitstring status list index is out of range");
16883
+ }
16884
+ const byte = bitstring[Math.floor(index / 8)] ?? 0;
16885
+ return (byte & 1 << index % 8) !== 0;
16886
+ }, "getBitstringStatusListBit");
16887
+ var setBitstringStatusListBit = /* @__PURE__ */ __name2((bitstring, index, value) => {
16888
+ if (!Number.isInteger(index) || index < 0 || index >= bitstring.length * 8) {
16889
+ throw new Error("Bitstring status list index is out of range");
16890
+ }
16891
+ const byteIndex = Math.floor(index / 8);
16892
+ const mask = 1 << index % 8;
16893
+ const current = bitstring[byteIndex] ?? 0;
16894
+ bitstring[byteIndex] = value ? current | mask : current & ~mask;
16895
+ }, "setBitstringStatusListBit");
16814
16896
  var import_zod = require("zod");
16815
16897
  var ImageResizingValidator = import_zod.z.object({ type: import_zod.z.literal("resizing") });
16816
16898
  var ImageUploadingValidator = import_zod.z.object({