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