@learncard/helpers 1.1.11 → 1.1.12
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,6 +155,7 @@ var require_types_cjs_development = __commonJS({
|
|
149
155
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
150
156
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
151
157
|
ServiceValidator: () => ServiceValidator,
|
158
|
+
StringQuery: () => StringQuery,
|
152
159
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
|
153
160
|
UnsignedVCValidator: () => UnsignedVCValidator,
|
154
161
|
UnsignedVPValidator: () => UnsignedVPValidator,
|
@@ -4313,6 +4320,28 @@ var require_types_cjs_development = __commonJS({
|
|
4313
4320
|
data: LCNNotificationDataValidator.optional(),
|
4314
4321
|
sent: mod.string().datetime().optional()
|
4315
4322
|
});
|
4323
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
4324
|
+
var AuthGrantValidator = mod.object({
|
4325
|
+
id: mod.string(),
|
4326
|
+
name: mod.string(),
|
4327
|
+
description: mod.string().optional(),
|
4328
|
+
challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
4329
|
+
status: mod.enum(["revoked", "active"], {
|
4330
|
+
required_error: "Status is required",
|
4331
|
+
invalid_type_error: "Status must be either active or revoked"
|
4332
|
+
}),
|
4333
|
+
scope: mod.string(),
|
4334
|
+
createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
|
4335
|
+
expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
4336
|
+
});
|
4337
|
+
var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
|
4338
|
+
var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
|
4339
|
+
var AuthGrantQueryValidator = mod.object({
|
4340
|
+
id: StringQuery,
|
4341
|
+
name: StringQuery,
|
4342
|
+
description: StringQuery,
|
4343
|
+
status: AuthGrantStatusValidator
|
4344
|
+
}).partial();
|
4316
4345
|
}
|
4317
4346
|
});
|
4318
4347
|
|