@learncard/vc-api-plugin 1.0.1 → 1.0.3

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
- // ../../../node_modules/.pnpm/zod@3.20.6/node_modules/zod/lib/index.mjs
4
+ // ../../../node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
5
5
  var util;
6
6
  (function(util2) {
7
7
  util2.assertEqual = (val) => val;
@@ -432,7 +432,7 @@ var OK = /* @__PURE__ */ __name((value) => ({ status: "valid", value }), "OK");
432
432
  var isAborted = /* @__PURE__ */ __name((x) => x.status === "aborted", "isAborted");
433
433
  var isDirty = /* @__PURE__ */ __name((x) => x.status === "dirty", "isDirty");
434
434
  var isValid = /* @__PURE__ */ __name((x) => x.status === "valid", "isValid");
435
- var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== "undefined" && x instanceof Promise, "isAsync");
435
+ var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== void 0 && x instanceof Promise, "isAsync");
436
436
  var errorUtil;
437
437
  (function(errorUtil2) {
438
438
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
@@ -650,29 +650,28 @@ var ZodType = class {
650
650
  return this._refinement(refinement);
651
651
  }
652
652
  optional() {
653
- return ZodOptional.create(this, this._def);
653
+ return ZodOptional.create(this);
654
654
  }
655
655
  nullable() {
656
- return ZodNullable.create(this, this._def);
656
+ return ZodNullable.create(this);
657
657
  }
658
658
  nullish() {
659
- return this.nullable().optional();
659
+ return this.optional().nullable();
660
660
  }
661
661
  array() {
662
- return ZodArray.create(this, this._def);
662
+ return ZodArray.create(this);
663
663
  }
664
664
  promise() {
665
- return ZodPromise.create(this, this._def);
665
+ return ZodPromise.create(this);
666
666
  }
667
667
  or(option) {
668
- return ZodUnion.create([this, option], this._def);
668
+ return ZodUnion.create([this, option]);
669
669
  }
670
670
  and(incoming) {
671
- return ZodIntersection.create(this, incoming, this._def);
671
+ return ZodIntersection.create(this, incoming);
672
672
  }
673
673
  transform(transform) {
674
674
  return new ZodEffects({
675
- ...processCreateParams(this._def),
676
675
  schema: this,
677
676
  typeName: ZodFirstPartyTypeKind.ZodEffects,
678
677
  effect: { type: "transform", transform }
@@ -681,7 +680,6 @@ var ZodType = class {
681
680
  default(def) {
682
681
  const defaultValueFunc = typeof def === "function" ? def : () => def;
683
682
  return new ZodDefault({
684
- ...processCreateParams(this._def),
685
683
  innerType: this,
686
684
  defaultValue: defaultValueFunc,
687
685
  typeName: ZodFirstPartyTypeKind.ZodDefault
@@ -691,15 +689,14 @@ var ZodType = class {
691
689
  return new ZodBranded({
692
690
  typeName: ZodFirstPartyTypeKind.ZodBranded,
693
691
  type: this,
694
- ...processCreateParams(this._def)
692
+ ...processCreateParams(void 0)
695
693
  });
696
694
  }
697
695
  catch(def) {
698
- const catchValueFunc = typeof def === "function" ? def : () => def;
696
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
699
697
  return new ZodCatch({
700
- ...processCreateParams(this._def),
701
698
  innerType: this,
702
- catchValue: catchValueFunc,
699
+ defaultValue: defaultValueFunc,
703
700
  typeName: ZodFirstPartyTypeKind.ZodCatch
704
701
  });
705
702
  }
@@ -722,25 +719,24 @@ var ZodType = class {
722
719
  };
723
720
  __name(ZodType, "ZodType");
724
721
  var cuidRegex = /^c[^\s-]{8,}$/i;
725
- var cuid2Regex = /^[a-z][a-z0-9]*$/;
726
722
  var uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
727
- var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;
723
+ var emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
728
724
  var datetimeRegex = /* @__PURE__ */ __name((args) => {
729
725
  if (args.precision) {
730
726
  if (args.offset) {
731
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
727
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
732
728
  } else {
733
729
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
734
730
  }
735
731
  } else if (args.precision === 0) {
736
732
  if (args.offset) {
737
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
733
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
738
734
  } else {
739
735
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
740
736
  }
741
737
  } else {
742
738
  if (args.offset) {
743
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
739
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
744
740
  } else {
745
741
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
746
742
  }
@@ -767,14 +763,11 @@ var ZodString = class extends ZodType {
767
763
  const parsedType = this._getType(input);
768
764
  if (parsedType !== ZodParsedType.string) {
769
765
  const ctx2 = this._getOrReturnCtx(input);
770
- addIssueToContext(
771
- ctx2,
772
- {
773
- code: ZodIssueCode.invalid_type,
774
- expected: ZodParsedType.string,
775
- received: ctx2.parsedType
776
- }
777
- );
766
+ addIssueToContext(ctx2, {
767
+ code: ZodIssueCode.invalid_type,
768
+ expected: ZodParsedType.string,
769
+ received: ctx2.parsedType
770
+ });
778
771
  return INVALID;
779
772
  }
780
773
  const status = new ParseStatus();
@@ -862,16 +855,6 @@ var ZodString = class extends ZodType {
862
855
  });
863
856
  status.dirty();
864
857
  }
865
- } else if (check.kind === "cuid2") {
866
- if (!cuid2Regex.test(input.data)) {
867
- ctx = this._getOrReturnCtx(input, ctx);
868
- addIssueToContext(ctx, {
869
- validation: "cuid2",
870
- code: ZodIssueCode.invalid_string,
871
- message: check.message
872
- });
873
- status.dirty();
874
- }
875
858
  } else if (check.kind === "url") {
876
859
  try {
877
860
  new URL(input.data);
@@ -953,9 +936,6 @@ var ZodString = class extends ZodType {
953
936
  cuid(message) {
954
937
  return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
955
938
  }
956
- cuid2(message) {
957
- return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
958
- }
959
939
  datetime(options) {
960
940
  var _a;
961
941
  if (typeof options === "string") {
@@ -1030,9 +1010,6 @@ var ZodString = class extends ZodType {
1030
1010
  get isCUID() {
1031
1011
  return !!this._def.checks.find((ch) => ch.kind === "cuid");
1032
1012
  }
1033
- get isCUID2() {
1034
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1035
- }
1036
1013
  get minLength() {
1037
1014
  let min = null;
1038
1015
  for (const ch of this._def.checks) {
@@ -1265,22 +1242,7 @@ var ZodNumber = class extends ZodType {
1265
1242
  return max;
1266
1243
  }
1267
1244
  get isInt() {
1268
- return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1269
- }
1270
- get isFinite() {
1271
- let max = null, min = null;
1272
- for (const ch of this._def.checks) {
1273
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1274
- return true;
1275
- } else if (ch.kind === "min") {
1276
- if (min === null || ch.value > min)
1277
- min = ch.value;
1278
- } else if (ch.kind === "max") {
1279
- if (max === null || ch.value < max)
1280
- max = ch.value;
1281
- }
1282
- }
1283
- return Number.isFinite(min) && Number.isFinite(max);
1245
+ return !!this._def.checks.find((ch) => ch.kind === "int");
1284
1246
  }
1285
1247
  };
1286
1248
  __name(ZodNumber, "ZodNumber");
@@ -1648,13 +1610,13 @@ var ZodArray = class extends ZodType {
1648
1610
  }
1649
1611
  }
1650
1612
  if (ctx.common.async) {
1651
- return Promise.all([...ctx.data].map((item, i) => {
1613
+ return Promise.all(ctx.data.map((item, i) => {
1652
1614
  return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1653
1615
  })).then((result2) => {
1654
1616
  return ParseStatus.mergeArray(status, result2);
1655
1617
  });
1656
1618
  }
1657
- const result = [...ctx.data].map((item, i) => {
1619
+ const result = ctx.data.map((item, i) => {
1658
1620
  return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1659
1621
  });
1660
1622
  return ParseStatus.mergeArray(status, result);
@@ -1704,6 +1666,15 @@ var objectUtil;
1704
1666
  };
1705
1667
  };
1706
1668
  })(objectUtil || (objectUtil = {}));
1669
+ var AugmentFactory = /* @__PURE__ */ __name((def) => (augmentation) => {
1670
+ return new ZodObject({
1671
+ ...def,
1672
+ shape: () => ({
1673
+ ...def.shape(),
1674
+ ...augmentation
1675
+ })
1676
+ });
1677
+ }, "AugmentFactory");
1707
1678
  function deepPartialify(schema) {
1708
1679
  if (schema instanceof ZodObject) {
1709
1680
  const newShape = {};
@@ -1733,7 +1704,8 @@ var ZodObject = class extends ZodType {
1733
1704
  super(...arguments);
1734
1705
  this._cached = null;
1735
1706
  this.nonstrict = this.passthrough;
1736
- this.augment = this.extend;
1707
+ this.augment = AugmentFactory(this._def);
1708
+ this.extend = AugmentFactory(this._def);
1737
1709
  }
1738
1710
  _getCached() {
1739
1711
  if (this._cached !== null)
@@ -1801,9 +1773,7 @@ var ZodObject = class extends ZodType {
1801
1773
  const value = ctx.data[key];
1802
1774
  pairs.push({
1803
1775
  key: { status: "valid", value: key },
1804
- value: catchall._parse(
1805
- new ParseInputLazyPath(ctx, value, ctx.path, key)
1806
- ),
1776
+ value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
1807
1777
  alwaysSet: key in ctx.data
1808
1778
  });
1809
1779
  }
@@ -1862,14 +1832,8 @@ var ZodObject = class extends ZodType {
1862
1832
  unknownKeys: "passthrough"
1863
1833
  });
1864
1834
  }
1865
- extend(augmentation) {
1866
- return new ZodObject({
1867
- ...this._def,
1868
- shape: () => ({
1869
- ...this._def.shape(),
1870
- ...augmentation
1871
- })
1872
- });
1835
+ setKey(key, schema) {
1836
+ return this.augment({ [key]: schema });
1873
1837
  }
1874
1838
  merge(merging) {
1875
1839
  const merged = new ZodObject({
@@ -1880,9 +1844,6 @@ var ZodObject = class extends ZodType {
1880
1844
  });
1881
1845
  return merged;
1882
1846
  }
1883
- setKey(key, schema) {
1884
- return this.augment({ [key]: schema });
1885
- }
1886
1847
  catchall(index) {
1887
1848
  return new ZodObject({
1888
1849
  ...this._def,
@@ -1891,10 +1852,9 @@ var ZodObject = class extends ZodType {
1891
1852
  }
1892
1853
  pick(mask) {
1893
1854
  const shape = {};
1894
- util.objectKeys(mask).forEach((key) => {
1895
- if (mask[key] && this.shape[key]) {
1855
+ util.objectKeys(mask).map((key) => {
1856
+ if (this.shape[key])
1896
1857
  shape[key] = this.shape[key];
1897
- }
1898
1858
  });
1899
1859
  return new ZodObject({
1900
1860
  ...this._def,
@@ -1903,8 +1863,8 @@ var ZodObject = class extends ZodType {
1903
1863
  }
1904
1864
  omit(mask) {
1905
1865
  const shape = {};
1906
- util.objectKeys(this.shape).forEach((key) => {
1907
- if (!mask[key]) {
1866
+ util.objectKeys(this.shape).map((key) => {
1867
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1908
1868
  shape[key] = this.shape[key];
1909
1869
  }
1910
1870
  });
@@ -1918,14 +1878,24 @@ var ZodObject = class extends ZodType {
1918
1878
  }
1919
1879
  partial(mask) {
1920
1880
  const newShape = {};
1921
- util.objectKeys(this.shape).forEach((key) => {
1922
- const fieldSchema = this.shape[key];
1923
- if (mask && !mask[key]) {
1924
- newShape[key] = fieldSchema;
1925
- } else {
1881
+ if (mask) {
1882
+ util.objectKeys(this.shape).map((key) => {
1883
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1884
+ newShape[key] = this.shape[key];
1885
+ } else {
1886
+ newShape[key] = this.shape[key].optional();
1887
+ }
1888
+ });
1889
+ return new ZodObject({
1890
+ ...this._def,
1891
+ shape: () => newShape
1892
+ });
1893
+ } else {
1894
+ for (const key in this.shape) {
1895
+ const fieldSchema = this.shape[key];
1926
1896
  newShape[key] = fieldSchema.optional();
1927
1897
  }
1928
- });
1898
+ }
1929
1899
  return new ZodObject({
1930
1900
  ...this._def,
1931
1901
  shape: () => newShape
@@ -1933,10 +1903,21 @@ var ZodObject = class extends ZodType {
1933
1903
  }
1934
1904
  required(mask) {
1935
1905
  const newShape = {};
1936
- util.objectKeys(this.shape).forEach((key) => {
1937
- if (mask && !mask[key]) {
1938
- newShape[key] = this.shape[key];
1939
- } else {
1906
+ if (mask) {
1907
+ util.objectKeys(this.shape).map((key) => {
1908
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1909
+ newShape[key] = this.shape[key];
1910
+ } else {
1911
+ const fieldSchema = this.shape[key];
1912
+ let newField = fieldSchema;
1913
+ while (newField instanceof ZodOptional) {
1914
+ newField = newField._def.innerType;
1915
+ }
1916
+ newShape[key] = newField;
1917
+ }
1918
+ });
1919
+ } else {
1920
+ for (const key in this.shape) {
1940
1921
  const fieldSchema = this.shape[key];
1941
1922
  let newField = fieldSchema;
1942
1923
  while (newField instanceof ZodOptional) {
@@ -1944,7 +1925,7 @@ var ZodObject = class extends ZodType {
1944
1925
  }
1945
1926
  newShape[key] = newField;
1946
1927
  }
1947
- });
1928
+ }
1948
1929
  return new ZodObject({
1949
1930
  ...this._def,
1950
1931
  shape: () => newShape
@@ -2290,7 +2271,7 @@ var ZodTuple = class extends ZodType {
2290
2271
  });
2291
2272
  status.dirty();
2292
2273
  }
2293
- const items = [...ctx.data].map((item, itemIndex) => {
2274
+ const items = ctx.data.map((item, itemIndex) => {
2294
2275
  const schema = this._def.items[itemIndex] || this._def.rest;
2295
2276
  if (!schema)
2296
2277
  return null;
@@ -2666,7 +2647,6 @@ var ZodLiteral = class extends ZodType {
2666
2647
  if (input.data !== this._def.value) {
2667
2648
  const ctx = this._getOrReturnCtx(input);
2668
2649
  addIssueToContext(ctx, {
2669
- received: ctx.data,
2670
2650
  code: ZodIssueCode.invalid_literal,
2671
2651
  expected: this._def.value
2672
2652
  });
@@ -2742,12 +2722,6 @@ var ZodEnum = class extends ZodType {
2742
2722
  }
2743
2723
  return enumValues;
2744
2724
  }
2745
- extract(values) {
2746
- return ZodEnum.create(values);
2747
- }
2748
- exclude(values) {
2749
- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
2750
- }
2751
2725
  };
2752
2726
  __name(ZodEnum, "ZodEnum");
2753
2727
  ZodEnum.create = createZodEnum;
@@ -2788,9 +2762,6 @@ ZodNativeEnum.create = (values, params) => {
2788
2762
  });
2789
2763
  };
2790
2764
  var ZodPromise = class extends ZodType {
2791
- unwrap() {
2792
- return this._def.type;
2793
- }
2794
2765
  _parse(input) {
2795
2766
  const { ctx } = this._processInputParams(input);
2796
2767
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
@@ -3009,29 +2980,23 @@ var ZodCatch = class extends ZodType {
3009
2980
  const result = this._def.innerType._parse({
3010
2981
  data: ctx.data,
3011
2982
  path: ctx.path,
3012
- parent: {
3013
- ...ctx,
3014
- common: {
3015
- ...ctx.common,
3016
- issues: []
3017
- }
3018
- }
2983
+ parent: ctx
3019
2984
  });
3020
2985
  if (isAsync(result)) {
3021
2986
  return result.then((result2) => {
3022
2987
  return {
3023
2988
  status: "valid",
3024
- value: result2.status === "valid" ? result2.value : this._def.catchValue()
2989
+ value: result2.status === "valid" ? result2.value : this._def.defaultValue()
3025
2990
  };
3026
2991
  });
3027
2992
  } else {
3028
2993
  return {
3029
2994
  status: "valid",
3030
- value: result.status === "valid" ? result.value : this._def.catchValue()
2995
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
3031
2996
  };
3032
2997
  }
3033
2998
  }
3034
- removeCatch() {
2999
+ removeDefault() {
3035
3000
  return this._def.innerType;
3036
3001
  }
3037
3002
  };
@@ -3040,7 +3005,7 @@ ZodCatch.create = (type, params) => {
3040
3005
  return new ZodCatch({
3041
3006
  innerType: type,
3042
3007
  typeName: ZodFirstPartyTypeKind.ZodCatch,
3043
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
3008
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3044
3009
  ...processCreateParams(params)
3045
3010
  });
3046
3011
  };
@@ -3233,10 +3198,7 @@ var oboolean = /* @__PURE__ */ __name(() => booleanType().optional(), "oboolean"
3233
3198
  var coerce = {
3234
3199
  string: (arg) => ZodString.create({ ...arg, coerce: true }),
3235
3200
  number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
3236
- boolean: (arg) => ZodBoolean.create({
3237
- ...arg,
3238
- coerce: true
3239
- }),
3201
+ boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
3240
3202
  bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
3241
3203
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3242
3204
  };
@@ -3362,13 +3324,11 @@ var AchievementCriteriaValidator = mod.object({
3362
3324
  type: mod.string().optional(),
3363
3325
  narrative: mod.string().optional()
3364
3326
  });
3365
- var ImageValidator = mod.string().or(
3366
- mod.object({
3367
- id: mod.string(),
3368
- type: mod.string(),
3369
- caption: mod.string().optional()
3370
- })
3371
- );
3327
+ var ImageValidator = mod.string().or(mod.object({
3328
+ id: mod.string(),
3329
+ type: mod.string(),
3330
+ caption: mod.string().optional()
3331
+ }));
3372
3332
  var GeoCoordinatesValidator = mod.object({
3373
3333
  type: mod.string().min(1).or(mod.string().array().nonempty()),
3374
3334
  latitude: mod.number(),
@@ -3410,31 +3370,29 @@ var IdentifierEntryValidator = mod.object({
3410
3370
  identifier: mod.string(),
3411
3371
  identifierType: IdentifierTypeValidator
3412
3372
  });
3413
- var ProfileValidator = mod.string().or(
3414
- mod.object({
3415
- id: mod.string().optional(),
3416
- type: mod.string().or(mod.string().array().nonempty().optional()),
3417
- name: mod.string().optional(),
3418
- url: mod.string().optional(),
3419
- phone: mod.string().optional(),
3420
- description: mod.string().optional(),
3421
- endorsement: mod.any().array().optional(),
3422
- image: ImageValidator.optional(),
3423
- email: mod.string().email().optional(),
3424
- address: AddressValidator.optional(),
3425
- otherIdentifier: IdentifierEntryValidator.array().optional(),
3426
- official: mod.string().optional(),
3427
- parentOrg: mod.any().optional(),
3428
- familyName: mod.string().optional(),
3429
- givenName: mod.string().optional(),
3430
- additionalName: mod.string().optional(),
3431
- patronymicName: mod.string().optional(),
3432
- honorificPrefix: mod.string().optional(),
3433
- honorificSuffix: mod.string().optional(),
3434
- familyNamePrefix: mod.string().optional(),
3435
- dateOfBirth: mod.string().optional()
3436
- }).catchall(mod.any())
3437
- );
3373
+ var ProfileValidator = mod.string().or(mod.object({
3374
+ id: mod.string().optional(),
3375
+ type: mod.string().or(mod.string().array().nonempty().optional()),
3376
+ name: mod.string().optional(),
3377
+ url: mod.string().optional(),
3378
+ phone: mod.string().optional(),
3379
+ description: mod.string().optional(),
3380
+ endorsement: mod.any().array().optional(),
3381
+ image: ImageValidator.optional(),
3382
+ email: mod.string().email().optional(),
3383
+ address: AddressValidator.optional(),
3384
+ otherIdentifier: IdentifierEntryValidator.array().optional(),
3385
+ official: mod.string().optional(),
3386
+ parentOrg: mod.any().optional(),
3387
+ familyName: mod.string().optional(),
3388
+ givenName: mod.string().optional(),
3389
+ additionalName: mod.string().optional(),
3390
+ patronymicName: mod.string().optional(),
3391
+ honorificPrefix: mod.string().optional(),
3392
+ honorificSuffix: mod.string().optional(),
3393
+ familyNamePrefix: mod.string().optional(),
3394
+ dateOfBirth: mod.string().optional()
3395
+ }).catchall(mod.any()));
3438
3396
  var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
3439
3397
  var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() });
3440
3398
  var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() });
@@ -3716,11 +3674,13 @@ var JWEValidator = mod.object({
3716
3674
  aad: mod.string().optional(),
3717
3675
  recipients: JWERecipientValidator.array().optional()
3718
3676
  });
3719
- var EncryptedCredentialRecordValidator = mod.object({
3720
- encryptedRecord: JWEValidator,
3721
- fields: mod.string().array(),
3677
+ var EncryptedRecordValidator = mod.object({ encryptedRecord: JWEValidator, fields: mod.string().array() }).catchall(mod.any());
3678
+ var PaginatedEncryptedRecordsValidator = PaginationResponseValidator.extend({
3679
+ records: EncryptedRecordValidator.array()
3680
+ });
3681
+ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
3722
3682
  id: mod.string()
3723
- }).catchall(mod.any());
3683
+ });
3724
3684
  var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
3725
3685
  records: EncryptedCredentialRecordValidator.array()
3726
3686
  });
@@ -3757,7 +3717,7 @@ var BoostValidator = mod.object({
3757
3717
  var BoostRecipientValidator = mod.object({
3758
3718
  to: LCNProfileValidator,
3759
3719
  from: mod.string(),
3760
- received: mod.string()
3720
+ received: mod.string().optional()
3761
3721
  });
3762
3722
  var LCNNotificationTypeEnumValidator = mod.enum([
3763
3723
  "CONNECTION_REQUEST",