@learncard/react 2.8.60 → 2.8.62

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.
Files changed (138) hide show
  1. package/dist/base.css +1 -1
  2. package/dist/base.js +1 -1
  3. package/dist/cjs/{BoostGenericCard-dd01e934.js → BoostGenericCard-55f710ad.js} +41 -5
  4. package/dist/cjs/BoostGenericCard-55f710ad.js.map +1 -0
  5. package/dist/cjs/{CertificateDisplayCard-e228ff3d.js → CertificateDisplayCard-9f619468.js} +43 -7
  6. package/dist/cjs/CertificateDisplayCard-9f619468.js.map +1 -0
  7. package/dist/cjs/{MeritBadgeDisplayCard-5cbc63e8.js → MeritBadgeDisplayCard-81bd14b8.js} +7 -5
  8. package/dist/cjs/MeritBadgeDisplayCard-81bd14b8.js.map +1 -0
  9. package/dist/cjs/{MeritBadgeSkillsCount-54879719.js → MeritBadgeSkillsCount-85cf4a91.js} +3 -3
  10. package/dist/cjs/{MeritBadgeSkillsCount-54879719.js.map → MeritBadgeSkillsCount-85cf4a91.js.map} +1 -1
  11. package/dist/cjs/{Notification-d212fa7b.js → Notification-3fe4a359.js} +2 -2
  12. package/dist/cjs/{Notification-d212fa7b.js.map → Notification-3fe4a359.js.map} +1 -1
  13. package/dist/cjs/{NotificationBoostCard-cf2140c0.js → NotificationBoostCard-be514ddb.js} +2 -2
  14. package/dist/cjs/{NotificationBoostCard-cf2140c0.js.map → NotificationBoostCard-be514ddb.js.map} +1 -1
  15. package/dist/cjs/PuzzlePiece-088d2b00.js +77 -0
  16. package/dist/cjs/PuzzlePiece-088d2b00.js.map +1 -0
  17. package/dist/cjs/{SchoolIDCard-39a099d2.js → SchoolIDCard-42d7c96f.js} +628 -347
  18. package/dist/cjs/SchoolIDCard-42d7c96f.js.map +1 -0
  19. package/dist/cjs/{VCCard-32aeadb3.js → VCCard-f5bc1db8.js} +3 -3
  20. package/dist/cjs/{VCCard-32aeadb3.js.map → VCCard-f5bc1db8.js.map} +1 -1
  21. package/dist/cjs/{VCDisplayBackFace-4543749f.js → VCDisplayBackFace-6000a58b.js} +3 -3
  22. package/dist/cjs/{VCDisplayBackFace-4543749f.js.map → VCDisplayBackFace-6000a58b.js.map} +1 -1
  23. package/dist/cjs/{VCDisplayCard-353cc9ed.js → VCDisplayCard-9512d8f2.js} +3 -3
  24. package/dist/cjs/{VCDisplayCard-353cc9ed.js.map → VCDisplayCard-9512d8f2.js.map} +1 -1
  25. package/dist/cjs/{VCDisplayCard2-50acd7c8.js → VCDisplayCard2-2a1d5f57.js} +11 -9
  26. package/dist/cjs/VCDisplayCard2-2a1d5f57.js.map +1 -0
  27. package/dist/cjs/{VCVerificationPill-88723dfa.js → VCVerificationPill-d6303ad0.js} +2 -2
  28. package/dist/cjs/{VCVerificationPill-88723dfa.js.map → VCVerificationPill-d6303ad0.js.map} +1 -1
  29. package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js → VerifierStateBadgeAndText-67eddbaf.js} +2 -2
  30. package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js.map → VerifierStateBadgeAndText-67eddbaf.js.map} +1 -1
  31. package/dist/cjs/{credential.helpers-90b66932.js → credential.helpers-60b421b9.js} +4 -4
  32. package/dist/cjs/{credential.helpers-90b66932.js.map → credential.helpers-60b421b9.js.map} +1 -1
  33. package/dist/cjs/{index-a9e3ddf5.js → index-0cac2c5b.js} +1 -1
  34. package/dist/cjs/{index-a9e3ddf5.js.map → index-0cac2c5b.js.map} +1 -1
  35. package/dist/cjs/index.js +78 -21
  36. package/dist/cjs/index.js.map +1 -1
  37. package/dist/cjs/index13.js +19 -20
  38. package/dist/cjs/index13.js.map +1 -1
  39. package/dist/cjs/index21.js +7 -7
  40. package/dist/cjs/index23.js +3 -3
  41. package/dist/cjs/index24.js +3 -3
  42. package/dist/cjs/index3.js +6 -7
  43. package/dist/cjs/index3.js.map +1 -1
  44. package/dist/cjs/index30.js +1 -1
  45. package/dist/cjs/index38.js +12 -13
  46. package/dist/cjs/index38.js.map +1 -1
  47. package/dist/cjs/index39.js +6 -6
  48. package/dist/cjs/index40.js +7 -7
  49. package/dist/cjs/index41.js +8 -9
  50. package/dist/cjs/index41.js.map +1 -1
  51. package/dist/cjs/index42.js +2 -2
  52. package/dist/cjs/index45.js +2 -2
  53. package/dist/cjs/index6.js +7 -8
  54. package/dist/cjs/index6.js.map +1 -1
  55. package/dist/cjs/{types-8eab1382.js → types-f01c65d1.js} +2 -2
  56. package/dist/cjs/{types-8eab1382.js.map → types-f01c65d1.js.map} +1 -1
  57. package/dist/cjs/{types.esm-6ce4cc67.js → types.esm-ae4cdf49.js} +1086 -1032
  58. package/dist/cjs/types.esm-ae4cdf49.js.map +1 -0
  59. package/dist/esm/{BoostGenericCard-5b70fa63.js → BoostGenericCard-4cfa6556.js} +41 -5
  60. package/dist/esm/BoostGenericCard-4cfa6556.js.map +1 -0
  61. package/dist/esm/{CertificateDisplayCard-d2a0d0e3.js → CertificateDisplayCard-58c52cdb.js} +42 -7
  62. package/dist/esm/CertificateDisplayCard-58c52cdb.js.map +1 -0
  63. package/dist/esm/{MeritBadgeDisplayCard-bc462990.js → MeritBadgeDisplayCard-c87b0271.js} +7 -5
  64. package/dist/esm/MeritBadgeDisplayCard-c87b0271.js.map +1 -0
  65. package/dist/esm/{MeritBadgeSkillsCount-d2408dfe.js → MeritBadgeSkillsCount-77ceb64c.js} +3 -3
  66. package/dist/esm/{MeritBadgeSkillsCount-d2408dfe.js.map → MeritBadgeSkillsCount-77ceb64c.js.map} +1 -1
  67. package/dist/esm/{Notification-95d159d2.js → Notification-76adb92c.js} +2 -2
  68. package/dist/esm/{Notification-95d159d2.js.map → Notification-76adb92c.js.map} +1 -1
  69. package/dist/esm/{NotificationBoostCard-42596c2c.js → NotificationBoostCard-e6f1ab86.js} +2 -2
  70. package/dist/esm/{NotificationBoostCard-42596c2c.js.map → NotificationBoostCard-e6f1ab86.js.map} +1 -1
  71. package/dist/esm/PuzzlePiece-4541648e.js +71 -0
  72. package/dist/esm/PuzzlePiece-4541648e.js.map +1 -0
  73. package/dist/esm/{SchoolIDCard-752092fb.js → SchoolIDCard-7c3ba74c.js} +628 -347
  74. package/dist/esm/SchoolIDCard-7c3ba74c.js.map +1 -0
  75. package/dist/esm/{VCCard-afbea3f5.js → VCCard-a5dda1f4.js} +3 -3
  76. package/dist/esm/{VCCard-afbea3f5.js.map → VCCard-a5dda1f4.js.map} +1 -1
  77. package/dist/esm/{VCDisplayBackFace-f08563e9.js → VCDisplayBackFace-af01c8b3.js} +3 -3
  78. package/dist/esm/{VCDisplayBackFace-f08563e9.js.map → VCDisplayBackFace-af01c8b3.js.map} +1 -1
  79. package/dist/esm/{VCDisplayCard-7fc1dd02.js → VCDisplayCard-36f34504.js} +3 -3
  80. package/dist/esm/{VCDisplayCard-7fc1dd02.js.map → VCDisplayCard-36f34504.js.map} +1 -1
  81. package/dist/esm/{VCDisplayCard2-415128f5.js → VCDisplayCard2-04e304db.js} +11 -9
  82. package/dist/esm/VCDisplayCard2-04e304db.js.map +1 -0
  83. package/dist/esm/{VCVerificationPill-2ef031c2.js → VCVerificationPill-0e2c1172.js} +2 -2
  84. package/dist/esm/{VCVerificationPill-2ef031c2.js.map → VCVerificationPill-0e2c1172.js.map} +1 -1
  85. package/dist/esm/{VerifierStateBadgeAndText-151db666.js → VerifierStateBadgeAndText-2e5414f4.js} +2 -2
  86. package/dist/esm/{VerifierStateBadgeAndText-151db666.js.map → VerifierStateBadgeAndText-2e5414f4.js.map} +1 -1
  87. package/dist/esm/{credential.helpers-5731a09d.js → credential.helpers-97c7e3d4.js} +4 -4
  88. package/dist/esm/{credential.helpers-5731a09d.js.map → credential.helpers-97c7e3d4.js.map} +1 -1
  89. package/dist/esm/{index-1fa04a2d.js → index-eae3ca64.js} +1 -1
  90. package/dist/esm/{index-1fa04a2d.js.map → index-eae3ca64.js.map} +1 -1
  91. package/dist/esm/index.js +75 -20
  92. package/dist/esm/index.js.map +1 -1
  93. package/dist/esm/index13.js +18 -19
  94. package/dist/esm/index13.js.map +1 -1
  95. package/dist/esm/index21.js +7 -7
  96. package/dist/esm/index23.js +3 -3
  97. package/dist/esm/index24.js +3 -3
  98. package/dist/esm/index3.js +6 -7
  99. package/dist/esm/index3.js.map +1 -1
  100. package/dist/esm/index30.js +1 -1
  101. package/dist/esm/index38.js +12 -13
  102. package/dist/esm/index38.js.map +1 -1
  103. package/dist/esm/index39.js +6 -6
  104. package/dist/esm/index40.js +7 -7
  105. package/dist/esm/index41.js +8 -9
  106. package/dist/esm/index41.js.map +1 -1
  107. package/dist/esm/index42.js +2 -2
  108. package/dist/esm/index45.js +2 -2
  109. package/dist/esm/index6.js +6 -7
  110. package/dist/esm/index6.js.map +1 -1
  111. package/dist/esm/{types-cfde3c2b.js → types-05bc737d.js} +2 -2
  112. package/dist/esm/{types-cfde3c2b.js.map → types-05bc737d.js.map} +1 -1
  113. package/dist/esm/{types.esm-00eeb9f6.js → types.esm-c7016566.js} +1086 -1032
  114. package/dist/esm/types.esm-c7016566.js.map +1 -0
  115. package/dist/index.d.ts +16 -2
  116. package/dist/main.css +1 -1
  117. package/dist/main.js +1 -1
  118. package/package.json +10 -3
  119. package/dist/cjs/BoostGenericCard-dd01e934.js.map +0 -1
  120. package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js +0 -45
  121. package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js.map +0 -1
  122. package/dist/cjs/CertificateDisplayCard-e228ff3d.js.map +0 -1
  123. package/dist/cjs/MeritBadgeDisplayCard-5cbc63e8.js.map +0 -1
  124. package/dist/cjs/PuzzlePiece-937c216a.js +0 -31
  125. package/dist/cjs/PuzzlePiece-937c216a.js.map +0 -1
  126. package/dist/cjs/SchoolIDCard-39a099d2.js.map +0 -1
  127. package/dist/cjs/VCDisplayCard2-50acd7c8.js.map +0 -1
  128. package/dist/cjs/types.esm-6ce4cc67.js.map +0 -1
  129. package/dist/esm/BoostGenericCard-5b70fa63.js.map +0 -1
  130. package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js +0 -39
  131. package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js.map +0 -1
  132. package/dist/esm/CertificateDisplayCard-d2a0d0e3.js.map +0 -1
  133. package/dist/esm/MeritBadgeDisplayCard-bc462990.js.map +0 -1
  134. package/dist/esm/PuzzlePiece-1fb12c2e.js +0 -25
  135. package/dist/esm/PuzzlePiece-1fb12c2e.js.map +0 -1
  136. package/dist/esm/SchoolIDCard-752092fb.js.map +0 -1
  137. package/dist/esm/VCDisplayCard2-415128f5.js.map +0 -1
  138. package/dist/esm/types.esm-00eeb9f6.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  var util;
4
4
  (function (util) {
5
- util.assertEqual = (val) => val;
5
+ util.assertEqual = (_) => { };
6
6
  function assertIs(_arg) { }
7
7
  util.assertIs = assertIs;
8
8
  function assertNever(_x) {
@@ -49,11 +49,9 @@ var util;
49
49
  };
50
50
  util.isInteger = typeof Number.isInteger === "function"
51
51
  ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
52
- : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
52
+ : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
53
53
  function joinValues(array, separator = " | ") {
54
- return array
55
- .map((val) => (typeof val === "string" ? `'${val}'` : val))
56
- .join(separator);
54
+ return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
57
55
  }
58
56
  util.joinValues = joinValues;
59
57
  util.jsonStringifyReplacer = (_, value) => {
@@ -102,7 +100,7 @@ const getParsedType = (data) => {
102
100
  case "string":
103
101
  return ZodParsedType.string;
104
102
  case "number":
105
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
103
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
106
104
  case "boolean":
107
105
  return ZodParsedType.boolean;
108
106
  case "function":
@@ -118,10 +116,7 @@ const getParsedType = (data) => {
118
116
  if (data === null) {
119
117
  return ZodParsedType.null;
120
118
  }
121
- if (data.then &&
122
- typeof data.then === "function" &&
123
- data.catch &&
124
- typeof data.catch === "function") {
119
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
125
120
  return ZodParsedType.promise;
126
121
  }
127
122
  if (typeof Map !== "undefined" && data instanceof Map) {
@@ -162,6 +157,9 @@ const quotelessJson = (obj) => {
162
157
  return json.replace(/"([^"]+)":/g, "$1:");
163
158
  };
164
159
  class ZodError extends Error {
160
+ get errors() {
161
+ return this.issues;
162
+ }
165
163
  constructor(issues) {
166
164
  super();
167
165
  this.issues = [];
@@ -182,9 +180,6 @@ class ZodError extends Error {
182
180
  this.name = "ZodError";
183
181
  this.issues = issues;
184
182
  }
185
- get errors() {
186
- return this.issues;
187
- }
188
183
  format(_mapper) {
189
184
  const mapper = _mapper ||
190
185
  function (issue) {
@@ -253,8 +248,9 @@ class ZodError extends Error {
253
248
  const formErrors = [];
254
249
  for (const sub of this.issues) {
255
250
  if (sub.path.length > 0) {
256
- fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
257
- fieldErrors[sub.path[0]].push(mapper(sub));
251
+ const firstEl = sub.path[0];
252
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
253
+ fieldErrors[firstEl].push(mapper(sub));
258
254
  }
259
255
  else {
260
256
  formErrors.push(mapper(sub));
@@ -337,17 +333,11 @@ const errorMap = (issue, _ctx) => {
337
333
  else if (issue.type === "string")
338
334
  message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
339
335
  else if (issue.type === "number")
340
- message = `Number must be ${issue.exact
341
- ? `exactly equal to `
342
- : issue.inclusive
343
- ? `greater than or equal to `
344
- : `greater than `}${issue.minimum}`;
336
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
337
+ else if (issue.type === "bigint")
338
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
345
339
  else if (issue.type === "date")
346
- message = `Date must be ${issue.exact
347
- ? `exactly equal to `
348
- : issue.inclusive
349
- ? `greater than or equal to `
350
- : `greater than `}${new Date(Number(issue.minimum))}`;
340
+ message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
351
341
  else
352
342
  message = "Invalid input";
353
343
  break;
@@ -357,23 +347,11 @@ const errorMap = (issue, _ctx) => {
357
347
  else if (issue.type === "string")
358
348
  message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
359
349
  else if (issue.type === "number")
360
- message = `Number must be ${issue.exact
361
- ? `exactly`
362
- : issue.inclusive
363
- ? `less than or equal to`
364
- : `less than`} ${issue.maximum}`;
350
+ message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
365
351
  else if (issue.type === "bigint")
366
- message = `BigInt must be ${issue.exact
367
- ? `exactly`
368
- : issue.inclusive
369
- ? `less than or equal to`
370
- : `less than`} ${issue.maximum}`;
352
+ message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
371
353
  else if (issue.type === "date")
372
- message = `Date must be ${issue.exact
373
- ? `exactly`
374
- : issue.inclusive
375
- ? `smaller than or equal to`
376
- : `smaller than`} ${new Date(Number(issue.maximum))}`;
354
+ message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
377
355
  else
378
356
  message = "Invalid input";
379
357
  break;
@@ -440,9 +418,9 @@ function addIssueToContext(ctx, issueData) {
440
418
  data: ctx.data,
441
419
  path: ctx.path,
442
420
  errorMaps: [
443
- ctx.common.contextualErrorMap,
444
- ctx.schemaErrorMap,
445
- overrideMap,
421
+ ctx.common.contextualErrorMap, // contextual error map is first priority
422
+ ctx.schemaErrorMap, // then schema-bound map if available
423
+ overrideMap, // then global override map
446
424
  overrideMap === errorMap ? undefined : errorMap, // then global default map
447
425
  ].filter((x) => !!x),
448
426
  });
@@ -495,8 +473,7 @@ class ParseStatus {
495
473
  status.dirty();
496
474
  if (value.status === "dirty")
497
475
  status.dirty();
498
- if (key.value !== "__proto__" &&
499
- (typeof value.value !== "undefined" || pair.alwaysSet)) {
476
+ if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
500
477
  finalObject[key.value] = value.value;
501
478
  }
502
479
  }
@@ -513,46 +490,13 @@ const isDirty = (x) => x.status === "dirty";
513
490
  const isValid = (x) => x.status === "valid";
514
491
  const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
515
492
 
516
- /******************************************************************************
517
- Copyright (c) Microsoft Corporation.
518
-
519
- Permission to use, copy, modify, and/or distribute this software for any
520
- purpose with or without fee is hereby granted.
521
-
522
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
523
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
524
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
525
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
526
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
527
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
528
- PERFORMANCE OF THIS SOFTWARE.
529
- ***************************************************************************** */
530
-
531
- function __classPrivateFieldGet(receiver, state, kind, f) {
532
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
533
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
534
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
535
- }
536
-
537
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
538
- if (kind === "m") throw new TypeError("Private method is not writable");
539
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
540
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
541
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
542
- }
543
-
544
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
545
- var e = new Error(message);
546
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
547
- };
548
-
549
493
  var errorUtil;
550
494
  (function (errorUtil) {
551
495
  errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
552
- errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
496
+ // biome-ignore lint:
497
+ errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
553
498
  })(errorUtil || (errorUtil = {}));
554
499
 
555
- var _ZodEnum_cache, _ZodNativeEnum_cache;
556
500
  class ParseInputLazyPath {
557
501
  constructor(parent, value, path, key) {
558
502
  this._cachedPath = [];
@@ -563,7 +507,7 @@ class ParseInputLazyPath {
563
507
  }
564
508
  get path() {
565
509
  if (!this._cachedPath.length) {
566
- if (this._key instanceof Array) {
510
+ if (Array.isArray(this._key)) {
567
511
  this._cachedPath.push(...this._path, ...this._key);
568
512
  }
569
513
  else {
@@ -603,50 +547,20 @@ function processCreateParams(params) {
603
547
  if (errorMap)
604
548
  return { errorMap: errorMap, description };
605
549
  const customMap = (iss, ctx) => {
606
- var _a, _b;
607
550
  const { message } = params;
608
551
  if (iss.code === "invalid_enum_value") {
609
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
552
+ return { message: message ?? ctx.defaultError };
610
553
  }
611
554
  if (typeof ctx.data === "undefined") {
612
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
555
+ return { message: message ?? required_error ?? ctx.defaultError };
613
556
  }
614
557
  if (iss.code !== "invalid_type")
615
558
  return { message: ctx.defaultError };
616
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
559
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
617
560
  };
618
561
  return { errorMap: customMap, description };
619
562
  }
620
563
  class ZodType {
621
- constructor(def) {
622
- /** Alias of safeParseAsync */
623
- this.spa = this.safeParseAsync;
624
- this._def = def;
625
- this.parse = this.parse.bind(this);
626
- this.safeParse = this.safeParse.bind(this);
627
- this.parseAsync = this.parseAsync.bind(this);
628
- this.safeParseAsync = this.safeParseAsync.bind(this);
629
- this.spa = this.spa.bind(this);
630
- this.refine = this.refine.bind(this);
631
- this.refinement = this.refinement.bind(this);
632
- this.superRefine = this.superRefine.bind(this);
633
- this.optional = this.optional.bind(this);
634
- this.nullable = this.nullable.bind(this);
635
- this.nullish = this.nullish.bind(this);
636
- this.array = this.array.bind(this);
637
- this.promise = this.promise.bind(this);
638
- this.or = this.or.bind(this);
639
- this.and = this.and.bind(this);
640
- this.transform = this.transform.bind(this);
641
- this.brand = this.brand.bind(this);
642
- this.default = this.default.bind(this);
643
- this.catch = this.catch.bind(this);
644
- this.describe = this.describe.bind(this);
645
- this.pipe = this.pipe.bind(this);
646
- this.readonly = this.readonly.bind(this);
647
- this.isNullable = this.isNullable.bind(this);
648
- this.isOptional = this.isOptional.bind(this);
649
- }
650
564
  get description() {
651
565
  return this._def.description;
652
566
  }
@@ -694,14 +608,13 @@ class ZodType {
694
608
  throw result.error;
695
609
  }
696
610
  safeParse(data, params) {
697
- var _a;
698
611
  const ctx = {
699
612
  common: {
700
613
  issues: [],
701
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
702
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
614
+ async: params?.async ?? false,
615
+ contextualErrorMap: params?.errorMap,
703
616
  },
704
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
617
+ path: params?.path || [],
705
618
  schemaErrorMap: this._def.errorMap,
706
619
  parent: null,
707
620
  data,
@@ -710,6 +623,47 @@ class ZodType {
710
623
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
711
624
  return handleResult(ctx, result);
712
625
  }
626
+ "~validate"(data) {
627
+ const ctx = {
628
+ common: {
629
+ issues: [],
630
+ async: !!this["~standard"].async,
631
+ },
632
+ path: [],
633
+ schemaErrorMap: this._def.errorMap,
634
+ parent: null,
635
+ data,
636
+ parsedType: getParsedType(data),
637
+ };
638
+ if (!this["~standard"].async) {
639
+ try {
640
+ const result = this._parseSync({ data, path: [], parent: ctx });
641
+ return isValid(result)
642
+ ? {
643
+ value: result.value,
644
+ }
645
+ : {
646
+ issues: ctx.common.issues,
647
+ };
648
+ }
649
+ catch (err) {
650
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
651
+ this["~standard"].async = true;
652
+ }
653
+ ctx.common = {
654
+ issues: [],
655
+ async: true,
656
+ };
657
+ }
658
+ }
659
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)
660
+ ? {
661
+ value: result.value,
662
+ }
663
+ : {
664
+ issues: ctx.common.issues,
665
+ });
666
+ }
713
667
  async parseAsync(data, params) {
714
668
  const result = await this.safeParseAsync(data, params);
715
669
  if (result.success)
@@ -720,19 +674,17 @@ class ZodType {
720
674
  const ctx = {
721
675
  common: {
722
676
  issues: [],
723
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
677
+ contextualErrorMap: params?.errorMap,
724
678
  async: true,
725
679
  },
726
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
680
+ path: params?.path || [],
727
681
  schemaErrorMap: this._def.errorMap,
728
682
  parent: null,
729
683
  data,
730
684
  parsedType: getParsedType(data),
731
685
  };
732
686
  const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
733
- const result = await (isAsync(maybeAsyncResult)
734
- ? maybeAsyncResult
735
- : Promise.resolve(maybeAsyncResult));
687
+ const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
736
688
  return handleResult(ctx, result);
737
689
  }
738
690
  refine(check, message) {
@@ -776,9 +728,7 @@ class ZodType {
776
728
  refinement(check, refinementData) {
777
729
  return this._refinement((val, ctx) => {
778
730
  if (!check(val)) {
779
- ctx.addIssue(typeof refinementData === "function"
780
- ? refinementData(val, ctx)
781
- : refinementData);
731
+ ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
782
732
  return false;
783
733
  }
784
734
  else {
@@ -796,6 +746,40 @@ class ZodType {
796
746
  superRefine(refinement) {
797
747
  return this._refinement(refinement);
798
748
  }
749
+ constructor(def) {
750
+ /** Alias of safeParseAsync */
751
+ this.spa = this.safeParseAsync;
752
+ this._def = def;
753
+ this.parse = this.parse.bind(this);
754
+ this.safeParse = this.safeParse.bind(this);
755
+ this.parseAsync = this.parseAsync.bind(this);
756
+ this.safeParseAsync = this.safeParseAsync.bind(this);
757
+ this.spa = this.spa.bind(this);
758
+ this.refine = this.refine.bind(this);
759
+ this.refinement = this.refinement.bind(this);
760
+ this.superRefine = this.superRefine.bind(this);
761
+ this.optional = this.optional.bind(this);
762
+ this.nullable = this.nullable.bind(this);
763
+ this.nullish = this.nullish.bind(this);
764
+ this.array = this.array.bind(this);
765
+ this.promise = this.promise.bind(this);
766
+ this.or = this.or.bind(this);
767
+ this.and = this.and.bind(this);
768
+ this.transform = this.transform.bind(this);
769
+ this.brand = this.brand.bind(this);
770
+ this.default = this.default.bind(this);
771
+ this.catch = this.catch.bind(this);
772
+ this.describe = this.describe.bind(this);
773
+ this.pipe = this.pipe.bind(this);
774
+ this.readonly = this.readonly.bind(this);
775
+ this.isNullable = this.isNullable.bind(this);
776
+ this.isOptional = this.isOptional.bind(this);
777
+ this["~standard"] = {
778
+ version: 1,
779
+ vendor: "zod",
780
+ validate: (data) => this["~validate"](data),
781
+ };
782
+ }
799
783
  optional() {
800
784
  return ZodOptional.create(this, this._def);
801
785
  }
@@ -806,7 +790,7 @@ class ZodType {
806
790
  return this.nullable().optional();
807
791
  }
808
792
  array() {
809
- return ZodArray.create(this, this._def);
793
+ return ZodArray.create(this);
810
794
  }
811
795
  promise() {
812
796
  return ZodPromise.create(this, this._def);
@@ -872,11 +856,12 @@ class ZodType {
872
856
  }
873
857
  const cuidRegex = /^c[^\s-]{8,}$/i;
874
858
  const cuid2Regex = /^[0-9a-z]+$/;
875
- const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
859
+ const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
876
860
  // const uuidRegex =
877
861
  // /^([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;
878
862
  const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
879
863
  const nanoidRegex = /^[a-z0-9_-]{21}$/i;
864
+ const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
880
865
  const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
881
866
  // from https://stackoverflow.com/a/46181/1550155
882
867
  // old version: too slow, didn't support unicode
@@ -898,9 +883,15 @@ const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
898
883
  let emojiRegex;
899
884
  // faster, simpler, safer
900
885
  const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
901
- const ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
886
+ const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
887
+ // const ipv6Regex =
888
+ // /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
889
+ const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
890
+ const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
902
891
  // https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
903
892
  const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
893
+ // https://base64.guru/standards/base64url
894
+ const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
904
895
  // simple
905
896
  // const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
906
897
  // no leap year validation
@@ -909,15 +900,15 @@ const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}
909
900
  const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
910
901
  const dateRegex = new RegExp(`^${dateRegexSource}$`);
911
902
  function timeRegexSource(args) {
912
- // let regex = `\\d{2}:\\d{2}:\\d{2}`;
913
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
903
+ let secondsRegexSource = `[0-5]\\d`;
914
904
  if (args.precision) {
915
- regex = `${regex}\\.\\d{${args.precision}}`;
905
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
916
906
  }
917
907
  else if (args.precision == null) {
918
- regex = `${regex}(\\.\\d+)?`;
908
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
919
909
  }
920
- return regex;
910
+ const secondsQuantifier = args.precision ? "+" : "?"; // require seconds if precision is nonzero
911
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
921
912
  }
922
913
  function timeRegex(args) {
923
914
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -941,6 +932,42 @@ function isValidIP(ip, version) {
941
932
  }
942
933
  return false;
943
934
  }
935
+ function isValidJWT(jwt, alg) {
936
+ if (!jwtRegex.test(jwt))
937
+ return false;
938
+ try {
939
+ const [header] = jwt.split(".");
940
+ if (!header)
941
+ return false;
942
+ // Convert base64url to base64
943
+ const base64 = header
944
+ .replace(/-/g, "+")
945
+ .replace(/_/g, "/")
946
+ .padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
947
+ const decoded = JSON.parse(atob(base64));
948
+ if (typeof decoded !== "object" || decoded === null)
949
+ return false;
950
+ if ("typ" in decoded && decoded?.typ !== "JWT")
951
+ return false;
952
+ if (!decoded.alg)
953
+ return false;
954
+ if (alg && decoded.alg !== alg)
955
+ return false;
956
+ return true;
957
+ }
958
+ catch {
959
+ return false;
960
+ }
961
+ }
962
+ function isValidCidr(ip, version) {
963
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
964
+ return true;
965
+ }
966
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
967
+ return true;
968
+ }
969
+ return false;
970
+ }
944
971
  class ZodString extends ZodType {
945
972
  _parse(input) {
946
973
  if (this._def.coerce) {
@@ -1099,7 +1126,7 @@ class ZodString extends ZodType {
1099
1126
  try {
1100
1127
  new URL(input.data);
1101
1128
  }
1102
- catch (_a) {
1129
+ catch {
1103
1130
  ctx = this._getOrReturnCtx(input, ctx);
1104
1131
  addIssueToContext(ctx, {
1105
1132
  validation: "url",
@@ -1222,6 +1249,28 @@ class ZodString extends ZodType {
1222
1249
  status.dirty();
1223
1250
  }
1224
1251
  }
1252
+ else if (check.kind === "jwt") {
1253
+ if (!isValidJWT(input.data, check.alg)) {
1254
+ ctx = this._getOrReturnCtx(input, ctx);
1255
+ addIssueToContext(ctx, {
1256
+ validation: "jwt",
1257
+ code: ZodIssueCode.invalid_string,
1258
+ message: check.message,
1259
+ });
1260
+ status.dirty();
1261
+ }
1262
+ }
1263
+ else if (check.kind === "cidr") {
1264
+ if (!isValidCidr(input.data, check.version)) {
1265
+ ctx = this._getOrReturnCtx(input, ctx);
1266
+ addIssueToContext(ctx, {
1267
+ validation: "cidr",
1268
+ code: ZodIssueCode.invalid_string,
1269
+ message: check.message,
1270
+ });
1271
+ status.dirty();
1272
+ }
1273
+ }
1225
1274
  else if (check.kind === "base64") {
1226
1275
  if (!base64Regex.test(input.data)) {
1227
1276
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1233,6 +1282,17 @@ class ZodString extends ZodType {
1233
1282
  status.dirty();
1234
1283
  }
1235
1284
  }
1285
+ else if (check.kind === "base64url") {
1286
+ if (!base64urlRegex.test(input.data)) {
1287
+ ctx = this._getOrReturnCtx(input, ctx);
1288
+ addIssueToContext(ctx, {
1289
+ validation: "base64url",
1290
+ code: ZodIssueCode.invalid_string,
1291
+ message: check.message,
1292
+ });
1293
+ status.dirty();
1294
+ }
1295
+ }
1236
1296
  else {
1237
1297
  util.assertNever(check);
1238
1298
  }
@@ -1279,11 +1339,23 @@ class ZodString extends ZodType {
1279
1339
  base64(message) {
1280
1340
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1281
1341
  }
1342
+ base64url(message) {
1343
+ // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
1344
+ return this._addCheck({
1345
+ kind: "base64url",
1346
+ ...errorUtil.errToObj(message),
1347
+ });
1348
+ }
1349
+ jwt(options) {
1350
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1351
+ }
1282
1352
  ip(options) {
1283
1353
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1284
1354
  }
1355
+ cidr(options) {
1356
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1357
+ }
1285
1358
  datetime(options) {
1286
- var _a, _b;
1287
1359
  if (typeof options === "string") {
1288
1360
  return this._addCheck({
1289
1361
  kind: "datetime",
@@ -1295,10 +1367,10 @@ class ZodString extends ZodType {
1295
1367
  }
1296
1368
  return this._addCheck({
1297
1369
  kind: "datetime",
1298
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1299
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1300
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1301
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1370
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1371
+ offset: options?.offset ?? false,
1372
+ local: options?.local ?? false,
1373
+ ...errorUtil.errToObj(options?.message),
1302
1374
  });
1303
1375
  }
1304
1376
  date(message) {
@@ -1314,8 +1386,8 @@ class ZodString extends ZodType {
1314
1386
  }
1315
1387
  return this._addCheck({
1316
1388
  kind: "time",
1317
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1318
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1389
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1390
+ ...errorUtil.errToObj(options?.message),
1319
1391
  });
1320
1392
  }
1321
1393
  duration(message) {
@@ -1332,8 +1404,8 @@ class ZodString extends ZodType {
1332
1404
  return this._addCheck({
1333
1405
  kind: "includes",
1334
1406
  value: value,
1335
- position: options === null || options === void 0 ? void 0 : options.position,
1336
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1407
+ position: options?.position,
1408
+ ...errorUtil.errToObj(options?.message),
1337
1409
  });
1338
1410
  }
1339
1411
  startsWith(value, message) {
@@ -1372,8 +1444,7 @@ class ZodString extends ZodType {
1372
1444
  });
1373
1445
  }
1374
1446
  /**
1375
- * @deprecated Use z.string().min(1) instead.
1376
- * @see {@link ZodString.min}
1447
+ * Equivalent to `.min(1)`
1377
1448
  */
1378
1449
  nonempty(message) {
1379
1450
  return this.min(1, errorUtil.errToObj(message));
@@ -1435,9 +1506,16 @@ class ZodString extends ZodType {
1435
1506
  get isIP() {
1436
1507
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1437
1508
  }
1509
+ get isCIDR() {
1510
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1511
+ }
1438
1512
  get isBase64() {
1439
1513
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1440
1514
  }
1515
+ get isBase64url() {
1516
+ // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
1517
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1518
+ }
1441
1519
  get minLength() {
1442
1520
  let min = null;
1443
1521
  for (const ch of this._def.checks) {
@@ -1460,11 +1538,10 @@ class ZodString extends ZodType {
1460
1538
  }
1461
1539
  }
1462
1540
  ZodString.create = (params) => {
1463
- var _a;
1464
1541
  return new ZodString({
1465
1542
  checks: [],
1466
1543
  typeName: ZodFirstPartyTypeKind.ZodString,
1467
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1544
+ coerce: params?.coerce ?? false,
1468
1545
  ...processCreateParams(params),
1469
1546
  });
1470
1547
  };
@@ -1473,9 +1550,9 @@ function floatSafeRemainder(val, step) {
1473
1550
  const valDecCount = (val.toString().split(".")[1] || "").length;
1474
1551
  const stepDecCount = (step.toString().split(".")[1] || "").length;
1475
1552
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1476
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1477
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1478
- return (valInt % stepInt) / Math.pow(10, decCount);
1553
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1554
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1555
+ return (valInt % stepInt) / 10 ** decCount;
1479
1556
  }
1480
1557
  class ZodNumber extends ZodType {
1481
1558
  constructor() {
@@ -1514,9 +1591,7 @@ class ZodNumber extends ZodType {
1514
1591
  }
1515
1592
  }
1516
1593
  else if (check.kind === "min") {
1517
- const tooSmall = check.inclusive
1518
- ? input.data < check.value
1519
- : input.data <= check.value;
1594
+ const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
1520
1595
  if (tooSmall) {
1521
1596
  ctx = this._getOrReturnCtx(input, ctx);
1522
1597
  addIssueToContext(ctx, {
@@ -1531,9 +1606,7 @@ class ZodNumber extends ZodType {
1531
1606
  }
1532
1607
  }
1533
1608
  else if (check.kind === "max") {
1534
- const tooBig = check.inclusive
1535
- ? input.data > check.value
1536
- : input.data >= check.value;
1609
+ const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
1537
1610
  if (tooBig) {
1538
1611
  ctx = this._getOrReturnCtx(input, ctx);
1539
1612
  addIssueToContext(ctx, {
@@ -1691,15 +1764,13 @@ class ZodNumber extends ZodType {
1691
1764
  return max;
1692
1765
  }
1693
1766
  get isInt() {
1694
- return !!this._def.checks.find((ch) => ch.kind === "int" ||
1695
- (ch.kind === "multipleOf" && util.isInteger(ch.value)));
1767
+ return !!this._def.checks.find((ch) => ch.kind === "int" || (ch.kind === "multipleOf" && util.isInteger(ch.value)));
1696
1768
  }
1697
1769
  get isFinite() {
1698
- let max = null, min = null;
1770
+ let max = null;
1771
+ let min = null;
1699
1772
  for (const ch of this._def.checks) {
1700
- if (ch.kind === "finite" ||
1701
- ch.kind === "int" ||
1702
- ch.kind === "multipleOf") {
1773
+ if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1703
1774
  return true;
1704
1775
  }
1705
1776
  else if (ch.kind === "min") {
@@ -1718,7 +1789,7 @@ ZodNumber.create = (params) => {
1718
1789
  return new ZodNumber({
1719
1790
  checks: [],
1720
1791
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1721
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1792
+ coerce: params?.coerce || false,
1722
1793
  ...processCreateParams(params),
1723
1794
  });
1724
1795
  };
@@ -1730,25 +1801,22 @@ class ZodBigInt extends ZodType {
1730
1801
  }
1731
1802
  _parse(input) {
1732
1803
  if (this._def.coerce) {
1733
- input.data = BigInt(input.data);
1804
+ try {
1805
+ input.data = BigInt(input.data);
1806
+ }
1807
+ catch {
1808
+ return this._getInvalidInput(input);
1809
+ }
1734
1810
  }
1735
1811
  const parsedType = this._getType(input);
1736
1812
  if (parsedType !== ZodParsedType.bigint) {
1737
- const ctx = this._getOrReturnCtx(input);
1738
- addIssueToContext(ctx, {
1739
- code: ZodIssueCode.invalid_type,
1740
- expected: ZodParsedType.bigint,
1741
- received: ctx.parsedType,
1742
- });
1743
- return INVALID;
1813
+ return this._getInvalidInput(input);
1744
1814
  }
1745
1815
  let ctx = undefined;
1746
1816
  const status = new ParseStatus();
1747
1817
  for (const check of this._def.checks) {
1748
1818
  if (check.kind === "min") {
1749
- const tooSmall = check.inclusive
1750
- ? input.data < check.value
1751
- : input.data <= check.value;
1819
+ const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
1752
1820
  if (tooSmall) {
1753
1821
  ctx = this._getOrReturnCtx(input, ctx);
1754
1822
  addIssueToContext(ctx, {
@@ -1762,9 +1830,7 @@ class ZodBigInt extends ZodType {
1762
1830
  }
1763
1831
  }
1764
1832
  else if (check.kind === "max") {
1765
- const tooBig = check.inclusive
1766
- ? input.data > check.value
1767
- : input.data >= check.value;
1833
+ const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
1768
1834
  if (tooBig) {
1769
1835
  ctx = this._getOrReturnCtx(input, ctx);
1770
1836
  addIssueToContext(ctx, {
@@ -1794,6 +1860,15 @@ class ZodBigInt extends ZodType {
1794
1860
  }
1795
1861
  return { status: status.value, value: input.data };
1796
1862
  }
1863
+ _getInvalidInput(input) {
1864
+ const ctx = this._getOrReturnCtx(input);
1865
+ addIssueToContext(ctx, {
1866
+ code: ZodIssueCode.invalid_type,
1867
+ expected: ZodParsedType.bigint,
1868
+ received: ctx.parsedType,
1869
+ });
1870
+ return INVALID;
1871
+ }
1797
1872
  gte(value, message) {
1798
1873
  return this.setLimit("min", value, true, errorUtil.toString(message));
1799
1874
  }
@@ -1887,11 +1962,10 @@ class ZodBigInt extends ZodType {
1887
1962
  }
1888
1963
  }
1889
1964
  ZodBigInt.create = (params) => {
1890
- var _a;
1891
1965
  return new ZodBigInt({
1892
1966
  checks: [],
1893
1967
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1894
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1968
+ coerce: params?.coerce ?? false,
1895
1969
  ...processCreateParams(params),
1896
1970
  });
1897
1971
  };
@@ -1916,7 +1990,7 @@ class ZodBoolean extends ZodType {
1916
1990
  ZodBoolean.create = (params) => {
1917
1991
  return new ZodBoolean({
1918
1992
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
1919
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1993
+ coerce: params?.coerce || false,
1920
1994
  ...processCreateParams(params),
1921
1995
  });
1922
1996
  };
@@ -1935,7 +2009,7 @@ class ZodDate extends ZodType {
1935
2009
  });
1936
2010
  return INVALID;
1937
2011
  }
1938
- if (isNaN(input.data.getTime())) {
2012
+ if (Number.isNaN(input.data.getTime())) {
1939
2013
  const ctx = this._getOrReturnCtx(input);
1940
2014
  addIssueToContext(ctx, {
1941
2015
  code: ZodIssueCode.invalid_date,
@@ -2026,7 +2100,7 @@ class ZodDate extends ZodType {
2026
2100
  ZodDate.create = (params) => {
2027
2101
  return new ZodDate({
2028
2102
  checks: [],
2029
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2103
+ coerce: params?.coerce || false,
2030
2104
  typeName: ZodFirstPartyTypeKind.ZodDate,
2031
2105
  ...processCreateParams(params),
2032
2106
  });
@@ -2348,7 +2422,8 @@ class ZodObject extends ZodType {
2348
2422
  return this._cached;
2349
2423
  const shape = this._def.shape();
2350
2424
  const keys = util.objectKeys(shape);
2351
- return (this._cached = { shape, keys });
2425
+ this._cached = { shape, keys };
2426
+ return this._cached;
2352
2427
  }
2353
2428
  _parse(input) {
2354
2429
  const parsedType = this._getType(input);
@@ -2364,8 +2439,7 @@ class ZodObject extends ZodType {
2364
2439
  const { status, ctx } = this._processInputParams(input);
2365
2440
  const { shape, keys: shapeKeys } = this._getCached();
2366
2441
  const extraKeys = [];
2367
- if (!(this._def.catchall instanceof ZodNever &&
2368
- this._def.unknownKeys === "strip")) {
2442
+ if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
2369
2443
  for (const key in ctx.data) {
2370
2444
  if (!shapeKeys.includes(key)) {
2371
2445
  extraKeys.push(key);
@@ -2453,11 +2527,10 @@ class ZodObject extends ZodType {
2453
2527
  ...(message !== undefined
2454
2528
  ? {
2455
2529
  errorMap: (issue, ctx) => {
2456
- var _a, _b, _c, _d;
2457
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
2530
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2458
2531
  if (issue.code === "unrecognized_keys")
2459
2532
  return {
2460
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,
2533
+ message: errorUtil.errToObj(message).message ?? defaultError,
2461
2534
  };
2462
2535
  return {
2463
2536
  message: defaultError,
@@ -2589,11 +2662,11 @@ class ZodObject extends ZodType {
2589
2662
  }
2590
2663
  pick(mask) {
2591
2664
  const shape = {};
2592
- util.objectKeys(mask).forEach((key) => {
2665
+ for (const key of util.objectKeys(mask)) {
2593
2666
  if (mask[key] && this.shape[key]) {
2594
2667
  shape[key] = this.shape[key];
2595
2668
  }
2596
- });
2669
+ }
2597
2670
  return new ZodObject({
2598
2671
  ...this._def,
2599
2672
  shape: () => shape,
@@ -2601,11 +2674,11 @@ class ZodObject extends ZodType {
2601
2674
  }
2602
2675
  omit(mask) {
2603
2676
  const shape = {};
2604
- util.objectKeys(this.shape).forEach((key) => {
2677
+ for (const key of util.objectKeys(this.shape)) {
2605
2678
  if (!mask[key]) {
2606
2679
  shape[key] = this.shape[key];
2607
2680
  }
2608
- });
2681
+ }
2609
2682
  return new ZodObject({
2610
2683
  ...this._def,
2611
2684
  shape: () => shape,
@@ -2619,7 +2692,7 @@ class ZodObject extends ZodType {
2619
2692
  }
2620
2693
  partial(mask) {
2621
2694
  const newShape = {};
2622
- util.objectKeys(this.shape).forEach((key) => {
2695
+ for (const key of util.objectKeys(this.shape)) {
2623
2696
  const fieldSchema = this.shape[key];
2624
2697
  if (mask && !mask[key]) {
2625
2698
  newShape[key] = fieldSchema;
@@ -2627,7 +2700,7 @@ class ZodObject extends ZodType {
2627
2700
  else {
2628
2701
  newShape[key] = fieldSchema.optional();
2629
2702
  }
2630
- });
2703
+ }
2631
2704
  return new ZodObject({
2632
2705
  ...this._def,
2633
2706
  shape: () => newShape,
@@ -2635,7 +2708,7 @@ class ZodObject extends ZodType {
2635
2708
  }
2636
2709
  required(mask) {
2637
2710
  const newShape = {};
2638
- util.objectKeys(this.shape).forEach((key) => {
2711
+ for (const key of util.objectKeys(this.shape)) {
2639
2712
  if (mask && !mask[key]) {
2640
2713
  newShape[key] = this.shape[key];
2641
2714
  }
@@ -2647,7 +2720,7 @@ class ZodObject extends ZodType {
2647
2720
  }
2648
2721
  newShape[key] = newField;
2649
2722
  }
2650
- });
2723
+ }
2651
2724
  return new ZodObject({
2652
2725
  ...this._def,
2653
2726
  shape: () => newShape,
@@ -2919,9 +2992,7 @@ function mergeValues(a, b) {
2919
2992
  }
2920
2993
  else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2921
2994
  const bKeys = util.objectKeys(b);
2922
- const sharedKeys = util
2923
- .objectKeys(a)
2924
- .filter((key) => bKeys.indexOf(key) !== -1);
2995
+ const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2925
2996
  const newObj = { ...a, ...b };
2926
2997
  for (const key of sharedKeys) {
2927
2998
  const sharedValue = mergeValues(a[key], b[key]);
@@ -2948,9 +3019,7 @@ function mergeValues(a, b) {
2948
3019
  }
2949
3020
  return { valid: true, data: newArray };
2950
3021
  }
2951
- else if (aType === ZodParsedType.date &&
2952
- bType === ZodParsedType.date &&
2953
- +a === +b) {
3022
+ else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2954
3023
  return { valid: true, data: a };
2955
3024
  }
2956
3025
  else {
@@ -3011,6 +3080,7 @@ ZodIntersection.create = (left, right, params) => {
3011
3080
  ...processCreateParams(params),
3012
3081
  });
3013
3082
  };
3083
+ // type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
3014
3084
  class ZodTuple extends ZodType {
3015
3085
  _parse(input) {
3016
3086
  const { status, ctx } = this._processInputParams(input);
@@ -3307,12 +3377,7 @@ class ZodFunction extends ZodType {
3307
3377
  return makeIssue({
3308
3378
  data: args,
3309
3379
  path: ctx.path,
3310
- errorMaps: [
3311
- ctx.common.contextualErrorMap,
3312
- ctx.schemaErrorMap,
3313
- getErrorMap(),
3314
- errorMap,
3315
- ].filter((x) => !!x),
3380
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x),
3316
3381
  issueData: {
3317
3382
  code: ZodIssueCode.invalid_arguments,
3318
3383
  argumentsError: error,
@@ -3323,12 +3388,7 @@ class ZodFunction extends ZodType {
3323
3388
  return makeIssue({
3324
3389
  data: returns,
3325
3390
  path: ctx.path,
3326
- errorMaps: [
3327
- ctx.common.contextualErrorMap,
3328
- ctx.schemaErrorMap,
3329
- getErrorMap(),
3330
- errorMap,
3331
- ].filter((x) => !!x),
3391
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x),
3332
3392
  issueData: {
3333
3393
  code: ZodIssueCode.invalid_return_type,
3334
3394
  returnTypeError: error,
@@ -3344,9 +3404,7 @@ class ZodFunction extends ZodType {
3344
3404
  const me = this;
3345
3405
  return OK(async function (...args) {
3346
3406
  const error = new ZodError([]);
3347
- const parsedArgs = await me._def.args
3348
- .parseAsync(args, params)
3349
- .catch((e) => {
3407
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3350
3408
  error.addIssue(makeArgsIssue(args, e));
3351
3409
  throw error;
3352
3410
  });
@@ -3407,9 +3465,7 @@ class ZodFunction extends ZodType {
3407
3465
  }
3408
3466
  static create(args, returns, params) {
3409
3467
  return new ZodFunction({
3410
- args: (args
3411
- ? args
3412
- : ZodTuple.create([]).rest(ZodUnknown.create())),
3468
+ args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())),
3413
3469
  returns: returns || ZodUnknown.create(),
3414
3470
  typeName: ZodFirstPartyTypeKind.ZodFunction,
3415
3471
  ...processCreateParams(params),
@@ -3465,10 +3521,6 @@ function createZodEnum(values, params) {
3465
3521
  });
3466
3522
  }
3467
3523
  class ZodEnum extends ZodType {
3468
- constructor() {
3469
- super(...arguments);
3470
- _ZodEnum_cache.set(this, void 0);
3471
- }
3472
3524
  _parse(input) {
3473
3525
  if (typeof input.data !== "string") {
3474
3526
  const ctx = this._getOrReturnCtx(input);
@@ -3480,10 +3532,10 @@ class ZodEnum extends ZodType {
3480
3532
  });
3481
3533
  return INVALID;
3482
3534
  }
3483
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
3484
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
3535
+ if (!this._cache) {
3536
+ this._cache = new Set(this._def.values);
3485
3537
  }
3486
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3538
+ if (!this._cache.has(input.data)) {
3487
3539
  const ctx = this._getOrReturnCtx(input);
3488
3540
  const expectedValues = this._def.values;
3489
3541
  addIssueToContext(ctx, {
@@ -3532,18 +3584,12 @@ class ZodEnum extends ZodType {
3532
3584
  });
3533
3585
  }
3534
3586
  }
3535
- _ZodEnum_cache = new WeakMap();
3536
3587
  ZodEnum.create = createZodEnum;
3537
3588
  class ZodNativeEnum extends ZodType {
3538
- constructor() {
3539
- super(...arguments);
3540
- _ZodNativeEnum_cache.set(this, void 0);
3541
- }
3542
3589
  _parse(input) {
3543
3590
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
3544
3591
  const ctx = this._getOrReturnCtx(input);
3545
- if (ctx.parsedType !== ZodParsedType.string &&
3546
- ctx.parsedType !== ZodParsedType.number) {
3592
+ if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
3547
3593
  const expectedValues = util.objectValues(nativeEnumValues);
3548
3594
  addIssueToContext(ctx, {
3549
3595
  expected: util.joinValues(expectedValues),
@@ -3552,10 +3598,10 @@ class ZodNativeEnum extends ZodType {
3552
3598
  });
3553
3599
  return INVALID;
3554
3600
  }
3555
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
3556
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
3601
+ if (!this._cache) {
3602
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
3557
3603
  }
3558
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3604
+ if (!this._cache.has(input.data)) {
3559
3605
  const expectedValues = util.objectValues(nativeEnumValues);
3560
3606
  addIssueToContext(ctx, {
3561
3607
  received: ctx.data,
@@ -3570,7 +3616,6 @@ class ZodNativeEnum extends ZodType {
3570
3616
  return this._def.values;
3571
3617
  }
3572
3618
  }
3573
- _ZodNativeEnum_cache = new WeakMap();
3574
3619
  ZodNativeEnum.create = (values, params) => {
3575
3620
  return new ZodNativeEnum({
3576
3621
  values: values,
@@ -3584,8 +3629,7 @@ class ZodPromise extends ZodType {
3584
3629
  }
3585
3630
  _parse(input) {
3586
3631
  const { ctx } = this._processInputParams(input);
3587
- if (ctx.parsedType !== ZodParsedType.promise &&
3588
- ctx.common.async === false) {
3632
+ if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
3589
3633
  addIssueToContext(ctx, {
3590
3634
  code: ZodIssueCode.invalid_type,
3591
3635
  expected: ZodParsedType.promise,
@@ -3593,9 +3637,7 @@ class ZodPromise extends ZodType {
3593
3637
  });
3594
3638
  return INVALID;
3595
3639
  }
3596
- const promisified = ctx.parsedType === ZodParsedType.promise
3597
- ? ctx.data
3598
- : Promise.resolve(ctx.data);
3640
+ const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
3599
3641
  return OK(promisified.then((data) => {
3600
3642
  return this._def.type.parseAsync(data, {
3601
3643
  path: ctx.path,
@@ -3701,9 +3743,7 @@ class ZodEffects extends ZodType {
3701
3743
  return { status: status.value, value: inner.value };
3702
3744
  }
3703
3745
  else {
3704
- return this._def.schema
3705
- ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
3706
- .then((inner) => {
3746
+ return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
3707
3747
  if (inner.status === "aborted")
3708
3748
  return INVALID;
3709
3749
  if (inner.status === "dirty")
@@ -3722,7 +3762,7 @@ class ZodEffects extends ZodType {
3722
3762
  parent: ctx,
3723
3763
  });
3724
3764
  if (!isValid(base))
3725
- return base;
3765
+ return INVALID;
3726
3766
  const result = effect.transform(base.value, checkCtx);
3727
3767
  if (result instanceof Promise) {
3728
3768
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -3730,12 +3770,13 @@ class ZodEffects extends ZodType {
3730
3770
  return { status: status.value, value: result };
3731
3771
  }
3732
3772
  else {
3733
- return this._def.schema
3734
- ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
3735
- .then((base) => {
3773
+ return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3736
3774
  if (!isValid(base))
3737
- return base;
3738
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3775
+ return INVALID;
3776
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3777
+ status: status.value,
3778
+ value: result,
3779
+ }));
3739
3780
  });
3740
3781
  }
3741
3782
  }
@@ -3817,9 +3858,7 @@ ZodDefault.create = (type, params) => {
3817
3858
  return new ZodDefault({
3818
3859
  innerType: type,
3819
3860
  typeName: ZodFirstPartyTypeKind.ZodDefault,
3820
- defaultValue: typeof params.default === "function"
3821
- ? params.default
3822
- : () => params.default,
3861
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3823
3862
  ...processCreateParams(params),
3824
3863
  });
3825
3864
  };
@@ -3985,9 +4024,7 @@ class ZodReadonly extends ZodType {
3985
4024
  }
3986
4025
  return data;
3987
4026
  };
3988
- return isAsync(result)
3989
- ? result.then((data) => freeze(data))
3990
- : freeze(result);
4027
+ return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
3991
4028
  }
3992
4029
  unwrap() {
3993
4030
  return this._def.innerType;
@@ -4000,7 +4037,19 @@ ZodReadonly.create = (type, params) => {
4000
4037
  ...processCreateParams(params),
4001
4038
  });
4002
4039
  };
4003
- function custom(check, params = {},
4040
+ ////////////////////////////////////////
4041
+ ////////////////////////////////////////
4042
+ ////////// //////////
4043
+ ////////// z.custom //////////
4044
+ ////////// //////////
4045
+ ////////////////////////////////////////
4046
+ ////////////////////////////////////////
4047
+ function cleanParams(params, data) {
4048
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
4049
+ const p2 = typeof p === "string" ? { message: p } : p;
4050
+ return p2;
4051
+ }
4052
+ function custom(check, _params = {},
4004
4053
  /**
4005
4054
  * @deprecated
4006
4055
  *
@@ -4014,17 +4063,22 @@ function custom(check, params = {},
4014
4063
  fatal) {
4015
4064
  if (check)
4016
4065
  return ZodAny.create().superRefine((data, ctx) => {
4017
- var _a, _b;
4018
- if (!check(data)) {
4019
- const p = typeof params === "function"
4020
- ? params(data)
4021
- : typeof params === "string"
4022
- ? { message: params }
4023
- : params;
4024
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4025
- const p2 = typeof p === "string" ? { message: p } : p;
4026
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
4066
+ const r = check(data);
4067
+ if (r instanceof Promise) {
4068
+ return r.then((r) => {
4069
+ if (!r) {
4070
+ const params = cleanParams(_params, data);
4071
+ const _fatal = params.fatal ?? fatal ?? true;
4072
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4073
+ }
4074
+ });
4075
+ }
4076
+ if (!r) {
4077
+ const params = cleanParams(_params, data);
4078
+ const _fatal = params.fatal ?? fatal ?? true;
4079
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4027
4080
  }
4081
+ return;
4028
4082
  });
4029
4083
  return ZodAny.create();
4030
4084
  }
@@ -4124,7 +4178,7 @@ const coerce = {
4124
4178
  };
4125
4179
  const NEVER = INVALID;
4126
4180
 
4127
- var z = /*#__PURE__*/Object.freeze({
4181
+ var z9 = /*#__PURE__*/Object.freeze({
4128
4182
  __proto__: null,
4129
4183
  defaultErrorMap: errorMap,
4130
4184
  setErrorMap: setErrorMap,
@@ -4331,39 +4385,39 @@ function extendZodWithOpenApi(zod) {
4331
4385
  };
4332
4386
  }
4333
4387
 
4334
- extendZodWithOpenApi(z);
4388
+ extendZodWithOpenApi(z9);
4335
4389
 
4336
4390
  var __defProp = Object.defineProperty;
4337
4391
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4338
- var ContextValidator = z.array(z.string().or(z.record(z.any())));
4339
- z.object({
4340
- type: z.string().optional(),
4341
- narrative: z.string().optional()
4392
+ var ContextValidator = arrayType(stringType().or(recordType(anyType())));
4393
+ objectType({
4394
+ type: stringType().optional(),
4395
+ narrative: stringType().optional()
4342
4396
  });
4343
- var ImageValidator = z.string().or(
4344
- z.object({
4345
- id: z.string(),
4346
- type: z.string(),
4347
- caption: z.string().optional()
4397
+ var ImageValidator = stringType().or(
4398
+ objectType({
4399
+ id: stringType(),
4400
+ type: stringType(),
4401
+ caption: stringType().optional()
4348
4402
  })
4349
4403
  );
4350
- var GeoCoordinatesValidator = z.object({
4351
- type: z.string().min(1).or(z.string().array().nonempty()),
4352
- latitude: z.number(),
4353
- longitude: z.number()
4404
+ var GeoCoordinatesValidator = objectType({
4405
+ type: stringType().min(1).or(stringType().array().nonempty()),
4406
+ latitude: numberType(),
4407
+ longitude: numberType()
4354
4408
  });
4355
- var AddressValidator = z.object({
4356
- type: z.string().min(1).or(z.string().array().nonempty()),
4357
- addressCountry: z.string().optional(),
4358
- addressCountryCode: z.string().optional(),
4359
- addressRegion: z.string().optional(),
4360
- addressLocality: z.string().optional(),
4361
- streetAddress: z.string().optional(),
4362
- postOfficeBoxNumber: z.string().optional(),
4363
- postalCode: z.string().optional(),
4409
+ var AddressValidator = objectType({
4410
+ type: stringType().min(1).or(stringType().array().nonempty()),
4411
+ addressCountry: stringType().optional(),
4412
+ addressCountryCode: stringType().optional(),
4413
+ addressRegion: stringType().optional(),
4414
+ addressLocality: stringType().optional(),
4415
+ streetAddress: stringType().optional(),
4416
+ postOfficeBoxNumber: stringType().optional(),
4417
+ postalCode: stringType().optional(),
4364
4418
  geo: GeoCoordinatesValidator.optional()
4365
4419
  });
4366
- var IdentifierTypeValidator = z.enum([
4420
+ var IdentifierTypeValidator = enumType([
4367
4421
  "sourcedId",
4368
4422
  "systemId",
4369
4423
  "productId",
@@ -4382,149 +4436,149 @@ var IdentifierTypeValidator = z.enum([
4382
4436
  "ltiPlatformId",
4383
4437
  "ltiUserId",
4384
4438
  "identifier"
4385
- ]).or(z.string());
4386
- var IdentifierEntryValidator = z.object({
4387
- type: z.string().min(1).or(z.string().array().nonempty()),
4388
- identifier: z.string(),
4439
+ ]).or(stringType());
4440
+ var IdentifierEntryValidator = objectType({
4441
+ type: stringType().min(1).or(stringType().array().nonempty()),
4442
+ identifier: stringType(),
4389
4443
  identifierType: IdentifierTypeValidator
4390
4444
  });
4391
- var ProfileValidator = z.string().or(
4392
- z.object({
4393
- id: z.string().optional(),
4394
- type: z.string().or(z.string().array().nonempty().optional()),
4395
- name: z.string().optional(),
4396
- url: z.string().optional(),
4397
- phone: z.string().optional(),
4398
- description: z.string().optional(),
4399
- endorsement: z.any().array().optional(),
4445
+ var ProfileValidator = stringType().or(
4446
+ objectType({
4447
+ id: stringType().optional(),
4448
+ type: stringType().or(stringType().array().nonempty().optional()),
4449
+ name: stringType().optional(),
4450
+ url: stringType().optional(),
4451
+ phone: stringType().optional(),
4452
+ description: stringType().optional(),
4453
+ endorsement: anyType().array().optional(),
4400
4454
  image: ImageValidator.optional(),
4401
- email: z.string().email().optional(),
4455
+ email: stringType().email().optional(),
4402
4456
  address: AddressValidator.optional(),
4403
4457
  otherIdentifier: IdentifierEntryValidator.array().optional(),
4404
- official: z.string().optional(),
4405
- parentOrg: z.any().optional(),
4406
- familyName: z.string().optional(),
4407
- givenName: z.string().optional(),
4408
- additionalName: z.string().optional(),
4409
- patronymicName: z.string().optional(),
4410
- honorificPrefix: z.string().optional(),
4411
- honorificSuffix: z.string().optional(),
4412
- familyNamePrefix: z.string().optional(),
4413
- dateOfBirth: z.string().optional()
4414
- }).catchall(z.any())
4458
+ official: stringType().optional(),
4459
+ parentOrg: anyType().optional(),
4460
+ familyName: stringType().optional(),
4461
+ givenName: stringType().optional(),
4462
+ additionalName: stringType().optional(),
4463
+ patronymicName: stringType().optional(),
4464
+ honorificPrefix: stringType().optional(),
4465
+ honorificSuffix: stringType().optional(),
4466
+ familyNamePrefix: stringType().optional(),
4467
+ dateOfBirth: stringType().optional()
4468
+ }).catchall(anyType())
4415
4469
  );
4416
- var CredentialSubjectValidator = z.object({ id: z.string().optional() }).catchall(z.any());
4417
- var CredentialStatusValidator = z.object({ type: z.string(), id: z.string() }).catchall(z.any());
4418
- var CredentialSchemaValidator = z.object({ id: z.string(), type: z.string() }).catchall(z.any());
4419
- var RefreshServiceValidator = z.object({ id: z.string().optional(), type: z.string() }).catchall(z.any());
4420
- var TermsOfUseValidator = z.object({ type: z.string(), id: z.string().optional() }).catchall(z.any());
4421
- var VC2EvidenceValidator = z.object({
4422
- id: z.string().optional(),
4423
- type: z.array(z.string()).nonempty(),
4424
- name: z.string().optional(),
4425
- narrative: z.string().optional(),
4426
- description: z.string().optional(),
4427
- genre: z.string().optional(),
4428
- audience: z.string().optional()
4429
- }).catchall(z.any());
4430
- var UnsignedVCValidator = z.object({
4470
+ var CredentialSubjectValidator = objectType({ id: stringType().optional() }).catchall(anyType());
4471
+ var CredentialStatusValidator = objectType({ type: stringType(), id: stringType() }).catchall(anyType());
4472
+ var CredentialSchemaValidator = objectType({ id: stringType(), type: stringType() }).catchall(anyType());
4473
+ var RefreshServiceValidator = objectType({ id: stringType().optional(), type: stringType() }).catchall(anyType());
4474
+ var TermsOfUseValidator = objectType({ type: stringType(), id: stringType().optional() }).catchall(anyType());
4475
+ var VC2EvidenceValidator = objectType({
4476
+ id: stringType().optional(),
4477
+ type: arrayType(stringType()).nonempty(),
4478
+ name: stringType().optional(),
4479
+ narrative: stringType().optional(),
4480
+ description: stringType().optional(),
4481
+ genre: stringType().optional(),
4482
+ audience: stringType().optional()
4483
+ }).catchall(anyType());
4484
+ var UnsignedVCValidator = objectType({
4431
4485
  "@context": ContextValidator,
4432
- id: z.string().optional(),
4433
- type: z.string().array().nonempty(),
4486
+ id: stringType().optional(),
4487
+ type: stringType().array().nonempty(),
4434
4488
  issuer: ProfileValidator,
4435
4489
  credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),
4436
4490
  refreshService: RefreshServiceValidator.or(RefreshServiceValidator.array()).optional(),
4437
4491
  credentialSchema: CredentialSchemaValidator.or(
4438
4492
  CredentialSchemaValidator.array()
4439
4493
  ).optional(),
4440
- issuanceDate: z.string().optional(),
4441
- expirationDate: z.string().optional(),
4494
+ issuanceDate: stringType().optional(),
4495
+ expirationDate: stringType().optional(),
4442
4496
  credentialStatus: CredentialStatusValidator.or(
4443
4497
  CredentialStatusValidator.array()
4444
4498
  ).optional(),
4445
- name: z.string().optional(),
4446
- description: z.string().optional(),
4447
- validFrom: z.string().optional(),
4448
- validUntil: z.string().optional(),
4499
+ name: stringType().optional(),
4500
+ description: stringType().optional(),
4501
+ validFrom: stringType().optional(),
4502
+ validUntil: stringType().optional(),
4449
4503
  status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
4450
4504
  termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
4451
- evidence: z.union([VC2EvidenceValidator, z.array(VC2EvidenceValidator)]).optional()
4452
- }).catchall(z.any());
4453
- var ProofValidator = z.object({
4454
- type: z.string(),
4455
- created: z.string(),
4456
- challenge: z.string().optional(),
4457
- domain: z.string().optional(),
4458
- nonce: z.string().optional(),
4459
- proofPurpose: z.string(),
4460
- verificationMethod: z.string(),
4461
- jws: z.string().optional()
4462
- }).catchall(z.any());
4505
+ evidence: unionType([VC2EvidenceValidator, arrayType(VC2EvidenceValidator)]).optional()
4506
+ }).catchall(anyType());
4507
+ var ProofValidator = objectType({
4508
+ type: stringType(),
4509
+ created: stringType(),
4510
+ challenge: stringType().optional(),
4511
+ domain: stringType().optional(),
4512
+ nonce: stringType().optional(),
4513
+ proofPurpose: stringType(),
4514
+ verificationMethod: stringType(),
4515
+ jws: stringType().optional()
4516
+ }).catchall(anyType());
4463
4517
  var VCValidator = UnsignedVCValidator.extend({
4464
4518
  proof: ProofValidator.or(ProofValidator.array())
4465
4519
  });
4466
- var UnsignedVPValidator = z.object({
4520
+ var UnsignedVPValidator = objectType({
4467
4521
  "@context": ContextValidator,
4468
- id: z.string().optional(),
4469
- type: z.string().or(z.string().array().nonempty()),
4522
+ id: stringType().optional(),
4523
+ type: stringType().or(stringType().array().nonempty()),
4470
4524
  verifiableCredential: VCValidator.or(VCValidator.array()).optional(),
4471
- holder: z.string().optional()
4472
- }).catchall(z.any());
4525
+ holder: stringType().optional()
4526
+ }).catchall(anyType());
4473
4527
  var VPValidator = UnsignedVPValidator.extend({
4474
4528
  proof: ProofValidator.or(ProofValidator.array())
4475
4529
  });
4476
- var JWKValidator = z.object({
4477
- kty: z.string(),
4478
- crv: z.string(),
4479
- x: z.string(),
4480
- y: z.string().optional(),
4481
- n: z.string().optional(),
4482
- d: z.string().optional()
4530
+ var JWKValidator = objectType({
4531
+ kty: stringType(),
4532
+ crv: stringType(),
4533
+ x: stringType(),
4534
+ y: stringType().optional(),
4535
+ n: stringType().optional(),
4536
+ d: stringType().optional()
4483
4537
  });
4484
- JWKValidator.omit({ d: true }).extend({ d: z.string() });
4485
- var JWERecipientHeaderValidator = z.object({
4486
- alg: z.string(),
4487
- iv: z.string(),
4488
- tag: z.string(),
4538
+ JWKValidator.omit({ d: true }).extend({ d: stringType() });
4539
+ var JWERecipientHeaderValidator = objectType({
4540
+ alg: stringType(),
4541
+ iv: stringType(),
4542
+ tag: stringType(),
4489
4543
  epk: JWKValidator.partial().optional(),
4490
- kid: z.string().optional(),
4491
- apv: z.string().optional(),
4492
- apu: z.string().optional()
4544
+ kid: stringType().optional(),
4545
+ apv: stringType().optional(),
4546
+ apu: stringType().optional()
4493
4547
  });
4494
- var JWERecipientValidator = z.object({
4548
+ var JWERecipientValidator = objectType({
4495
4549
  header: JWERecipientHeaderValidator,
4496
- encrypted_key: z.string()
4550
+ encrypted_key: stringType()
4497
4551
  });
4498
- var JWEValidator = z.object({
4499
- protected: z.string(),
4500
- iv: z.string(),
4501
- ciphertext: z.string(),
4502
- tag: z.string(),
4503
- aad: z.string().optional(),
4552
+ var JWEValidator = objectType({
4553
+ protected: stringType(),
4554
+ iv: stringType(),
4555
+ ciphertext: stringType(),
4556
+ tag: stringType(),
4557
+ aad: stringType().optional(),
4504
4558
  recipients: JWERecipientValidator.array().optional()
4505
4559
  });
4506
- var VerificationMethodValidator = z.string().or(
4507
- z.object({
4560
+ var VerificationMethodValidator = stringType().or(
4561
+ objectType({
4508
4562
  "@context": ContextValidator.optional(),
4509
- id: z.string(),
4510
- type: z.string(),
4511
- controller: z.string(),
4563
+ id: stringType(),
4564
+ type: stringType(),
4565
+ controller: stringType(),
4512
4566
  publicKeyJwk: JWKValidator.optional(),
4513
- publicKeyBase58: z.string().optional(),
4514
- publicKeyMultibase: z.string().optional(),
4515
- blockChainAccountId: z.string().optional()
4516
- }).catchall(z.any())
4567
+ publicKeyBase58: stringType().optional(),
4568
+ publicKeyMultibase: stringType().optional(),
4569
+ blockChainAccountId: stringType().optional()
4570
+ }).catchall(anyType())
4517
4571
  );
4518
- var ServiceValidator = z.object({
4519
- id: z.string(),
4520
- type: z.string().or(z.string().array().nonempty()),
4521
- serviceEndpoint: z.any().or(z.any().array().nonempty())
4522
- }).catchall(z.any());
4523
- z.object({
4572
+ var ServiceValidator = objectType({
4573
+ id: stringType(),
4574
+ type: stringType().or(stringType().array().nonempty()),
4575
+ serviceEndpoint: anyType().or(anyType().array().nonempty())
4576
+ }).catchall(anyType());
4577
+ objectType({
4524
4578
  "@context": ContextValidator,
4525
- id: z.string(),
4526
- alsoKnownAs: z.string().optional(),
4527
- controller: z.string().or(z.string().array().nonempty()).optional(),
4579
+ id: stringType(),
4580
+ alsoKnownAs: stringType().optional(),
4581
+ controller: stringType().or(stringType().array().nonempty()).optional(),
4528
4582
  verificationMethod: VerificationMethodValidator.array().optional(),
4529
4583
  authentication: VerificationMethodValidator.array().optional(),
4530
4584
  assertionMethod: VerificationMethodValidator.array().optional(),
@@ -4534,8 +4588,8 @@ z.object({
4534
4588
  publicKey: VerificationMethodValidator.array().optional(),
4535
4589
  service: ServiceValidator.array().optional(),
4536
4590
  proof: ProofValidator.or(ProofValidator.array()).optional()
4537
- }).catchall(z.any());
4538
- var AlignmentTargetTypeValidator = z.enum([
4591
+ }).catchall(anyType());
4592
+ var AlignmentTargetTypeValidator = enumType([
4539
4593
  "ceasn:Competency",
4540
4594
  "ceterms:Credential",
4541
4595
  "CFItem",
@@ -4543,17 +4597,17 @@ var AlignmentTargetTypeValidator = z.enum([
4543
4597
  "CFRubricCriterion",
4544
4598
  "CFRubricCriterionLevel",
4545
4599
  "CTDL"
4546
- ]).or(z.string());
4547
- var AlignmentValidator = z.object({
4548
- type: z.string().array().nonempty(),
4549
- targetCode: z.string().optional(),
4550
- targetDescription: z.string().optional(),
4551
- targetName: z.string(),
4552
- targetFramework: z.string().optional(),
4600
+ ]).or(stringType());
4601
+ var AlignmentValidator = objectType({
4602
+ type: stringType().array().nonempty(),
4603
+ targetCode: stringType().optional(),
4604
+ targetDescription: stringType().optional(),
4605
+ targetName: stringType(),
4606
+ targetFramework: stringType().optional(),
4553
4607
  targetType: AlignmentTargetTypeValidator.optional(),
4554
- targetUrl: z.string()
4608
+ targetUrl: stringType()
4555
4609
  });
4556
- var KnownAchievementTypeValidator = z.enum([
4610
+ var KnownAchievementTypeValidator = enumType([
4557
4611
  "Achievement",
4558
4612
  "ApprenticeshipCertificate",
4559
4613
  "Assessment",
@@ -4586,23 +4640,23 @@ var KnownAchievementTypeValidator = z.enum([
4586
4640
  "ResearchDoctorate",
4587
4641
  "SecondarySchoolDiploma"
4588
4642
  ]);
4589
- var AchievementTypeValidator = KnownAchievementTypeValidator.or(z.string());
4590
- var CriteriaValidator = z.object({ id: z.string().optional(), narrative: z.string().optional() }).catchall(z.any());
4591
- var EndorsementSubjectValidator = z.object({
4592
- id: z.string(),
4593
- type: z.string().array().nonempty(),
4594
- endorsementComment: z.string().optional()
4643
+ var AchievementTypeValidator = KnownAchievementTypeValidator.or(stringType());
4644
+ var CriteriaValidator = objectType({ id: stringType().optional(), narrative: stringType().optional() }).catchall(anyType());
4645
+ var EndorsementSubjectValidator = objectType({
4646
+ id: stringType(),
4647
+ type: stringType().array().nonempty(),
4648
+ endorsementComment: stringType().optional()
4595
4649
  });
4596
4650
  var EndorsementCredentialValidator = UnsignedVCValidator.extend({
4597
4651
  credentialSubject: EndorsementSubjectValidator,
4598
4652
  proof: ProofValidator.or(ProofValidator.array()).optional()
4599
4653
  });
4600
- var RelatedValidator = z.object({
4601
- id: z.string(),
4602
- "@language": z.string().optional(),
4603
- version: z.string().optional()
4654
+ var RelatedValidator = objectType({
4655
+ id: stringType(),
4656
+ "@language": stringType().optional(),
4657
+ version: stringType().optional()
4604
4658
  });
4605
- var ResultTypeValidator = z.enum([
4659
+ var ResultTypeValidator = enumType([
4606
4660
  "GradePointAverage",
4607
4661
  "LetterGrade",
4608
4662
  "Percent",
@@ -4615,68 +4669,68 @@ var ResultTypeValidator = z.enum([
4615
4669
  "RubricScore",
4616
4670
  "ScaledScore",
4617
4671
  "Status"
4618
- ]).or(z.string());
4619
- var RubricCriterionValidator = z.object({
4620
- id: z.string(),
4621
- type: z.string().array().nonempty(),
4672
+ ]).or(stringType());
4673
+ var RubricCriterionValidator = objectType({
4674
+ id: stringType(),
4675
+ type: stringType().array().nonempty(),
4622
4676
  alignment: AlignmentValidator.array().optional(),
4623
- description: z.string().optional(),
4624
- level: z.string().optional(),
4625
- name: z.string(),
4626
- points: z.string().optional()
4627
- }).catchall(z.any());
4628
- var ResultDescriptionValidator = z.object({
4629
- id: z.string(),
4630
- type: z.string().array().nonempty(),
4677
+ description: stringType().optional(),
4678
+ level: stringType().optional(),
4679
+ name: stringType(),
4680
+ points: stringType().optional()
4681
+ }).catchall(anyType());
4682
+ var ResultDescriptionValidator = objectType({
4683
+ id: stringType(),
4684
+ type: stringType().array().nonempty(),
4631
4685
  alignment: AlignmentValidator.array().optional(),
4632
- allowedValue: z.string().array().optional(),
4633
- name: z.string(),
4634
- requiredLevel: z.string().optional(),
4635
- requiredValue: z.string().optional(),
4686
+ allowedValue: stringType().array().optional(),
4687
+ name: stringType(),
4688
+ requiredLevel: stringType().optional(),
4689
+ requiredValue: stringType().optional(),
4636
4690
  resultType: ResultTypeValidator,
4637
4691
  rubricCriterionLevel: RubricCriterionValidator.array().optional(),
4638
- valueMax: z.string().optional(),
4639
- valueMin: z.string().optional()
4640
- }).catchall(z.any());
4641
- z.object({
4642
- id: z.string().optional(),
4643
- type: z.array(z.string()).nonempty(),
4644
- name: z.string().optional(),
4645
- narrative: z.string().optional(),
4646
- description: z.string().optional(),
4647
- genre: z.string().optional(),
4648
- audience: z.string().optional()
4649
- }).catchall(z.any());
4650
- var AchievementValidator = z.object({
4651
- id: z.string().optional(),
4652
- type: z.array(z.string()).nonempty(),
4692
+ valueMax: stringType().optional(),
4693
+ valueMin: stringType().optional()
4694
+ }).catchall(anyType());
4695
+ objectType({
4696
+ id: stringType().optional(),
4697
+ type: arrayType(stringType()).nonempty(),
4698
+ name: stringType().optional(),
4699
+ narrative: stringType().optional(),
4700
+ description: stringType().optional(),
4701
+ genre: stringType().optional(),
4702
+ audience: stringType().optional()
4703
+ }).catchall(anyType());
4704
+ var AchievementValidator = objectType({
4705
+ id: stringType().optional(),
4706
+ type: arrayType(stringType()).nonempty(),
4653
4707
  alignment: AlignmentValidator.array().optional(),
4654
4708
  achievementType: AchievementTypeValidator.optional(),
4655
4709
  creator: ProfileValidator.optional(),
4656
- creditsAvailable: z.number().optional(),
4710
+ creditsAvailable: numberType().optional(),
4657
4711
  criteria: CriteriaValidator,
4658
- description: z.string(),
4712
+ description: stringType(),
4659
4713
  endorsement: EndorsementCredentialValidator.array().optional(),
4660
- fieldOfStudy: z.string().optional(),
4661
- humanCode: z.string().optional(),
4714
+ fieldOfStudy: stringType().optional(),
4715
+ humanCode: stringType().optional(),
4662
4716
  image: ImageValidator.optional(),
4663
- "@language": z.string().optional(),
4664
- name: z.string(),
4717
+ "@language": stringType().optional(),
4718
+ name: stringType(),
4665
4719
  otherIdentifier: IdentifierEntryValidator.array().optional(),
4666
4720
  related: RelatedValidator.array().optional(),
4667
4721
  resultDescription: ResultDescriptionValidator.array().optional(),
4668
- specialization: z.string().optional(),
4669
- tag: z.array(z.string()).optional(),
4670
- version: z.string().optional()
4671
- }).catchall(z.any());
4672
- var IdentityObjectValidator = z.object({
4673
- type: z.string(),
4674
- hashed: z.boolean(),
4675
- identityHash: z.string(),
4676
- identityType: z.string(),
4677
- salt: z.string().optional()
4722
+ specialization: stringType().optional(),
4723
+ tag: arrayType(stringType()).optional(),
4724
+ version: stringType().optional()
4725
+ }).catchall(anyType());
4726
+ var IdentityObjectValidator = objectType({
4727
+ type: stringType(),
4728
+ hashed: booleanType(),
4729
+ identityHash: stringType(),
4730
+ identityType: stringType(),
4731
+ salt: stringType().optional()
4678
4732
  });
4679
- var ResultStatusTypeValidator = z.enum([
4733
+ var ResultStatusTypeValidator = enumType([
4680
4734
  "Completed",
4681
4735
  "Enrolled",
4682
4736
  "Failed",
@@ -4684,33 +4738,33 @@ var ResultStatusTypeValidator = z.enum([
4684
4738
  "OnHold",
4685
4739
  "Withdrew"
4686
4740
  ]);
4687
- var ResultValidator = z.object({
4688
- type: z.string().array().nonempty(),
4689
- achievedLevel: z.string().optional(),
4741
+ var ResultValidator = objectType({
4742
+ type: stringType().array().nonempty(),
4743
+ achievedLevel: stringType().optional(),
4690
4744
  alignment: AlignmentValidator.array().optional(),
4691
- resultDescription: z.string().optional(),
4745
+ resultDescription: stringType().optional(),
4692
4746
  status: ResultStatusTypeValidator.optional(),
4693
- value: z.string().optional()
4694
- }).catchall(z.any());
4695
- var AchievementSubjectValidator = z.object({
4696
- id: z.string().optional(),
4697
- type: z.string().array().nonempty(),
4698
- activityEndDate: z.string().optional(),
4699
- activityStartDate: z.string().optional(),
4700
- creditsEarned: z.number().optional(),
4747
+ value: stringType().optional()
4748
+ }).catchall(anyType());
4749
+ var AchievementSubjectValidator = objectType({
4750
+ id: stringType().optional(),
4751
+ type: stringType().array().nonempty(),
4752
+ activityEndDate: stringType().optional(),
4753
+ activityStartDate: stringType().optional(),
4754
+ creditsEarned: numberType().optional(),
4701
4755
  achievement: AchievementValidator.optional(),
4702
4756
  identifier: IdentityObjectValidator.array().optional(),
4703
4757
  image: ImageValidator.optional(),
4704
- licenseNumber: z.string().optional(),
4705
- narrative: z.string().optional(),
4758
+ licenseNumber: stringType().optional(),
4759
+ narrative: stringType().optional(),
4706
4760
  result: ResultValidator.array().optional(),
4707
- role: z.string().optional(),
4761
+ role: stringType().optional(),
4708
4762
  source: ProfileValidator.optional(),
4709
- term: z.string().optional()
4710
- }).catchall(z.any());
4763
+ term: stringType().optional()
4764
+ }).catchall(anyType());
4711
4765
  var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({
4712
- name: z.string().optional(),
4713
- description: z.string().optional(),
4766
+ name: stringType().optional(),
4767
+ description: stringType().optional(),
4714
4768
  image: ImageValidator.optional(),
4715
4769
  credentialSubject: AchievementSubjectValidator.or(
4716
4770
  AchievementSubjectValidator.array()
@@ -4720,42 +4774,42 @@ var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({
4720
4774
  UnsignedAchievementCredentialValidator.extend({
4721
4775
  proof: ProofValidator.or(ProofValidator.array())
4722
4776
  });
4723
- z.object({
4724
- checks: z.string().array(),
4725
- warnings: z.string().array(),
4726
- errors: z.string().array()
4777
+ objectType({
4778
+ checks: stringType().array(),
4779
+ warnings: stringType().array(),
4780
+ errors: stringType().array()
4727
4781
  });
4728
- var VerificationStatusValidator = z.enum(["Success", "Failed", "Error"]);
4782
+ var VerificationStatusValidator = enumType(["Success", "Failed", "Error"]);
4729
4783
  var VerificationStatusEnum = VerificationStatusValidator.enum;
4730
- z.object({
4731
- check: z.string(),
4784
+ objectType({
4785
+ check: stringType(),
4732
4786
  status: VerificationStatusValidator,
4733
- message: z.string().optional(),
4734
- details: z.string().optional()
4787
+ message: stringType().optional(),
4788
+ details: stringType().optional()
4735
4789
  });
4736
- z.object({
4737
- title: z.string().optional(),
4738
- createdAt: z.string().optional(),
4790
+ objectType({
4791
+ title: stringType().optional(),
4792
+ createdAt: stringType().optional(),
4739
4793
  issuer: ProfileValidator.optional(),
4740
4794
  issuee: ProfileValidator.optional(),
4741
4795
  credentialSubject: CredentialSubjectValidator.optional()
4742
4796
  });
4743
- z.object({ id: z.string(), uri: z.string() }).catchall(z.any());
4744
- z.object({
4745
- limit: z.number(),
4746
- cursor: z.string().optional(),
4747
- sort: z.string().optional()
4797
+ objectType({ id: stringType(), uri: stringType() }).catchall(anyType());
4798
+ objectType({
4799
+ limit: numberType(),
4800
+ cursor: stringType().optional(),
4801
+ sort: stringType().optional()
4748
4802
  });
4749
- var PaginationResponseValidator = z.object({
4750
- cursor: z.string().optional(),
4751
- hasMore: z.boolean()
4803
+ var PaginationResponseValidator = objectType({
4804
+ cursor: stringType().optional(),
4805
+ hasMore: booleanType()
4752
4806
  });
4753
- var EncryptedRecordValidator = z.object({ encryptedRecord: JWEValidator, fields: z.string().array() }).catchall(z.any());
4807
+ var EncryptedRecordValidator = objectType({ encryptedRecord: JWEValidator, fields: stringType().array() }).catchall(anyType());
4754
4808
  PaginationResponseValidator.extend({
4755
4809
  records: EncryptedRecordValidator.array()
4756
4810
  });
4757
4811
  var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
4758
- id: z.string()
4812
+ id: stringType()
4759
4813
  });
4760
4814
  PaginationResponseValidator.extend({
4761
4815
  records: EncryptedCredentialRecordValidator.array()
@@ -4766,8 +4820,8 @@ var parseRegexString = /* @__PURE__ */ __name((regexStr) => {
4766
4820
  throw new Error("Invalid RegExp string format");
4767
4821
  return { pattern: match[1], flags: match[2] };
4768
4822
  }, "parseRegexString");
4769
- var RegExpValidator = z.instanceof(RegExp).or(
4770
- z.string().refine(
4823
+ var RegExpValidator = instanceOfType(RegExp).or(
4824
+ stringType().refine(
4771
4825
  (str) => {
4772
4826
  try {
4773
4827
  parseRegexString(str);
@@ -4788,81 +4842,81 @@ var RegExpValidator = z.instanceof(RegExp).or(
4788
4842
  }
4789
4843
  })
4790
4844
  );
4791
- var BaseStringQuery = z.string().or(z.object({ $in: z.string().array() })).or(z.object({ $regex: RegExpValidator }));
4792
- var StringQuery = z.union([
4845
+ var BaseStringQuery = stringType().or(objectType({ $in: stringType().array() })).or(objectType({ $regex: RegExpValidator }));
4846
+ var StringQuery = unionType([
4793
4847
  BaseStringQuery,
4794
- z.object({
4848
+ objectType({
4795
4849
  $or: BaseStringQuery.array()
4796
4850
  })
4797
4851
  ]);
4798
- extendZodWithOpenApi(z);
4799
- var LCNProfileDisplayValidator = z.object({
4800
- backgroundColor: z.string().optional(),
4801
- backgroundImage: z.string().optional(),
4802
- fadeBackgroundImage: z.boolean().optional(),
4803
- repeatBackgroundImage: z.boolean().optional(),
4804
- fontColor: z.string().optional(),
4805
- accentColor: z.string().optional(),
4806
- accentFontColor: z.string().optional(),
4807
- idBackgroundImage: z.string().optional(),
4808
- fadeIdBackgroundImage: z.boolean().optional(),
4809
- idBackgroundColor: z.string().optional(),
4810
- repeatIdBackgroundImage: z.boolean().optional()
4852
+ extendZodWithOpenApi(z9);
4853
+ var LCNProfileDisplayValidator = objectType({
4854
+ backgroundColor: stringType().optional(),
4855
+ backgroundImage: stringType().optional(),
4856
+ fadeBackgroundImage: booleanType().optional(),
4857
+ repeatBackgroundImage: booleanType().optional(),
4858
+ fontColor: stringType().optional(),
4859
+ accentColor: stringType().optional(),
4860
+ accentFontColor: stringType().optional(),
4861
+ idBackgroundImage: stringType().optional(),
4862
+ fadeIdBackgroundImage: booleanType().optional(),
4863
+ idBackgroundColor: stringType().optional(),
4864
+ repeatIdBackgroundImage: booleanType().optional()
4811
4865
  });
4812
- var LCNProfileValidator = z.object({
4813
- profileId: z.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
4814
- displayName: z.string().default("").describe("Human-readable display name for the profile."),
4815
- shortBio: z.string().default("").describe("Short bio for the profile."),
4816
- bio: z.string().default("").describe("Longer bio for the profile."),
4817
- did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
4818
- isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
4819
- email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
4820
- image: z.string().optional().describe("Profile image URL for the profile."),
4821
- heroImage: z.string().optional().describe("Hero image URL for the profile."),
4822
- websiteLink: z.string().optional().describe("Website link for the profile."),
4823
- isServiceProfile: z.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
4824
- type: z.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
4825
- notificationsWebhook: z.string().url().startsWith("http").optional().describe("URL to send notifications to."),
4866
+ var LCNProfileValidator = objectType({
4867
+ profileId: stringType().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
4868
+ displayName: stringType().default("").describe("Human-readable display name for the profile."),
4869
+ shortBio: stringType().default("").describe("Short bio for the profile."),
4870
+ bio: stringType().default("").describe("Longer bio for the profile."),
4871
+ did: stringType().describe("Decentralized Identifier for the profile. (auto-assigned)"),
4872
+ isPrivate: booleanType().optional().describe("Whether the profile is private or not and shows up in search results."),
4873
+ email: stringType().optional().describe("Contact email address for the profile. (deprecated)"),
4874
+ image: stringType().optional().describe("Profile image URL for the profile."),
4875
+ heroImage: stringType().optional().describe("Hero image URL for the profile."),
4876
+ websiteLink: stringType().optional().describe("Website link for the profile."),
4877
+ isServiceProfile: booleanType().default(false).optional().describe("Whether the profile is a service profile or not."),
4878
+ type: stringType().optional().describe('Profile type: e.g. "person", "organization", "service".'),
4879
+ notificationsWebhook: stringType().url().startsWith("http").optional().describe("URL to send notifications to."),
4826
4880
  display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
4827
- highlightedCredentials: z.array(z.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
4828
- role: z.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
4829
- dob: z.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
4830
- country: z.string().optional().describe("Country for the profile."),
4831
- approved: z.boolean().optional().describe("Approval status for the profile.")
4881
+ highlightedCredentials: arrayType(stringType()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
4882
+ role: stringType().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
4883
+ dob: stringType().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
4884
+ country: stringType().optional().describe("Country for the profile."),
4885
+ approved: booleanType().optional().describe("Approval status for the profile.")
4832
4886
  });
4833
- z.object({
4887
+ objectType({
4834
4888
  profileId: StringQuery,
4835
4889
  displayName: StringQuery,
4836
4890
  shortBio: StringQuery,
4837
4891
  bio: StringQuery,
4838
4892
  email: StringQuery,
4839
4893
  websiteLink: StringQuery,
4840
- isServiceProfile: z.boolean(),
4894
+ isServiceProfile: booleanType(),
4841
4895
  type: StringQuery
4842
4896
  }).partial();
4843
4897
  PaginationResponseValidator.extend({
4844
4898
  records: LCNProfileValidator.array()
4845
4899
  });
4846
- z.enum([
4900
+ enumType([
4847
4901
  "CONNECTED",
4848
4902
  "PENDING_REQUEST_SENT",
4849
4903
  "PENDING_REQUEST_RECEIVED",
4850
4904
  "NOT_CONNECTED"
4851
4905
  ]);
4852
- var LCNProfileManagerValidator = z.object({
4853
- id: z.string(),
4854
- created: z.string(),
4855
- displayName: z.string().default("").optional(),
4856
- shortBio: z.string().default("").optional(),
4857
- bio: z.string().default("").optional(),
4858
- email: z.string().optional(),
4859
- image: z.string().optional(),
4860
- heroImage: z.string().optional()
4906
+ var LCNProfileManagerValidator = objectType({
4907
+ id: stringType(),
4908
+ created: stringType(),
4909
+ displayName: stringType().default("").optional(),
4910
+ shortBio: stringType().default("").optional(),
4911
+ bio: stringType().default("").optional(),
4912
+ email: stringType().optional(),
4913
+ image: stringType().optional(),
4914
+ heroImage: stringType().optional()
4861
4915
  });
4862
4916
  PaginationResponseValidator.extend({
4863
- records: LCNProfileManagerValidator.extend({ did: z.string() }).array()
4917
+ records: LCNProfileManagerValidator.extend({ did: stringType() }).array()
4864
4918
  });
4865
- z.object({
4919
+ objectType({
4866
4920
  id: StringQuery,
4867
4921
  displayName: StringQuery,
4868
4922
  shortBio: StringQuery,
@@ -4870,101 +4924,101 @@ z.object({
4870
4924
  email: StringQuery
4871
4925
  }).partial();
4872
4926
  PaginationResponseValidator.extend({
4873
- records: z.object({
4927
+ records: objectType({
4874
4928
  profile: LCNProfileValidator,
4875
- manager: LCNProfileManagerValidator.extend({ did: z.string() }).optional()
4929
+ manager: LCNProfileManagerValidator.extend({ did: stringType() }).optional()
4876
4930
  }).array()
4877
4931
  });
4878
- z.object({
4879
- uri: z.string(),
4880
- to: z.string(),
4881
- from: z.string(),
4882
- sent: z.string().datetime(),
4883
- received: z.string().datetime().optional(),
4884
- metadata: z.record(z.unknown()).optional()
4932
+ objectType({
4933
+ uri: stringType(),
4934
+ to: stringType(),
4935
+ from: stringType(),
4936
+ sent: stringType().datetime(),
4937
+ received: stringType().datetime().optional(),
4938
+ metadata: recordType(unknownType()).optional()
4885
4939
  });
4886
- var BoostPermissionsValidator = z.object({
4887
- role: z.string(),
4888
- canEdit: z.boolean(),
4889
- canIssue: z.boolean(),
4890
- canRevoke: z.boolean(),
4891
- canManagePermissions: z.boolean(),
4892
- canIssueChildren: z.string(),
4893
- canCreateChildren: z.string(),
4894
- canEditChildren: z.string(),
4895
- canRevokeChildren: z.string(),
4896
- canManageChildrenPermissions: z.string(),
4897
- canManageChildrenProfiles: z.boolean().default(false).optional(),
4898
- canViewAnalytics: z.boolean()
4940
+ var BoostPermissionsValidator = objectType({
4941
+ role: stringType(),
4942
+ canEdit: booleanType(),
4943
+ canIssue: booleanType(),
4944
+ canRevoke: booleanType(),
4945
+ canManagePermissions: booleanType(),
4946
+ canIssueChildren: stringType(),
4947
+ canCreateChildren: stringType(),
4948
+ canEditChildren: stringType(),
4949
+ canRevokeChildren: stringType(),
4950
+ canManageChildrenPermissions: stringType(),
4951
+ canManageChildrenProfiles: booleanType().default(false).optional(),
4952
+ canViewAnalytics: booleanType()
4899
4953
  });
4900
- var BoostPermissionsQueryValidator = z.object({
4954
+ var BoostPermissionsQueryValidator = objectType({
4901
4955
  role: StringQuery,
4902
- canEdit: z.boolean(),
4903
- canIssue: z.boolean(),
4904
- canRevoke: z.boolean(),
4905
- canManagePermissions: z.boolean(),
4956
+ canEdit: booleanType(),
4957
+ canIssue: booleanType(),
4958
+ canRevoke: booleanType(),
4959
+ canManagePermissions: booleanType(),
4906
4960
  canIssueChildren: StringQuery,
4907
4961
  canCreateChildren: StringQuery,
4908
4962
  canEditChildren: StringQuery,
4909
4963
  canRevokeChildren: StringQuery,
4910
4964
  canManageChildrenPermissions: StringQuery,
4911
- canManageChildrenProfiles: z.boolean(),
4912
- canViewAnalytics: z.boolean()
4965
+ canManageChildrenProfiles: booleanType(),
4966
+ canViewAnalytics: booleanType()
4913
4967
  }).partial();
4914
- var ClaimHookTypeValidator = z.enum(["GRANT_PERMISSIONS", "ADD_ADMIN", "AUTO_CONNECT"]);
4915
- var ClaimHookValidator = z.discriminatedUnion("type", [
4916
- z.object({
4917
- type: z.literal(ClaimHookTypeValidator.Values.GRANT_PERMISSIONS),
4918
- data: z.object({
4919
- claimUri: z.string(),
4920
- targetUri: z.string(),
4968
+ var ClaimHookTypeValidator = enumType(["GRANT_PERMISSIONS", "ADD_ADMIN", "AUTO_CONNECT"]);
4969
+ var ClaimHookValidator = discriminatedUnionType("type", [
4970
+ objectType({
4971
+ type: literalType(ClaimHookTypeValidator.Values.GRANT_PERMISSIONS),
4972
+ data: objectType({
4973
+ claimUri: stringType(),
4974
+ targetUri: stringType(),
4921
4975
  permissions: BoostPermissionsValidator.partial()
4922
4976
  })
4923
4977
  }),
4924
- z.object({
4925
- type: z.literal(ClaimHookTypeValidator.Values.ADD_ADMIN),
4926
- data: z.object({ claimUri: z.string(), targetUri: z.string() })
4978
+ objectType({
4979
+ type: literalType(ClaimHookTypeValidator.Values.ADD_ADMIN),
4980
+ data: objectType({ claimUri: stringType(), targetUri: stringType() })
4927
4981
  }),
4928
- z.object({
4929
- type: z.literal(ClaimHookTypeValidator.Values.AUTO_CONNECT),
4930
- data: z.object({ claimUri: z.string(), targetUri: z.string() })
4982
+ objectType({
4983
+ type: literalType(ClaimHookTypeValidator.Values.AUTO_CONNECT),
4984
+ data: objectType({ claimUri: stringType(), targetUri: stringType() })
4931
4985
  })
4932
4986
  ]);
4933
- z.object({
4987
+ objectType({
4934
4988
  type: StringQuery,
4935
- data: z.object({
4989
+ data: objectType({
4936
4990
  claimUri: StringQuery,
4937
4991
  targetUri: StringQuery,
4938
4992
  permissions: BoostPermissionsQueryValidator
4939
4993
  })
4940
4994
  }).deepPartial();
4941
- var FullClaimHookValidator = z.object({ id: z.string(), createdAt: z.string(), updatedAt: z.string() }).and(ClaimHookValidator);
4995
+ var FullClaimHookValidator = objectType({ id: stringType(), createdAt: stringType(), updatedAt: stringType() }).and(ClaimHookValidator);
4942
4996
  PaginationResponseValidator.extend({
4943
4997
  records: FullClaimHookValidator.array()
4944
4998
  });
4945
- var LCNBoostStatus = z.enum(["DRAFT", "LIVE"]);
4946
- var BoostValidator = z.object({
4947
- uri: z.string(),
4948
- name: z.string().optional(),
4949
- type: z.string().optional(),
4950
- category: z.string().optional(),
4999
+ var LCNBoostStatus = enumType(["DRAFT", "LIVE"]);
5000
+ var BoostValidator = objectType({
5001
+ uri: stringType(),
5002
+ name: stringType().optional(),
5003
+ type: stringType().optional(),
5004
+ category: stringType().optional(),
4951
5005
  status: LCNBoostStatus.optional(),
4952
- autoConnectRecipients: z.boolean().optional(),
4953
- meta: z.record(z.any()).optional(),
5006
+ autoConnectRecipients: booleanType().optional(),
5007
+ meta: recordType(anyType()).optional(),
4954
5008
  claimPermissions: BoostPermissionsValidator.optional(),
4955
- allowAnyoneToCreateChildren: z.boolean().optional()
5009
+ allowAnyoneToCreateChildren: booleanType().optional()
4956
5010
  });
4957
- var BaseBoostQueryValidator = z.object({
5011
+ var BaseBoostQueryValidator = objectType({
4958
5012
  uri: StringQuery,
4959
5013
  name: StringQuery,
4960
5014
  type: StringQuery,
4961
5015
  category: StringQuery,
4962
- meta: z.record(StringQuery),
4963
- status: LCNBoostStatus.or(z.object({ $in: LCNBoostStatus.array() })),
4964
- autoConnectRecipients: z.boolean()
5016
+ meta: recordType(StringQuery),
5017
+ status: LCNBoostStatus.or(objectType({ $in: LCNBoostStatus.array() })),
5018
+ autoConnectRecipients: booleanType()
4965
5019
  }).partial();
4966
- z.union([
4967
- z.object({
5020
+ unionType([
5021
+ objectType({
4968
5022
  $or: BaseBoostQueryValidator.array()
4969
5023
  }),
4970
5024
  BaseBoostQueryValidator
@@ -4972,242 +5026,242 @@ z.union([
4972
5026
  PaginationResponseValidator.extend({
4973
5027
  records: BoostValidator.array()
4974
5028
  });
4975
- var BoostRecipientValidator = z.object({
5029
+ var BoostRecipientValidator = objectType({
4976
5030
  to: LCNProfileValidator,
4977
- from: z.string(),
4978
- received: z.string().optional(),
4979
- uri: z.string().optional()
5031
+ from: stringType(),
5032
+ received: stringType().optional(),
5033
+ uri: stringType().optional()
4980
5034
  });
4981
5035
  PaginationResponseValidator.extend({
4982
5036
  records: BoostRecipientValidator.array()
4983
5037
  });
4984
- var BoostRecipientWithChildrenValidator = z.object({
5038
+ var BoostRecipientWithChildrenValidator = objectType({
4985
5039
  to: LCNProfileValidator,
4986
- from: z.string(),
4987
- received: z.string().optional(),
4988
- boostUris: z.array(z.string()),
4989
- credentialUris: z.array(z.string()).optional()
5040
+ from: stringType(),
5041
+ received: stringType().optional(),
5042
+ boostUris: arrayType(stringType()),
5043
+ credentialUris: arrayType(stringType()).optional()
4990
5044
  });
4991
5045
  PaginationResponseValidator.extend({
4992
5046
  records: BoostRecipientWithChildrenValidator.array()
4993
5047
  });
4994
- z.object({
4995
- endpoint: z.string(),
4996
- name: z.string(),
4997
- did: z.string().optional()
5048
+ objectType({
5049
+ endpoint: stringType(),
5050
+ name: stringType(),
5051
+ did: stringType().optional()
4998
5052
  });
4999
- z.object({
5000
- ttlSeconds: z.number().optional(),
5001
- totalUses: z.number().optional()
5053
+ objectType({
5054
+ ttlSeconds: numberType().optional(),
5055
+ totalUses: numberType().optional()
5002
5056
  });
5003
- var LCNSigningAuthorityValidator = z.object({
5004
- endpoint: z.string()
5057
+ var LCNSigningAuthorityValidator = objectType({
5058
+ endpoint: stringType()
5005
5059
  });
5006
- z.object({
5060
+ objectType({
5007
5061
  signingAuthority: LCNSigningAuthorityValidator,
5008
- relationship: z.object({
5009
- name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
5062
+ relationship: objectType({
5063
+ name: stringType().max(15).regex(/^[a-z0-9-]+$/, {
5010
5064
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
5011
5065
  }),
5012
- did: z.string(),
5013
- isPrimary: z.boolean().optional()
5066
+ did: stringType(),
5067
+ isPrimary: booleanType().optional()
5014
5068
  })
5015
5069
  });
5016
- z.object({
5017
- boostUri: z.string(),
5018
- signingAuthority: z.object({
5019
- endpoint: z.string(),
5020
- name: z.string()
5070
+ objectType({
5071
+ boostUri: stringType(),
5072
+ signingAuthority: objectType({
5073
+ endpoint: stringType(),
5074
+ name: stringType()
5021
5075
  })
5022
5076
  });
5023
- var ConsentFlowTermsStatusValidator = z.enum(["live", "stale", "withdrawn"]);
5024
- var ConsentFlowContractValidator = z.object({
5025
- read: z.object({
5026
- anonymize: z.boolean().optional(),
5027
- credentials: z.object({
5028
- categories: z.record(
5029
- z.object({
5030
- required: z.boolean(),
5031
- defaultEnabled: z.boolean().optional()
5077
+ var ConsentFlowTermsStatusValidator = enumType(["live", "stale", "withdrawn"]);
5078
+ var ConsentFlowContractValidator = objectType({
5079
+ read: objectType({
5080
+ anonymize: booleanType().optional(),
5081
+ credentials: objectType({
5082
+ categories: recordType(
5083
+ objectType({
5084
+ required: booleanType(),
5085
+ defaultEnabled: booleanType().optional()
5032
5086
  })
5033
5087
  ).default({})
5034
5088
  }).default({}),
5035
- personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
5089
+ personal: recordType(objectType({ required: booleanType(), defaultEnabled: booleanType().optional() })).default({})
5036
5090
  }).default({}),
5037
- write: z.object({
5038
- credentials: z.object({
5039
- categories: z.record(
5040
- z.object({
5041
- required: z.boolean(),
5042
- defaultEnabled: z.boolean().optional()
5091
+ write: objectType({
5092
+ credentials: objectType({
5093
+ categories: recordType(
5094
+ objectType({
5095
+ required: booleanType(),
5096
+ defaultEnabled: booleanType().optional()
5043
5097
  })
5044
5098
  ).default({})
5045
5099
  }).default({}),
5046
- personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
5100
+ personal: recordType(objectType({ required: booleanType(), defaultEnabled: booleanType().optional() })).default({})
5047
5101
  }).default({})
5048
5102
  });
5049
- var ConsentFlowContractDetailsValidator = z.object({
5103
+ var ConsentFlowContractDetailsValidator = objectType({
5050
5104
  contract: ConsentFlowContractValidator,
5051
5105
  owner: LCNProfileValidator,
5052
- name: z.string(),
5053
- subtitle: z.string().optional(),
5054
- description: z.string().optional(),
5055
- reasonForAccessing: z.string().optional(),
5056
- image: z.string().optional(),
5057
- uri: z.string(),
5058
- needsGuardianConsent: z.boolean().optional(),
5059
- redirectUrl: z.string().optional(),
5060
- frontDoorBoostUri: z.string().optional(),
5061
- createdAt: z.string(),
5062
- updatedAt: z.string(),
5063
- expiresAt: z.string().optional(),
5064
- autoBoosts: z.string().array().optional(),
5065
- writers: z.array(LCNProfileValidator).optional()
5106
+ name: stringType(),
5107
+ subtitle: stringType().optional(),
5108
+ description: stringType().optional(),
5109
+ reasonForAccessing: stringType().optional(),
5110
+ image: stringType().optional(),
5111
+ uri: stringType(),
5112
+ needsGuardianConsent: booleanType().optional(),
5113
+ redirectUrl: stringType().optional(),
5114
+ frontDoorBoostUri: stringType().optional(),
5115
+ createdAt: stringType(),
5116
+ updatedAt: stringType(),
5117
+ expiresAt: stringType().optional(),
5118
+ autoBoosts: stringType().array().optional(),
5119
+ writers: arrayType(LCNProfileValidator).optional()
5066
5120
  });
5067
5121
  PaginationResponseValidator.extend({
5068
5122
  records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
5069
5123
  });
5070
- var ConsentFlowContractDataValidator = z.object({
5071
- credentials: z.object({ categories: z.record(z.string().array()).default({}) }),
5072
- personal: z.record(z.string()).default({}),
5073
- date: z.string()
5124
+ var ConsentFlowContractDataValidator = objectType({
5125
+ credentials: objectType({ categories: recordType(stringType().array()).default({}) }),
5126
+ personal: recordType(stringType()).default({}),
5127
+ date: stringType()
5074
5128
  });
5075
5129
  PaginationResponseValidator.extend({
5076
5130
  records: ConsentFlowContractDataValidator.array()
5077
5131
  });
5078
- var ConsentFlowContractDataForDidValidator = z.object({
5079
- credentials: z.object({ category: z.string(), uri: z.string() }).array(),
5080
- personal: z.record(z.string()).default({}),
5081
- date: z.string(),
5082
- contractUri: z.string()
5132
+ var ConsentFlowContractDataForDidValidator = objectType({
5133
+ credentials: objectType({ category: stringType(), uri: stringType() }).array(),
5134
+ personal: recordType(stringType()).default({}),
5135
+ date: stringType(),
5136
+ contractUri: stringType()
5083
5137
  });
5084
5138
  PaginationResponseValidator.extend({
5085
5139
  records: ConsentFlowContractDataForDidValidator.array()
5086
5140
  });
5087
- var ConsentFlowTermValidator = z.object({
5088
- sharing: z.boolean().optional(),
5089
- shared: z.string().array().optional(),
5090
- shareAll: z.boolean().optional(),
5091
- shareUntil: z.string().optional()
5141
+ var ConsentFlowTermValidator = objectType({
5142
+ sharing: booleanType().optional(),
5143
+ shared: stringType().array().optional(),
5144
+ shareAll: booleanType().optional(),
5145
+ shareUntil: stringType().optional()
5092
5146
  });
5093
- var ConsentFlowTermsValidator = z.object({
5094
- read: z.object({
5095
- anonymize: z.boolean().optional(),
5096
- credentials: z.object({
5097
- shareAll: z.boolean().optional(),
5098
- sharing: z.boolean().optional(),
5099
- categories: z.record(ConsentFlowTermValidator).default({})
5147
+ var ConsentFlowTermsValidator = objectType({
5148
+ read: objectType({
5149
+ anonymize: booleanType().optional(),
5150
+ credentials: objectType({
5151
+ shareAll: booleanType().optional(),
5152
+ sharing: booleanType().optional(),
5153
+ categories: recordType(ConsentFlowTermValidator).default({})
5100
5154
  }).default({}),
5101
- personal: z.record(z.string()).default({})
5155
+ personal: recordType(stringType()).default({})
5102
5156
  }).default({}),
5103
- write: z.object({
5104
- credentials: z.object({ categories: z.record(z.boolean()).default({}) }).default({}),
5105
- personal: z.record(z.boolean()).default({})
5157
+ write: objectType({
5158
+ credentials: objectType({ categories: recordType(booleanType()).default({}) }).default({}),
5159
+ personal: recordType(booleanType()).default({})
5106
5160
  }).default({}),
5107
- deniedWriters: z.array(z.string()).optional()
5161
+ deniedWriters: arrayType(stringType()).optional()
5108
5162
  });
5109
5163
  PaginationResponseValidator.extend({
5110
- records: z.object({
5111
- expiresAt: z.string().optional(),
5112
- oneTime: z.boolean().optional(),
5164
+ records: objectType({
5165
+ expiresAt: stringType().optional(),
5166
+ oneTime: booleanType().optional(),
5113
5167
  terms: ConsentFlowTermsValidator,
5114
5168
  contract: ConsentFlowContractDetailsValidator,
5115
- uri: z.string(),
5169
+ uri: stringType(),
5116
5170
  consenter: LCNProfileValidator,
5117
5171
  status: ConsentFlowTermsStatusValidator
5118
5172
  }).array()
5119
5173
  });
5120
- z.object({
5121
- read: z.object({
5122
- anonymize: z.boolean().optional(),
5123
- credentials: z.object({
5124
- categories: z.record(z.object({ required: z.boolean().optional() })).optional()
5174
+ objectType({
5175
+ read: objectType({
5176
+ anonymize: booleanType().optional(),
5177
+ credentials: objectType({
5178
+ categories: recordType(objectType({ required: booleanType().optional() })).optional()
5125
5179
  }).optional(),
5126
- personal: z.record(z.object({ required: z.boolean().optional() })).optional()
5180
+ personal: recordType(objectType({ required: booleanType().optional() })).optional()
5127
5181
  }).optional(),
5128
- write: z.object({
5129
- credentials: z.object({
5130
- categories: z.record(z.object({ required: z.boolean().optional() })).optional()
5182
+ write: objectType({
5183
+ credentials: objectType({
5184
+ categories: recordType(objectType({ required: booleanType().optional() })).optional()
5131
5185
  }).optional(),
5132
- personal: z.record(z.object({ required: z.boolean().optional() })).optional()
5186
+ personal: recordType(objectType({ required: booleanType().optional() })).optional()
5133
5187
  }).optional()
5134
5188
  });
5135
- z.object({
5136
- anonymize: z.boolean().optional(),
5137
- credentials: z.object({ categories: z.record(z.boolean()).optional() }).optional(),
5138
- personal: z.record(z.boolean()).optional()
5189
+ objectType({
5190
+ anonymize: booleanType().optional(),
5191
+ credentials: objectType({ categories: recordType(booleanType()).optional() }).optional(),
5192
+ personal: recordType(booleanType()).optional()
5139
5193
  });
5140
- z.object({
5141
- credentials: z.object({ categories: z.record(z.boolean()).optional() }).optional(),
5142
- personal: z.record(z.boolean()).optional(),
5194
+ objectType({
5195
+ credentials: objectType({ categories: recordType(booleanType()).optional() }).optional(),
5196
+ personal: recordType(booleanType()).optional(),
5143
5197
  id: StringQuery.optional()
5144
5198
  });
5145
- var ConsentFlowTermsQueryValidator = z.object({
5146
- read: z.object({
5147
- anonymize: z.boolean().optional(),
5148
- credentials: z.object({
5149
- shareAll: z.boolean().optional(),
5150
- sharing: z.boolean().optional(),
5151
- categories: z.record(ConsentFlowTermValidator.optional()).optional()
5199
+ var ConsentFlowTermsQueryValidator = objectType({
5200
+ read: objectType({
5201
+ anonymize: booleanType().optional(),
5202
+ credentials: objectType({
5203
+ shareAll: booleanType().optional(),
5204
+ sharing: booleanType().optional(),
5205
+ categories: recordType(ConsentFlowTermValidator.optional()).optional()
5152
5206
  }).optional(),
5153
- personal: z.record(z.string()).optional()
5207
+ personal: recordType(stringType()).optional()
5154
5208
  }).optional(),
5155
- write: z.object({
5156
- credentials: z.object({ categories: z.record(z.boolean()).optional() }).optional(),
5157
- personal: z.record(z.boolean()).optional()
5209
+ write: objectType({
5210
+ credentials: objectType({ categories: recordType(booleanType()).optional() }).optional(),
5211
+ personal: recordType(booleanType()).optional()
5158
5212
  }).optional()
5159
5213
  });
5160
- var ConsentFlowTransactionActionValidator = z.enum([
5214
+ var ConsentFlowTransactionActionValidator = enumType([
5161
5215
  "consent",
5162
5216
  "update",
5163
5217
  "sync",
5164
5218
  "withdraw",
5165
5219
  "write"
5166
5220
  ]);
5167
- z.object({
5221
+ objectType({
5168
5222
  terms: ConsentFlowTermsQueryValidator.optional(),
5169
5223
  action: ConsentFlowTransactionActionValidator.or(
5170
5224
  ConsentFlowTransactionActionValidator.array()
5171
5225
  ).optional(),
5172
- date: z.object({ $gt: z.string() }).or(z.object({ $lt: z.string() })).or(z.object({ $eq: z.string() })).optional(),
5173
- expiresAt: z.object({ $gt: z.string() }).or(z.object({ $lt: z.string() })).or(z.object({ $eq: z.string() })).optional(),
5174
- oneTime: z.boolean().optional()
5226
+ date: objectType({ $gt: stringType() }).or(objectType({ $lt: stringType() })).or(objectType({ $eq: stringType() })).optional(),
5227
+ expiresAt: objectType({ $gt: stringType() }).or(objectType({ $lt: stringType() })).or(objectType({ $eq: stringType() })).optional(),
5228
+ oneTime: booleanType().optional()
5175
5229
  });
5176
- var ConsentFlowTransactionValidator = z.object({
5177
- expiresAt: z.string().optional(),
5178
- oneTime: z.boolean().optional(),
5230
+ var ConsentFlowTransactionValidator = objectType({
5231
+ expiresAt: stringType().optional(),
5232
+ oneTime: booleanType().optional(),
5179
5233
  terms: ConsentFlowTermsValidator.optional(),
5180
- id: z.string(),
5234
+ id: stringType(),
5181
5235
  action: ConsentFlowTransactionActionValidator,
5182
- date: z.string(),
5183
- uris: z.string().array().optional()
5236
+ date: stringType(),
5237
+ uris: stringType().array().optional()
5184
5238
  });
5185
5239
  PaginationResponseValidator.extend({
5186
5240
  records: ConsentFlowTransactionValidator.array()
5187
5241
  });
5188
- var BaseSkillFrameworkQueryValidator = z.object({
5242
+ var BaseSkillFrameworkQueryValidator = objectType({
5189
5243
  id: StringQuery,
5190
5244
  name: StringQuery,
5191
5245
  description: StringQuery,
5192
5246
  sourceURI: StringQuery,
5193
5247
  status: StringQuery
5194
5248
  }).partial();
5195
- z.union([
5196
- z.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
5249
+ unionType([
5250
+ objectType({ $or: BaseSkillFrameworkQueryValidator.array() }),
5197
5251
  BaseSkillFrameworkQueryValidator
5198
5252
  ]);
5199
- var ContractCredentialValidator = z.object({
5200
- credentialUri: z.string(),
5201
- termsUri: z.string(),
5202
- contractUri: z.string(),
5203
- boostUri: z.string(),
5204
- category: z.string().optional(),
5205
- date: z.string()
5253
+ var ContractCredentialValidator = objectType({
5254
+ credentialUri: stringType(),
5255
+ termsUri: stringType(),
5256
+ contractUri: stringType(),
5257
+ boostUri: stringType(),
5258
+ category: stringType().optional(),
5259
+ date: stringType()
5206
5260
  });
5207
5261
  PaginationResponseValidator.extend({
5208
5262
  records: ContractCredentialValidator.array()
5209
5263
  });
5210
- var LCNNotificationTypeEnumValidator = z.enum([
5264
+ var LCNNotificationTypeEnumValidator = enumType([
5211
5265
  "CONNECTION_REQUEST",
5212
5266
  "CONNECTION_ACCEPTED",
5213
5267
  "CREDENTIAL_RECEIVED",
@@ -5222,193 +5276,193 @@ var LCNNotificationTypeEnumValidator = z.enum([
5222
5276
  "ISSUANCE_ERROR",
5223
5277
  "PROFILE_PARENT_APPROVED"
5224
5278
  ]);
5225
- var LCNNotificationMessageValidator = z.object({
5226
- title: z.string().optional(),
5227
- body: z.string().optional()
5279
+ var LCNNotificationMessageValidator = objectType({
5280
+ title: stringType().optional(),
5281
+ body: stringType().optional()
5228
5282
  });
5229
- var LCNInboxContactMethodValidator = z.object({
5230
- type: z.string(),
5231
- value: z.string()
5283
+ var LCNInboxContactMethodValidator = objectType({
5284
+ type: stringType(),
5285
+ value: stringType()
5232
5286
  });
5233
- var LCNInboxStatusEnumValidator = z.enum([
5287
+ var LCNInboxStatusEnumValidator = enumType([
5234
5288
  "PENDING",
5235
5289
  "ISSUED",
5236
5290
  "EXPIRED",
5237
5291
  "DELIVERED",
5238
5292
  "CLAIMED"
5239
5293
  ]);
5240
- var LCNNotificationInboxValidator = z.object({
5241
- issuanceId: z.string(),
5294
+ var LCNNotificationInboxValidator = objectType({
5295
+ issuanceId: stringType(),
5242
5296
  status: LCNInboxStatusEnumValidator,
5243
- recipient: z.object({
5297
+ recipient: objectType({
5244
5298
  contactMethod: LCNInboxContactMethodValidator.optional(),
5245
- learnCardId: z.string().optional()
5299
+ learnCardId: stringType().optional()
5246
5300
  }),
5247
- timestamp: z.string().datetime().optional()
5301
+ timestamp: stringType().datetime().optional()
5248
5302
  });
5249
- var LCNNotificationDataValidator = z.object({
5250
- vcUris: z.array(z.string()).optional(),
5251
- vpUris: z.array(z.string()).optional(),
5303
+ var LCNNotificationDataValidator = objectType({
5304
+ vcUris: arrayType(stringType()).optional(),
5305
+ vpUris: arrayType(stringType()).optional(),
5252
5306
  transaction: ConsentFlowTransactionValidator.optional(),
5253
5307
  inbox: LCNNotificationInboxValidator.optional(),
5254
- metadata: z.record(z.unknown()).optional()
5308
+ metadata: recordType(unknownType()).optional()
5255
5309
  }).passthrough();
5256
- z.object({
5310
+ objectType({
5257
5311
  type: LCNNotificationTypeEnumValidator,
5258
- to: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
5259
- from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
5312
+ to: LCNProfileValidator.partial().and(objectType({ did: stringType() })),
5313
+ from: LCNProfileValidator.partial().and(objectType({ did: stringType() })),
5260
5314
  message: LCNNotificationMessageValidator.optional(),
5261
5315
  data: LCNNotificationDataValidator.optional(),
5262
- sent: z.string().datetime().optional(),
5263
- webhookUrl: z.string().optional()
5316
+ sent: stringType().datetime().optional(),
5317
+ webhookUrl: stringType().optional()
5264
5318
  });
5265
5319
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
5266
- z.object({
5267
- id: z.string(),
5268
- name: z.string(),
5269
- description: z.string().optional(),
5270
- challenge: z.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
5271
- status: z.enum(["revoked", "active"], {
5320
+ objectType({
5321
+ id: stringType(),
5322
+ name: stringType(),
5323
+ description: stringType().optional(),
5324
+ challenge: stringType().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
5325
+ status: enumType(["revoked", "active"], {
5272
5326
  required_error: "Status is required",
5273
5327
  invalid_type_error: "Status must be either active or revoked"
5274
5328
  }),
5275
- scope: z.string(),
5276
- createdAt: z.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
5277
- expiresAt: z.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
5329
+ scope: stringType(),
5330
+ createdAt: stringType().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
5331
+ expiresAt: stringType().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
5278
5332
  });
5279
- z.object({ id: z.string() }).catchall(z.any());
5280
- var AuthGrantStatusValidator = z.enum(["active", "revoked"]);
5281
- z.object({
5333
+ objectType({ id: stringType() }).catchall(anyType());
5334
+ var AuthGrantStatusValidator = enumType(["active", "revoked"]);
5335
+ objectType({
5282
5336
  id: StringQuery,
5283
5337
  name: StringQuery,
5284
5338
  description: StringQuery,
5285
5339
  status: AuthGrantStatusValidator
5286
5340
  }).partial();
5287
- var contactMethodBase = z.object({
5288
- id: z.string(),
5289
- isVerified: z.boolean(),
5290
- verifiedAt: z.string().optional(),
5291
- isPrimary: z.boolean(),
5292
- createdAt: z.string()
5341
+ var contactMethodBase = objectType({
5342
+ id: stringType(),
5343
+ isVerified: booleanType(),
5344
+ verifiedAt: stringType().optional(),
5345
+ isPrimary: booleanType(),
5346
+ createdAt: stringType()
5293
5347
  });
5294
- z.discriminatedUnion("type", [
5295
- z.object({
5296
- type: z.literal("email"),
5297
- value: z.string().email()
5348
+ discriminatedUnionType("type", [
5349
+ objectType({
5350
+ type: literalType("email"),
5351
+ value: stringType().email()
5298
5352
  }).merge(contactMethodBase),
5299
- z.object({
5300
- type: z.literal("phone"),
5301
- value: z.string()
5353
+ objectType({
5354
+ type: literalType("phone"),
5355
+ value: stringType()
5302
5356
  }).merge(contactMethodBase)
5303
5357
  ]);
5304
- var createContactMethodBase = z.object({
5305
- isVerified: z.boolean().optional(),
5306
- isPrimary: z.boolean().optional()
5358
+ var createContactMethodBase = objectType({
5359
+ isVerified: booleanType().optional(),
5360
+ isPrimary: booleanType().optional()
5307
5361
  });
5308
- z.discriminatedUnion("type", [
5309
- z.object({
5310
- type: z.literal("email"),
5311
- value: z.string().email()
5362
+ discriminatedUnionType("type", [
5363
+ objectType({
5364
+ type: literalType("email"),
5365
+ value: stringType().email()
5312
5366
  }).merge(createContactMethodBase),
5313
- z.object({
5314
- type: z.literal("phone"),
5315
- value: z.string()
5367
+ objectType({
5368
+ type: literalType("phone"),
5369
+ value: stringType()
5316
5370
  }).merge(createContactMethodBase)
5317
5371
  ]);
5318
- var ContactMethodQueryValidator = z.discriminatedUnion("type", [
5319
- z.object({
5320
- type: z.literal("email"),
5321
- value: z.string().email()
5372
+ var ContactMethodQueryValidator = discriminatedUnionType("type", [
5373
+ objectType({
5374
+ type: literalType("email"),
5375
+ value: stringType().email()
5322
5376
  }),
5323
- z.object({
5324
- type: z.literal("phone"),
5325
- value: z.string()
5377
+ objectType({
5378
+ type: literalType("phone"),
5379
+ value: stringType()
5326
5380
  })
5327
5381
  ]);
5328
- var ContactMethodVerificationRequestValidator = z.object({
5329
- value: z.string(),
5330
- type: z.enum(["email", "phone"])
5382
+ var ContactMethodVerificationRequestValidator = objectType({
5383
+ value: stringType(),
5384
+ type: enumType(["email", "phone"])
5331
5385
  });
5332
- z.object({
5333
- token: z.string()
5386
+ objectType({
5387
+ token: stringType()
5334
5388
  });
5335
- z.object({
5336
- contactMethodId: z.string()
5389
+ objectType({
5390
+ contactMethodId: stringType()
5337
5391
  });
5338
- z.object({
5392
+ objectType({
5339
5393
  contactMethod: ContactMethodVerificationRequestValidator,
5340
- otpChallenge: z.string()
5394
+ otpChallenge: stringType()
5341
5395
  });
5342
- z.object({
5343
- sessionJwt: z.string()
5396
+ objectType({
5397
+ sessionJwt: stringType()
5344
5398
  });
5345
- var InboxCredentialValidator = z.object({
5346
- id: z.string(),
5347
- credential: z.string(),
5348
- isSigned: z.boolean(),
5399
+ var InboxCredentialValidator = objectType({
5400
+ id: stringType(),
5401
+ credential: stringType(),
5402
+ isSigned: booleanType(),
5349
5403
  currentStatus: LCNInboxStatusEnumValidator,
5350
- isAccepted: z.boolean().optional(),
5351
- expiresAt: z.string(),
5352
- createdAt: z.string(),
5353
- issuerDid: z.string(),
5354
- webhookUrl: z.string().optional(),
5355
- signingAuthority: z.object({
5356
- endpoint: z.string().optional(),
5357
- name: z.string().optional()
5404
+ isAccepted: booleanType().optional(),
5405
+ expiresAt: stringType(),
5406
+ createdAt: stringType(),
5407
+ issuerDid: stringType(),
5408
+ webhookUrl: stringType().optional(),
5409
+ signingAuthority: objectType({
5410
+ endpoint: stringType().optional(),
5411
+ name: stringType().optional()
5358
5412
  }).optional()
5359
5413
  });
5360
- z.object({
5361
- hasMore: z.boolean(),
5362
- records: z.array(InboxCredentialValidator),
5363
- cursor: z.string().optional()
5414
+ objectType({
5415
+ hasMore: booleanType(),
5416
+ records: arrayType(InboxCredentialValidator),
5417
+ cursor: stringType().optional()
5364
5418
  });
5365
- z.object({
5419
+ objectType({
5366
5420
  currentStatus: LCNInboxStatusEnumValidator,
5367
- id: z.string(),
5368
- isSigned: z.boolean(),
5369
- isAccepted: z.boolean().optional(),
5370
- issuerDid: z.string()
5421
+ id: stringType(),
5422
+ isSigned: booleanType(),
5423
+ isAccepted: booleanType().optional(),
5424
+ issuerDid: stringType()
5371
5425
  }).partial();
5372
- var IssueInboxSigningAuthorityValidator = z.object({
5373
- endpoint: z.string().url(),
5374
- name: z.string()
5426
+ var IssueInboxSigningAuthorityValidator = objectType({
5427
+ endpoint: stringType().url(),
5428
+ name: stringType()
5375
5429
  });
5376
- z.object({
5430
+ objectType({
5377
5431
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
5378
5432
  credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe(
5379
5433
  "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
5380
5434
  ),
5381
- configuration: z.object({
5435
+ configuration: objectType({
5382
5436
  signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
5383
5437
  "The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
5384
5438
  ),
5385
- webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
5386
- expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5387
- delivery: z.object({
5388
- suppress: z.boolean().optional().default(false).describe(
5439
+ webhookUrl: stringType().url().optional().describe("The webhook URL to receive credential issuance events."),
5440
+ expiresInDays: numberType().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
5441
+ delivery: objectType({
5442
+ suppress: booleanType().optional().default(false).describe(
5389
5443
  "Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."
5390
5444
  ),
5391
- template: z.object({
5392
- id: z.enum(["universal-inbox-claim"]).optional().describe(
5445
+ template: objectType({
5446
+ id: enumType(["universal-inbox-claim"]).optional().describe(
5393
5447
  "The template ID to use for the credential delivery. If not provided, the default template will be used."
5394
5448
  ),
5395
- model: z.object({
5396
- issuer: z.object({
5397
- name: z.string().optional().describe(
5449
+ model: objectType({
5450
+ issuer: objectType({
5451
+ name: stringType().optional().describe(
5398
5452
  'The name of the organization (e.g., "State University").'
5399
5453
  ),
5400
- logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
5454
+ logoUrl: stringType().url().optional().describe("The URL of the organization's logo.")
5401
5455
  }).optional(),
5402
- credential: z.object({
5403
- name: z.string().optional().describe(
5456
+ credential: objectType({
5457
+ name: stringType().optional().describe(
5404
5458
  'The name of the credential (e.g., "Bachelor of Science").'
5405
5459
  ),
5406
- type: z.string().optional().describe(
5460
+ type: stringType().optional().describe(
5407
5461
  'The type of the credential (e.g., "degree", "certificate").'
5408
5462
  )
5409
5463
  }).optional(),
5410
- recipient: z.object({
5411
- name: z.string().optional().describe(
5464
+ recipient: objectType({
5465
+ name: stringType().optional().describe(
5412
5466
  'The name of the recipient (e.g., "John Doe").'
5413
5467
  )
5414
5468
  }).optional()
@@ -5425,51 +5479,51 @@ z.object({
5425
5479
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
5426
5480
  )
5427
5481
  });
5428
- z.object({
5429
- issuanceId: z.string(),
5482
+ objectType({
5483
+ issuanceId: stringType(),
5430
5484
  status: LCNInboxStatusEnumValidator,
5431
5485
  recipient: ContactMethodQueryValidator,
5432
- claimUrl: z.string().url().optional(),
5433
- recipientDid: z.string().optional()
5486
+ claimUrl: stringType().url().optional(),
5487
+ recipientDid: stringType().optional()
5434
5488
  });
5435
- z.object({
5489
+ objectType({
5436
5490
  credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
5437
- configuration: z.object({
5438
- publishableKey: z.string(),
5439
- signingAuthorityName: z.string().optional()
5491
+ configuration: objectType({
5492
+ publishableKey: stringType(),
5493
+ signingAuthorityName: stringType().optional()
5440
5494
  }).optional()
5441
5495
  });
5442
- var LCNDomainOrOriginValidator = z.union([
5443
- z.string().regex(
5496
+ var LCNDomainOrOriginValidator = unionType([
5497
+ stringType().regex(
5444
5498
  /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5445
5499
  {
5446
5500
  message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
5447
5501
  }
5448
5502
  ),
5449
- z.string().regex(
5503
+ stringType().regex(
5450
5504
  /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5451
5505
  { message: "Must be a valid http(s) origin" }
5452
5506
  )
5453
5507
  ]);
5454
- var LCNIntegrationValidator = z.object({
5455
- id: z.string(),
5456
- name: z.string(),
5457
- description: z.string().optional(),
5458
- publishableKey: z.string(),
5459
- whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5508
+ var LCNIntegrationValidator = objectType({
5509
+ id: stringType(),
5510
+ name: stringType(),
5511
+ description: stringType().optional(),
5512
+ publishableKey: stringType(),
5513
+ whitelistedDomains: arrayType(LCNDomainOrOriginValidator).default([])
5460
5514
  });
5461
- z.object({
5462
- name: z.string(),
5463
- description: z.string().optional(),
5464
- whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5515
+ objectType({
5516
+ name: stringType(),
5517
+ description: stringType().optional(),
5518
+ whitelistedDomains: arrayType(LCNDomainOrOriginValidator).default([])
5465
5519
  });
5466
- z.object({
5467
- name: z.string().optional(),
5468
- description: z.string().optional(),
5469
- whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
5470
- rotatePublishableKey: z.boolean().optional()
5520
+ objectType({
5521
+ name: stringType().optional(),
5522
+ description: stringType().optional(),
5523
+ whitelistedDomains: arrayType(LCNDomainOrOriginValidator).optional(),
5524
+ rotatePublishableKey: booleanType().optional()
5471
5525
  });
5472
- z.object({
5526
+ objectType({
5473
5527
  id: StringQuery,
5474
5528
  name: StringQuery,
5475
5529
  description: StringQuery
@@ -5477,103 +5531,103 @@ z.object({
5477
5531
  PaginationResponseValidator.extend({
5478
5532
  records: LCNIntegrationValidator.array()
5479
5533
  });
5480
- z.object({
5481
- token: z.string(),
5482
- contactMethodId: z.string(),
5483
- autoVerifyContactMethod: z.boolean().optional().default(false),
5484
- createdAt: z.string(),
5485
- expiresAt: z.string(),
5486
- used: z.boolean()
5534
+ objectType({
5535
+ token: stringType(),
5536
+ contactMethodId: stringType(),
5537
+ autoVerifyContactMethod: booleanType().optional().default(false),
5538
+ createdAt: stringType(),
5539
+ expiresAt: stringType(),
5540
+ used: booleanType()
5487
5541
  });
5488
- z.object({
5489
- id: z.string(),
5490
- name: z.string().min(1),
5491
- slug: z.string().min(1),
5492
- createdAt: z.string().optional(),
5493
- updatedAt: z.string().optional()
5542
+ objectType({
5543
+ id: stringType(),
5544
+ name: stringType().min(1),
5545
+ slug: stringType().min(1),
5546
+ createdAt: stringType().optional(),
5547
+ updatedAt: stringType().optional()
5494
5548
  });
5495
- var SkillStatusEnum = z.enum(["active", "archived"]);
5496
- var SkillValidator = z.object({
5497
- id: z.string(),
5498
- statement: z.string(),
5499
- description: z.string().optional(),
5500
- code: z.string().optional(),
5501
- icon: z.string().optional(),
5502
- type: z.string().default("skill"),
5549
+ var SkillStatusEnum = enumType(["active", "archived"]);
5550
+ var SkillValidator = objectType({
5551
+ id: stringType(),
5552
+ statement: stringType(),
5553
+ description: stringType().optional(),
5554
+ code: stringType().optional(),
5555
+ icon: stringType().optional(),
5556
+ type: stringType().default("skill"),
5503
5557
  status: SkillStatusEnum.default("active"),
5504
- frameworkId: z.string().optional(),
5505
- createdAt: z.string().optional(),
5506
- updatedAt: z.string().optional()
5558
+ frameworkId: stringType().optional(),
5559
+ createdAt: stringType().optional(),
5560
+ updatedAt: stringType().optional()
5507
5561
  });
5508
- var BaseSkillQueryValidator = z.object({
5562
+ var BaseSkillQueryValidator = objectType({
5509
5563
  id: StringQuery,
5510
5564
  statement: StringQuery,
5511
5565
  description: StringQuery,
5512
5566
  code: StringQuery,
5513
5567
  type: StringQuery,
5514
- status: SkillStatusEnum.or(z.object({ $in: SkillStatusEnum.array() }))
5568
+ status: SkillStatusEnum.or(objectType({ $in: SkillStatusEnum.array() }))
5515
5569
  }).partial();
5516
- z.union([
5517
- z.object({
5570
+ unionType([
5571
+ objectType({
5518
5572
  $or: BaseSkillQueryValidator.array()
5519
5573
  }),
5520
5574
  BaseSkillQueryValidator
5521
5575
  ]);
5522
- var SkillFrameworkStatusEnum = z.enum(["active", "archived"]);
5523
- var SkillFrameworkValidator = z.object({
5524
- id: z.string(),
5525
- name: z.string(),
5526
- description: z.string().optional(),
5527
- image: z.string().optional(),
5528
- sourceURI: z.string().url().optional(),
5576
+ var SkillFrameworkStatusEnum = enumType(["active", "archived"]);
5577
+ var SkillFrameworkValidator = objectType({
5578
+ id: stringType(),
5579
+ name: stringType(),
5580
+ description: stringType().optional(),
5581
+ image: stringType().optional(),
5582
+ sourceURI: stringType().url().optional(),
5529
5583
  status: SkillFrameworkStatusEnum.default("active"),
5530
- createdAt: z.string().optional(),
5531
- updatedAt: z.string().optional()
5584
+ createdAt: stringType().optional(),
5585
+ updatedAt: stringType().optional()
5532
5586
  });
5533
5587
  PaginationResponseValidator.extend({
5534
5588
  records: SkillFrameworkValidator.array()
5535
5589
  });
5536
5590
  var SkillTreeNodeValidator = SkillValidator.extend({
5537
- children: z.array(z.lazy(() => SkillTreeNodeValidator)),
5538
- hasChildren: z.boolean(),
5539
- childrenCursor: z.string().nullable().optional()
5591
+ children: arrayType(lazyType(() => SkillTreeNodeValidator)),
5592
+ hasChildren: booleanType(),
5593
+ childrenCursor: stringType().nullable().optional()
5540
5594
  }).openapi({ ref: "SkillTreeNode" });
5541
- var PaginatedSkillTreeValidator = z.object({
5542
- hasMore: z.boolean(),
5543
- cursor: z.string().nullable(),
5544
- records: z.array(SkillTreeNodeValidator)
5595
+ var PaginatedSkillTreeValidator = objectType({
5596
+ hasMore: booleanType(),
5597
+ cursor: stringType().nullable(),
5598
+ records: arrayType(SkillTreeNodeValidator)
5545
5599
  });
5546
- var SkillTreeNodeInputValidator = z.lazy(
5547
- () => z.object({
5548
- id: z.string().optional(),
5549
- statement: z.string(),
5550
- description: z.string().optional(),
5551
- code: z.string().optional(),
5552
- icon: z.string().optional(),
5553
- type: z.string().optional(),
5600
+ var SkillTreeNodeInputValidator = lazyType(
5601
+ () => objectType({
5602
+ id: stringType().optional(),
5603
+ statement: stringType(),
5604
+ description: stringType().optional(),
5605
+ code: stringType().optional(),
5606
+ icon: stringType().optional(),
5607
+ type: stringType().optional(),
5554
5608
  status: SkillStatusEnum.optional(),
5555
- children: z.array(SkillTreeNodeInputValidator).optional()
5609
+ children: arrayType(SkillTreeNodeInputValidator).optional()
5556
5610
  })
5557
5611
  ).openapi({ ref: "SkillTreeNodeInput" });
5558
- z.object({
5559
- frameworkId: z.string()
5612
+ objectType({
5613
+ frameworkId: stringType()
5560
5614
  });
5561
- var CreateManagedFrameworkInputValidator = z.object({
5562
- id: z.string().optional(),
5563
- name: z.string().min(1),
5564
- description: z.string().optional(),
5565
- image: z.string().optional(),
5566
- sourceURI: z.string().url().optional(),
5615
+ var CreateManagedFrameworkInputValidator = objectType({
5616
+ id: stringType().optional(),
5617
+ name: stringType().min(1),
5618
+ description: stringType().optional(),
5619
+ image: stringType().optional(),
5620
+ sourceURI: stringType().url().optional(),
5567
5621
  status: SkillFrameworkStatusEnum.optional(),
5568
- skills: z.array(SkillTreeNodeInputValidator).optional(),
5569
- boostUris: z.array(z.string()).optional()
5622
+ skills: arrayType(SkillTreeNodeInputValidator).optional(),
5623
+ boostUris: arrayType(stringType()).optional()
5570
5624
  });
5571
- z.object({
5572
- id: z.string(),
5573
- name: z.string().min(1).optional(),
5574
- description: z.string().optional(),
5575
- image: z.string().optional(),
5576
- sourceURI: z.string().url().optional(),
5625
+ objectType({
5626
+ id: stringType(),
5627
+ name: stringType().min(1).optional(),
5628
+ description: stringType().optional(),
5629
+ image: stringType().optional(),
5630
+ sourceURI: stringType().url().optional(),
5577
5631
  status: SkillFrameworkStatusEnum.optional()
5578
5632
  }).refine(
5579
5633
  (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.status !== void 0,
@@ -5582,38 +5636,38 @@ z.object({
5582
5636
  path: ["name"]
5583
5637
  }
5584
5638
  );
5585
- z.object({ id: z.string() });
5586
- z.object({
5587
- frameworks: z.array(
5639
+ objectType({ id: stringType() });
5640
+ objectType({
5641
+ frameworks: arrayType(
5588
5642
  CreateManagedFrameworkInputValidator.extend({
5589
- skills: z.array(SkillTreeNodeInputValidator).optional()
5643
+ skills: arrayType(SkillTreeNodeInputValidator).optional()
5590
5644
  })
5591
5645
  ).min(1)
5592
5646
  });
5593
- z.object({
5594
- frameworkId: z.string(),
5595
- profileId: z.string()
5647
+ objectType({
5648
+ frameworkId: stringType(),
5649
+ profileId: stringType()
5596
5650
  });
5597
- z.object({ frameworkId: z.string() });
5651
+ objectType({ frameworkId: stringType() });
5598
5652
  LCNProfileValidator.array();
5599
- z.object({ id: z.string() });
5600
- z.object({
5601
- slug: z.string().min(1),
5602
- name: z.string().min(1)
5653
+ objectType({ id: stringType() });
5654
+ objectType({
5655
+ slug: stringType().min(1),
5656
+ name: stringType().min(1)
5603
5657
  });
5604
- z.object({
5605
- frameworkId: z.string(),
5658
+ objectType({
5659
+ frameworkId: stringType(),
5606
5660
  skill: SkillTreeNodeInputValidator,
5607
- parentId: z.string().nullable().optional()
5661
+ parentId: stringType().nullable().optional()
5608
5662
  });
5609
- z.object({
5610
- frameworkId: z.string(),
5611
- id: z.string(),
5612
- statement: z.string().optional(),
5613
- description: z.string().optional(),
5614
- code: z.string().optional(),
5615
- icon: z.string().optional(),
5616
- type: z.string().optional(),
5663
+ objectType({
5664
+ frameworkId: stringType(),
5665
+ id: stringType(),
5666
+ statement: stringType().optional(),
5667
+ description: stringType().optional(),
5668
+ code: stringType().optional(),
5669
+ icon: stringType().optional(),
5670
+ type: stringType().optional(),
5617
5671
  status: SkillStatusEnum.optional()
5618
5672
  }).refine(
5619
5673
  (data) => data.statement !== void 0 || data.description !== void 0 || data.code !== void 0 || data.icon !== void 0 || data.type !== void 0 || data.status !== void 0,
@@ -5622,54 +5676,54 @@ z.object({
5622
5676
  path: ["statement"]
5623
5677
  }
5624
5678
  );
5625
- var SkillDeletionStrategyValidator = z.enum(["recursive", "reparent"]);
5626
- z.object({
5627
- frameworkId: z.string(),
5628
- id: z.string(),
5679
+ var SkillDeletionStrategyValidator = enumType(["recursive", "reparent"]);
5680
+ objectType({
5681
+ frameworkId: stringType(),
5682
+ id: stringType(),
5629
5683
  strategy: SkillDeletionStrategyValidator.optional().default("reparent")
5630
5684
  });
5631
- z.object({
5632
- frameworkId: z.string(),
5633
- skills: z.array(SkillTreeNodeInputValidator).min(1),
5634
- parentId: z.string().nullable().optional()
5685
+ objectType({
5686
+ frameworkId: stringType(),
5687
+ skills: arrayType(SkillTreeNodeInputValidator).min(1),
5688
+ parentId: stringType().nullable().optional()
5635
5689
  });
5636
- z.object({
5637
- frameworkId: z.string(),
5638
- skills: z.array(SkillTreeNodeInputValidator).min(0)
5690
+ objectType({
5691
+ frameworkId: stringType(),
5692
+ skills: arrayType(SkillTreeNodeInputValidator).min(0)
5639
5693
  });
5640
- z.object({
5641
- created: z.number().int().min(0),
5642
- updated: z.number().int().min(0),
5643
- deleted: z.number().int().min(0),
5644
- unchanged: z.number().int().min(0),
5645
- total: z.number().int().min(0)
5694
+ objectType({
5695
+ created: numberType().int().min(0),
5696
+ updated: numberType().int().min(0),
5697
+ deleted: numberType().int().min(0),
5698
+ unchanged: numberType().int().min(0),
5699
+ total: numberType().int().min(0)
5646
5700
  });
5647
- z.object({
5648
- frameworkId: z.string(),
5649
- skillId: z.string().optional(),
5650
- recursive: z.boolean().optional().default(false),
5651
- onlyCountCompetencies: z.boolean().optional().default(false)
5701
+ objectType({
5702
+ frameworkId: stringType(),
5703
+ skillId: stringType().optional(),
5704
+ recursive: booleanType().optional().default(false),
5705
+ onlyCountCompetencies: booleanType().optional().default(false)
5652
5706
  });
5653
- z.object({
5654
- count: z.number().int().min(0)
5707
+ objectType({
5708
+ count: numberType().int().min(0)
5655
5709
  });
5656
- z.object({
5657
- frameworkId: z.string()
5710
+ objectType({
5711
+ frameworkId: stringType()
5658
5712
  });
5659
- z.object({
5660
- skills: z.array(SkillTreeNodeValidator)
5713
+ objectType({
5714
+ skills: arrayType(SkillTreeNodeValidator)
5661
5715
  });
5662
- z.object({
5663
- frameworkId: z.string(),
5664
- skillId: z.string()
5716
+ objectType({
5717
+ frameworkId: stringType(),
5718
+ skillId: stringType()
5665
5719
  });
5666
- z.object({
5667
- path: z.array(SkillValidator)
5720
+ objectType({
5721
+ path: arrayType(SkillValidator)
5668
5722
  });
5669
- z.object({
5723
+ objectType({
5670
5724
  framework: SkillFrameworkValidator,
5671
5725
  skills: PaginatedSkillTreeValidator
5672
5726
  });
5673
5727
 
5674
5728
  exports.VerificationStatusEnum = VerificationStatusEnum;
5675
- //# sourceMappingURL=types.esm-6ce4cc67.js.map
5729
+ //# sourceMappingURL=types.esm-ae4cdf49.js.map