@learncard/helpers 1.0.14 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/helpers.cjs.development.js +78 -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 +78 -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
|
@@ -55,6 +58,7 @@ var require_types_cjs_development = __commonJS({
|
|
55
58
|
AddressValidator: () => AddressValidator,
|
56
59
|
AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator,
|
57
60
|
AlignmentValidator: () => AlignmentValidator,
|
61
|
+
BoostPermissionsValidator: () => BoostPermissionsValidator,
|
58
62
|
BoostRecipientValidator: () => BoostRecipientValidator,
|
59
63
|
BoostValidator: () => BoostValidator,
|
60
64
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator,
|
@@ -905,11 +909,14 @@ var require_types_cjs_development = __commonJS({
|
|
905
909
|
const parsedType = this._getType(input);
|
906
910
|
if (parsedType !== ZodParsedType.string) {
|
907
911
|
const ctx2 = this._getOrReturnCtx(input);
|
908
|
-
addIssueToContext(
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
912
|
+
addIssueToContext(
|
913
|
+
ctx2,
|
914
|
+
{
|
915
|
+
code: ZodIssueCode.invalid_type,
|
916
|
+
expected: ZodParsedType.string,
|
917
|
+
received: ctx2.parsedType
|
918
|
+
}
|
919
|
+
);
|
913
920
|
return INVALID;
|
914
921
|
}
|
915
922
|
const status = new ParseStatus();
|
@@ -1917,7 +1924,9 @@ var require_types_cjs_development = __commonJS({
|
|
1917
1924
|
const value = ctx.data[key];
|
1918
1925
|
pairs.push({
|
1919
1926
|
key: { status: "valid", value: key },
|
1920
|
-
value: catchall._parse(
|
1927
|
+
value: catchall._parse(
|
1928
|
+
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
1929
|
+
),
|
1921
1930
|
alwaysSet: key in ctx.data
|
1922
1931
|
});
|
1923
1932
|
}
|
@@ -3472,11 +3481,13 @@ var require_types_cjs_development = __commonJS({
|
|
3472
3481
|
type: mod.string().optional(),
|
3473
3482
|
narrative: mod.string().optional()
|
3474
3483
|
});
|
3475
|
-
var ImageValidator = mod.string().or(
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3484
|
+
var ImageValidator = mod.string().or(
|
3485
|
+
mod.object({
|
3486
|
+
id: mod.string(),
|
3487
|
+
type: mod.string(),
|
3488
|
+
caption: mod.string().optional()
|
3489
|
+
})
|
3490
|
+
);
|
3480
3491
|
var GeoCoordinatesValidator = mod.object({
|
3481
3492
|
type: mod.string().min(1).or(mod.string().array().nonempty()),
|
3482
3493
|
latitude: mod.number(),
|
@@ -3518,29 +3529,31 @@ var require_types_cjs_development = __commonJS({
|
|
3518
3529
|
identifier: mod.string(),
|
3519
3530
|
identifierType: IdentifierTypeValidator
|
3520
3531
|
});
|
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
|
-
|
3532
|
+
var ProfileValidator = mod.string().or(
|
3533
|
+
mod.object({
|
3534
|
+
id: mod.string().optional(),
|
3535
|
+
type: mod.string().or(mod.string().array().nonempty().optional()),
|
3536
|
+
name: mod.string().optional(),
|
3537
|
+
url: mod.string().optional(),
|
3538
|
+
phone: mod.string().optional(),
|
3539
|
+
description: mod.string().optional(),
|
3540
|
+
endorsement: mod.any().array().optional(),
|
3541
|
+
image: ImageValidator.optional(),
|
3542
|
+
email: mod.string().email().optional(),
|
3543
|
+
address: AddressValidator.optional(),
|
3544
|
+
otherIdentifier: IdentifierEntryValidator.array().optional(),
|
3545
|
+
official: mod.string().optional(),
|
3546
|
+
parentOrg: mod.any().optional(),
|
3547
|
+
familyName: mod.string().optional(),
|
3548
|
+
givenName: mod.string().optional(),
|
3549
|
+
additionalName: mod.string().optional(),
|
3550
|
+
patronymicName: mod.string().optional(),
|
3551
|
+
honorificPrefix: mod.string().optional(),
|
3552
|
+
honorificSuffix: mod.string().optional(),
|
3553
|
+
familyNamePrefix: mod.string().optional(),
|
3554
|
+
dateOfBirth: mod.string().optional()
|
3555
|
+
}).catchall(mod.any())
|
3556
|
+
);
|
3544
3557
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
3545
3558
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
3546
3559
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
@@ -3609,15 +3622,17 @@ var require_types_cjs_development = __commonJS({
|
|
3609
3622
|
aad: mod.string().optional(),
|
3610
3623
|
recipients: JWERecipientValidator.array().optional()
|
3611
3624
|
});
|
3612
|
-
var VerificationMethodValidator = mod.string().or(
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3620
|
-
|
3625
|
+
var VerificationMethodValidator = mod.string().or(
|
3626
|
+
mod.object({
|
3627
|
+
"@context": ContextValidator.optional(),
|
3628
|
+
id: mod.string(),
|
3629
|
+
type: mod.string(),
|
3630
|
+
controller: mod.string(),
|
3631
|
+
publicKeyJwk: JWKValidator.optional(),
|
3632
|
+
publicKeyBase58: mod.string().optional(),
|
3633
|
+
blockChainAccountId: mod.string().optional()
|
3634
|
+
}).catchall(mod.any())
|
3635
|
+
);
|
3621
3636
|
var ServiceValidator = mod.object({
|
3622
3637
|
id: mod.string(),
|
3623
3638
|
type: mod.string().or(mod.string().array().nonempty()),
|
@@ -3815,7 +3830,9 @@ var require_types_cjs_development = __commonJS({
|
|
3815
3830
|
name: mod.string().optional(),
|
3816
3831
|
description: mod.string().optional(),
|
3817
3832
|
image: ImageValidator.optional(),
|
3818
|
-
credentialSubject: AchievementSubjectValidator.or(
|
3833
|
+
credentialSubject: AchievementSubjectValidator.or(
|
3834
|
+
AchievementSubjectValidator.array()
|
3835
|
+
),
|
3819
3836
|
endorsement: UnsignedVCValidator.array().optional(),
|
3820
3837
|
evidence: EvidenceValidator.array().optional()
|
3821
3838
|
});
|
@@ -3921,6 +3938,19 @@ var require_types_cjs_development = __commonJS({
|
|
3921
3938
|
ttlSeconds: mod.number().optional(),
|
3922
3939
|
totalUses: mod.number().optional()
|
3923
3940
|
});
|
3941
|
+
var BoostPermissionsValidator = mod.object({
|
3942
|
+
role: mod.string(),
|
3943
|
+
canEdit: mod.boolean(),
|
3944
|
+
canIssue: mod.boolean(),
|
3945
|
+
canRevoke: mod.boolean(),
|
3946
|
+
canManagePermissions: mod.boolean(),
|
3947
|
+
canIssueChildren: mod.string(),
|
3948
|
+
canCreateChildren: mod.string(),
|
3949
|
+
canEditChildren: mod.string(),
|
3950
|
+
canRevokeChildren: mod.string(),
|
3951
|
+
canManageChildrenPermissions: mod.string(),
|
3952
|
+
canViewAnalytics: mod.boolean()
|
3953
|
+
});
|
3924
3954
|
var LCNSigningAuthorityValidator = mod.object({
|
3925
3955
|
endpoint: mod.string()
|
3926
3956
|
});
|
@@ -4044,7 +4074,9 @@ var require_types_cjs_development = __commonJS({
|
|
4044
4074
|
]);
|
4045
4075
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
4046
4076
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
4047
|
-
action: ConsentFlowTransactionActionValidator.or(
|
4077
|
+
action: ConsentFlowTransactionActionValidator.or(
|
4078
|
+
ConsentFlowTransactionActionValidator.array()
|
4079
|
+
).optional(),
|
4048
4080
|
date: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
4049
4081
|
expiresAt: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
4050
4082
|
oneTime: mod.boolean().optional()
|