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