@learncard/helpers 1.0.13 → 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 +73 -47
- 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 +73 -47
- 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
|
|
@@ -103,6 +106,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
103
106
|
LCNProfileValidator: () => LCNProfileValidator,
|
|
104
107
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator,
|
|
105
108
|
LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator,
|
|
109
|
+
PaginatedBoostRecipientsValidator: () => PaginatedBoostRecipientsValidator,
|
|
110
|
+
PaginatedBoostsValidator: () => PaginatedBoostsValidator,
|
|
106
111
|
PaginatedConsentFlowContractsValidator: () => PaginatedConsentFlowContractsValidator,
|
|
107
112
|
PaginatedConsentFlowDataValidator: () => PaginatedConsentFlowDataValidator,
|
|
108
113
|
PaginatedConsentFlowTermsValidator: () => PaginatedConsentFlowTermsValidator,
|
|
@@ -903,11 +908,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
903
908
|
const parsedType = this._getType(input);
|
|
904
909
|
if (parsedType !== ZodParsedType.string) {
|
|
905
910
|
const ctx2 = this._getOrReturnCtx(input);
|
|
906
|
-
addIssueToContext(
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
+
addIssueToContext(
|
|
912
|
+
ctx2,
|
|
913
|
+
{
|
|
914
|
+
code: ZodIssueCode.invalid_type,
|
|
915
|
+
expected: ZodParsedType.string,
|
|
916
|
+
received: ctx2.parsedType
|
|
917
|
+
}
|
|
918
|
+
);
|
|
911
919
|
return INVALID;
|
|
912
920
|
}
|
|
913
921
|
const status = new ParseStatus();
|
|
@@ -1915,7 +1923,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
1915
1923
|
const value = ctx.data[key];
|
|
1916
1924
|
pairs.push({
|
|
1917
1925
|
key: { status: "valid", value: key },
|
|
1918
|
-
value: catchall._parse(
|
|
1926
|
+
value: catchall._parse(
|
|
1927
|
+
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
|
1928
|
+
),
|
|
1919
1929
|
alwaysSet: key in ctx.data
|
|
1920
1930
|
});
|
|
1921
1931
|
}
|
|
@@ -3470,11 +3480,13 @@ var require_types_cjs_development = __commonJS({
|
|
|
3470
3480
|
type: mod.string().optional(),
|
|
3471
3481
|
narrative: mod.string().optional()
|
|
3472
3482
|
});
|
|
3473
|
-
var ImageValidator = mod.string().or(
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3483
|
+
var ImageValidator = mod.string().or(
|
|
3484
|
+
mod.object({
|
|
3485
|
+
id: mod.string(),
|
|
3486
|
+
type: mod.string(),
|
|
3487
|
+
caption: mod.string().optional()
|
|
3488
|
+
})
|
|
3489
|
+
);
|
|
3478
3490
|
var GeoCoordinatesValidator = mod.object({
|
|
3479
3491
|
type: mod.string().min(1).or(mod.string().array().nonempty()),
|
|
3480
3492
|
latitude: mod.number(),
|
|
@@ -3516,29 +3528,31 @@ var require_types_cjs_development = __commonJS({
|
|
|
3516
3528
|
identifier: mod.string(),
|
|
3517
3529
|
identifierType: IdentifierTypeValidator
|
|
3518
3530
|
});
|
|
3519
|
-
var ProfileValidator = mod.string().or(
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
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
|
+
);
|
|
3542
3556
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
|
3543
3557
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
|
3544
3558
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
@@ -3607,15 +3621,17 @@ var require_types_cjs_development = __commonJS({
|
|
|
3607
3621
|
aad: mod.string().optional(),
|
|
3608
3622
|
recipients: JWERecipientValidator.array().optional()
|
|
3609
3623
|
});
|
|
3610
|
-
var VerificationMethodValidator = mod.string().or(
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
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
|
+
);
|
|
3619
3635
|
var ServiceValidator = mod.object({
|
|
3620
3636
|
id: mod.string(),
|
|
3621
3637
|
type: mod.string().or(mod.string().array().nonempty()),
|
|
@@ -3813,7 +3829,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
3813
3829
|
name: mod.string().optional(),
|
|
3814
3830
|
description: mod.string().optional(),
|
|
3815
3831
|
image: ImageValidator.optional(),
|
|
3816
|
-
credentialSubject: AchievementSubjectValidator.or(
|
|
3832
|
+
credentialSubject: AchievementSubjectValidator.or(
|
|
3833
|
+
AchievementSubjectValidator.array()
|
|
3834
|
+
),
|
|
3817
3835
|
endorsement: UnsignedVCValidator.array().optional(),
|
|
3818
3836
|
evidence: EvidenceValidator.array().optional()
|
|
3819
3837
|
});
|
|
@@ -3872,7 +3890,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
3872
3890
|
websiteLink: mod.string().optional(),
|
|
3873
3891
|
isServiceProfile: mod.boolean().default(false).optional(),
|
|
3874
3892
|
type: mod.string().optional(),
|
|
3875
|
-
notificationsWebhook: mod.string().url().startsWith("
|
|
3893
|
+
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
3876
3894
|
});
|
|
3877
3895
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
3878
3896
|
records: LCNProfileValidator.array()
|
|
@@ -3899,11 +3917,17 @@ var require_types_cjs_development = __commonJS({
|
|
|
3899
3917
|
status: LCNBoostStatus.optional(),
|
|
3900
3918
|
autoConnectRecipients: mod.boolean().optional()
|
|
3901
3919
|
});
|
|
3920
|
+
var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
3921
|
+
records: BoostValidator.array()
|
|
3922
|
+
});
|
|
3902
3923
|
var BoostRecipientValidator = mod.object({
|
|
3903
3924
|
to: LCNProfileValidator,
|
|
3904
3925
|
from: mod.string(),
|
|
3905
3926
|
received: mod.string().optional()
|
|
3906
3927
|
});
|
|
3928
|
+
var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
3929
|
+
records: BoostRecipientValidator.array()
|
|
3930
|
+
});
|
|
3907
3931
|
var LCNBoostClaimLinkSigningAuthorityValidator = mod.object({
|
|
3908
3932
|
endpoint: mod.string(),
|
|
3909
3933
|
name: mod.string(),
|
|
@@ -4036,7 +4060,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
4036
4060
|
]);
|
|
4037
4061
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
|
4038
4062
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
|
4039
|
-
action: ConsentFlowTransactionActionValidator.or(
|
|
4063
|
+
action: ConsentFlowTransactionActionValidator.or(
|
|
4064
|
+
ConsentFlowTransactionActionValidator.array()
|
|
4065
|
+
).optional(),
|
|
4040
4066
|
date: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
|
4041
4067
|
expiresAt: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
|
4042
4068
|
oneTime: mod.boolean().optional()
|