@learncard/helpers 1.0.14 → 1.0.15
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/helpers.cjs.development.js +64 -46
- package/dist/helpers.cjs.development.js.map +3 -3
- package/dist/helpers.cjs.production.min.js +1 -1
- package/dist/helpers.cjs.production.min.js.map +3 -3
- package/dist/helpers.d.ts +142 -10
- package/dist/helpers.esm.js +64 -46
- package/dist/helpers.esm.js.map +3 -3
- package/package.json +2 -2
@@ -20,7 +20,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
20
20
|
}
|
21
21
|
return to;
|
22
22
|
};
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
24
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
25
28
|
|
26
29
|
// ../learn-card-types/dist/types.cjs.development.js
|
@@ -905,11 +908,14 @@ var require_types_cjs_development = __commonJS({
|
|
905
908
|
const parsedType = this._getType(input);
|
906
909
|
if (parsedType !== ZodParsedType.string) {
|
907
910
|
const ctx2 = this._getOrReturnCtx(input);
|
908
|
-
addIssueToContext(
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
911
|
+
addIssueToContext(
|
912
|
+
ctx2,
|
913
|
+
{
|
914
|
+
code: ZodIssueCode.invalid_type,
|
915
|
+
expected: ZodParsedType.string,
|
916
|
+
received: ctx2.parsedType
|
917
|
+
}
|
918
|
+
);
|
913
919
|
return INVALID;
|
914
920
|
}
|
915
921
|
const status = new ParseStatus();
|
@@ -1917,7 +1923,9 @@ var require_types_cjs_development = __commonJS({
|
|
1917
1923
|
const value = ctx.data[key];
|
1918
1924
|
pairs.push({
|
1919
1925
|
key: { status: "valid", value: key },
|
1920
|
-
value: catchall._parse(
|
1926
|
+
value: catchall._parse(
|
1927
|
+
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
1928
|
+
),
|
1921
1929
|
alwaysSet: key in ctx.data
|
1922
1930
|
});
|
1923
1931
|
}
|
@@ -3472,11 +3480,13 @@ var require_types_cjs_development = __commonJS({
|
|
3472
3480
|
type: mod.string().optional(),
|
3473
3481
|
narrative: mod.string().optional()
|
3474
3482
|
});
|
3475
|
-
var ImageValidator = mod.string().or(
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3483
|
+
var ImageValidator = mod.string().or(
|
3484
|
+
mod.object({
|
3485
|
+
id: mod.string(),
|
3486
|
+
type: mod.string(),
|
3487
|
+
caption: mod.string().optional()
|
3488
|
+
})
|
3489
|
+
);
|
3480
3490
|
var GeoCoordinatesValidator = mod.object({
|
3481
3491
|
type: mod.string().min(1).or(mod.string().array().nonempty()),
|
3482
3492
|
latitude: mod.number(),
|
@@ -3518,29 +3528,31 @@ var require_types_cjs_development = __commonJS({
|
|
3518
3528
|
identifier: mod.string(),
|
3519
3529
|
identifierType: IdentifierTypeValidator
|
3520
3530
|
});
|
3521
|
-
var ProfileValidator = mod.string().or(
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3529
|
-
|
3530
|
-
|
3531
|
-
|
3532
|
-
|
3533
|
-
|
3534
|
-
|
3535
|
-
|
3536
|
-
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
|
3541
|
-
|
3542
|
-
|
3543
|
-
|
3531
|
+
var ProfileValidator = mod.string().or(
|
3532
|
+
mod.object({
|
3533
|
+
id: mod.string().optional(),
|
3534
|
+
type: mod.string().or(mod.string().array().nonempty().optional()),
|
3535
|
+
name: mod.string().optional(),
|
3536
|
+
url: mod.string().optional(),
|
3537
|
+
phone: mod.string().optional(),
|
3538
|
+
description: mod.string().optional(),
|
3539
|
+
endorsement: mod.any().array().optional(),
|
3540
|
+
image: ImageValidator.optional(),
|
3541
|
+
email: mod.string().email().optional(),
|
3542
|
+
address: AddressValidator.optional(),
|
3543
|
+
otherIdentifier: IdentifierEntryValidator.array().optional(),
|
3544
|
+
official: mod.string().optional(),
|
3545
|
+
parentOrg: mod.any().optional(),
|
3546
|
+
familyName: mod.string().optional(),
|
3547
|
+
givenName: mod.string().optional(),
|
3548
|
+
additionalName: mod.string().optional(),
|
3549
|
+
patronymicName: mod.string().optional(),
|
3550
|
+
honorificPrefix: mod.string().optional(),
|
3551
|
+
honorificSuffix: mod.string().optional(),
|
3552
|
+
familyNamePrefix: mod.string().optional(),
|
3553
|
+
dateOfBirth: mod.string().optional()
|
3554
|
+
}).catchall(mod.any())
|
3555
|
+
);
|
3544
3556
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
3545
3557
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
3546
3558
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
@@ -3609,15 +3621,17 @@ var require_types_cjs_development = __commonJS({
|
|
3609
3621
|
aad: mod.string().optional(),
|
3610
3622
|
recipients: JWERecipientValidator.array().optional()
|
3611
3623
|
});
|
3612
|
-
var VerificationMethodValidator = mod.string().or(
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3620
|
-
|
3624
|
+
var VerificationMethodValidator = mod.string().or(
|
3625
|
+
mod.object({
|
3626
|
+
"@context": ContextValidator.optional(),
|
3627
|
+
id: mod.string(),
|
3628
|
+
type: mod.string(),
|
3629
|
+
controller: mod.string(),
|
3630
|
+
publicKeyJwk: JWKValidator.optional(),
|
3631
|
+
publicKeyBase58: mod.string().optional(),
|
3632
|
+
blockChainAccountId: mod.string().optional()
|
3633
|
+
}).catchall(mod.any())
|
3634
|
+
);
|
3621
3635
|
var ServiceValidator = mod.object({
|
3622
3636
|
id: mod.string(),
|
3623
3637
|
type: mod.string().or(mod.string().array().nonempty()),
|
@@ -3815,7 +3829,9 @@ var require_types_cjs_development = __commonJS({
|
|
3815
3829
|
name: mod.string().optional(),
|
3816
3830
|
description: mod.string().optional(),
|
3817
3831
|
image: ImageValidator.optional(),
|
3818
|
-
credentialSubject: AchievementSubjectValidator.or(
|
3832
|
+
credentialSubject: AchievementSubjectValidator.or(
|
3833
|
+
AchievementSubjectValidator.array()
|
3834
|
+
),
|
3819
3835
|
endorsement: UnsignedVCValidator.array().optional(),
|
3820
3836
|
evidence: EvidenceValidator.array().optional()
|
3821
3837
|
});
|
@@ -4044,7 +4060,9 @@ var require_types_cjs_development = __commonJS({
|
|
4044
4060
|
]);
|
4045
4061
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
4046
4062
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
4047
|
-
action: ConsentFlowTransactionActionValidator.or(
|
4063
|
+
action: ConsentFlowTransactionActionValidator.or(
|
4064
|
+
ConsentFlowTransactionActionValidator.array()
|
4065
|
+
).optional(),
|
4048
4066
|
date: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
4049
4067
|
expiresAt: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
4050
4068
|
oneTime: mod.boolean().optional()
|