@learncard/helpers 1.1.11 → 1.1.13
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.
@@ -50,6 +50,7 @@ var require_types_cjs_development = __commonJS({
|
|
50
50
|
var __toCommonJS2 = /* @__PURE__ */ __name((mod2) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod2), "__toCommonJS");
|
51
51
|
var src_exports2 = {};
|
52
52
|
__export2(src_exports2, {
|
53
|
+
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
53
54
|
AchievementCredentialValidator: () => AchievementCredentialValidator,
|
54
55
|
AchievementCriteriaValidator: () => AchievementCriteriaValidator,
|
55
56
|
AchievementSubjectValidator: () => AchievementSubjectValidator,
|
@@ -58,6 +59,9 @@ var require_types_cjs_development = __commonJS({
|
|
58
59
|
AddressValidator: () => AddressValidator,
|
59
60
|
AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator,
|
60
61
|
AlignmentValidator: () => AlignmentValidator,
|
62
|
+
AuthGrantQueryValidator: () => AuthGrantQueryValidator,
|
63
|
+
AuthGrantStatusValidator: () => AuthGrantStatusValidator,
|
64
|
+
AuthGrantValidator: () => AuthGrantValidator,
|
61
65
|
AutoBoostConfigValidator: () => AutoBoostConfigValidator,
|
62
66
|
BoostPermissionsQueryValidator: () => BoostPermissionsQueryValidator,
|
63
67
|
BoostPermissionsValidator: () => BoostPermissionsValidator,
|
@@ -95,6 +99,7 @@ var require_types_cjs_development = __commonJS({
|
|
95
99
|
EndorsementCredentialValidator: () => EndorsementCredentialValidator,
|
96
100
|
EndorsementSubjectValidator: () => EndorsementSubjectValidator,
|
97
101
|
EvidenceValidator: () => EvidenceValidator,
|
102
|
+
FlatAuthGrantValidator: () => FlatAuthGrantValidator,
|
98
103
|
FullClaimHookValidator: () => FullClaimHookValidator,
|
99
104
|
GeoCoordinatesValidator: () => GeoCoordinatesValidator,
|
100
105
|
IdentifierEntryValidator: () => IdentifierEntryValidator,
|
@@ -141,6 +146,7 @@ var require_types_cjs_development = __commonJS({
|
|
141
146
|
ProfileValidator: () => ProfileValidator,
|
142
147
|
ProofValidator: () => ProofValidator,
|
143
148
|
RefreshServiceValidator: () => RefreshServiceValidator,
|
149
|
+
RegExpValidator: () => RegExpValidator,
|
144
150
|
RelatedValidator: () => RelatedValidator,
|
145
151
|
ResultDescriptionValidator: () => ResultDescriptionValidator,
|
146
152
|
ResultStatusTypeValidator: () => ResultStatusTypeValidator,
|
@@ -149,9 +155,12 @@ var require_types_cjs_development = __commonJS({
|
|
149
155
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
150
156
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
151
157
|
ServiceValidator: () => ServiceValidator,
|
158
|
+
StringQuery: () => StringQuery,
|
159
|
+
TermsOfUseValidator: () => TermsOfUseValidator,
|
152
160
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
|
153
161
|
UnsignedVCValidator: () => UnsignedVCValidator,
|
154
162
|
UnsignedVPValidator: () => UnsignedVPValidator,
|
163
|
+
VC2EvidenceValidator: () => VC2EvidenceValidator,
|
155
164
|
VCValidator: () => VCValidator,
|
156
165
|
VPValidator: () => VPValidator,
|
157
166
|
VerificationCheckValidator: () => VerificationCheckValidator,
|
@@ -3577,18 +3586,31 @@ var require_types_cjs_development = __commonJS({
|
|
3577
3586
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
3578
3587
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
3579
3588
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
3580
|
-
var RefreshServiceValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
3589
|
+
var RefreshServiceValidator = mod.object({ id: mod.string().optional(), type: mod.string() }).catchall(mod.any());
|
3590
|
+
var TermsOfUseValidator = mod.object({ type: mod.string(), id: mod.string().optional() }).catchall(mod.any());
|
3591
|
+
var VC2EvidenceValidator = mod.object({ type: mod.string().or(mod.string().array().nonempty()), id: mod.string().optional() }).catchall(mod.any());
|
3581
3592
|
var UnsignedVCValidator = mod.object({
|
3582
3593
|
"@context": ContextValidator,
|
3583
3594
|
id: mod.string().optional(),
|
3584
3595
|
type: mod.string().array().nonempty(),
|
3585
3596
|
issuer: ProfileValidator,
|
3586
|
-
issuanceDate: mod.string(),
|
3587
|
-
expirationDate: mod.string().optional(),
|
3588
3597
|
credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),
|
3589
|
-
|
3590
|
-
credentialSchema: CredentialSchemaValidator.
|
3591
|
-
|
3598
|
+
refreshService: RefreshServiceValidator.or(RefreshServiceValidator.array()).optional(),
|
3599
|
+
credentialSchema: CredentialSchemaValidator.or(
|
3600
|
+
CredentialSchemaValidator.array()
|
3601
|
+
).optional(),
|
3602
|
+
issuanceDate: mod.string().optional(),
|
3603
|
+
expirationDate: mod.string().optional(),
|
3604
|
+
credentialStatus: CredentialStatusValidator.or(
|
3605
|
+
CredentialStatusValidator.array()
|
3606
|
+
).optional(),
|
3607
|
+
name: mod.string().optional(),
|
3608
|
+
description: mod.string().optional(),
|
3609
|
+
validFrom: mod.string().optional(),
|
3610
|
+
validUntil: mod.string().optional(),
|
3611
|
+
status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
|
3612
|
+
termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
|
3613
|
+
evidence: VC2EvidenceValidator.or(VC2EvidenceValidator.array()).optional()
|
3592
3614
|
}).catchall(mod.any());
|
3593
3615
|
var ProofValidator = mod.object({
|
3594
3616
|
type: mod.string(),
|
@@ -3840,7 +3862,7 @@ var require_types_cjs_development = __commonJS({
|
|
3840
3862
|
}).catchall(mod.any());
|
3841
3863
|
var EvidenceValidator = mod.object({
|
3842
3864
|
id: mod.string().optional(),
|
3843
|
-
type: mod.string().array().nonempty(),
|
3865
|
+
type: mod.string().or(mod.string().array().nonempty()),
|
3844
3866
|
narrative: mod.string().optional(),
|
3845
3867
|
name: mod.string().optional(),
|
3846
3868
|
description: mod.string().optional(),
|
@@ -4313,6 +4335,28 @@ var require_types_cjs_development = __commonJS({
|
|
4313
4335
|
data: LCNNotificationDataValidator.optional(),
|
4314
4336
|
sent: mod.string().datetime().optional()
|
4315
4337
|
});
|
4338
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
4339
|
+
var AuthGrantValidator = mod.object({
|
4340
|
+
id: mod.string(),
|
4341
|
+
name: mod.string(),
|
4342
|
+
description: mod.string().optional(),
|
4343
|
+
challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
4344
|
+
status: mod.enum(["revoked", "active"], {
|
4345
|
+
required_error: "Status is required",
|
4346
|
+
invalid_type_error: "Status must be either active or revoked"
|
4347
|
+
}),
|
4348
|
+
scope: mod.string(),
|
4349
|
+
createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
|
4350
|
+
expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
4351
|
+
});
|
4352
|
+
var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
|
4353
|
+
var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
|
4354
|
+
var AuthGrantQueryValidator = mod.object({
|
4355
|
+
id: StringQuery,
|
4356
|
+
name: StringQuery,
|
4357
|
+
description: StringQuery,
|
4358
|
+
status: AuthGrantStatusValidator
|
4359
|
+
}).partial();
|
4316
4360
|
}
|
4317
4361
|
});
|
4318
4362
|
|