@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.
package/dist/helpers.esm.js
CHANGED
@@ -45,6 +45,7 @@ var require_types_cjs_development = __commonJS({
|
|
45
45
|
var __toCommonJS = /* @__PURE__ */ __name((mod2) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod2), "__toCommonJS");
|
46
46
|
var src_exports = {};
|
47
47
|
__export(src_exports, {
|
48
|
+
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
48
49
|
AchievementCredentialValidator: () => AchievementCredentialValidator,
|
49
50
|
AchievementCriteriaValidator: () => AchievementCriteriaValidator,
|
50
51
|
AchievementSubjectValidator: () => AchievementSubjectValidator,
|
@@ -53,6 +54,9 @@ var require_types_cjs_development = __commonJS({
|
|
53
54
|
AddressValidator: () => AddressValidator,
|
54
55
|
AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator,
|
55
56
|
AlignmentValidator: () => AlignmentValidator,
|
57
|
+
AuthGrantQueryValidator: () => AuthGrantQueryValidator,
|
58
|
+
AuthGrantStatusValidator: () => AuthGrantStatusValidator,
|
59
|
+
AuthGrantValidator: () => AuthGrantValidator,
|
56
60
|
AutoBoostConfigValidator: () => AutoBoostConfigValidator,
|
57
61
|
BoostPermissionsQueryValidator: () => BoostPermissionsQueryValidator,
|
58
62
|
BoostPermissionsValidator: () => BoostPermissionsValidator,
|
@@ -90,6 +94,7 @@ var require_types_cjs_development = __commonJS({
|
|
90
94
|
EndorsementCredentialValidator: () => EndorsementCredentialValidator,
|
91
95
|
EndorsementSubjectValidator: () => EndorsementSubjectValidator,
|
92
96
|
EvidenceValidator: () => EvidenceValidator,
|
97
|
+
FlatAuthGrantValidator: () => FlatAuthGrantValidator,
|
93
98
|
FullClaimHookValidator: () => FullClaimHookValidator,
|
94
99
|
GeoCoordinatesValidator: () => GeoCoordinatesValidator,
|
95
100
|
IdentifierEntryValidator: () => IdentifierEntryValidator,
|
@@ -136,6 +141,7 @@ var require_types_cjs_development = __commonJS({
|
|
136
141
|
ProfileValidator: () => ProfileValidator,
|
137
142
|
ProofValidator: () => ProofValidator,
|
138
143
|
RefreshServiceValidator: () => RefreshServiceValidator,
|
144
|
+
RegExpValidator: () => RegExpValidator,
|
139
145
|
RelatedValidator: () => RelatedValidator,
|
140
146
|
ResultDescriptionValidator: () => ResultDescriptionValidator,
|
141
147
|
ResultStatusTypeValidator: () => ResultStatusTypeValidator,
|
@@ -144,6 +150,7 @@ var require_types_cjs_development = __commonJS({
|
|
144
150
|
RubricCriterionValidator: () => RubricCriterionValidator,
|
145
151
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator,
|
146
152
|
ServiceValidator: () => ServiceValidator,
|
153
|
+
StringQuery: () => StringQuery,
|
147
154
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator,
|
148
155
|
UnsignedVCValidator: () => UnsignedVCValidator,
|
149
156
|
UnsignedVPValidator: () => UnsignedVPValidator,
|
@@ -4308,6 +4315,28 @@ var require_types_cjs_development = __commonJS({
|
|
4308
4315
|
data: LCNNotificationDataValidator.optional(),
|
4309
4316
|
sent: mod.string().datetime().optional()
|
4310
4317
|
});
|
4318
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
4319
|
+
var AuthGrantValidator = mod.object({
|
4320
|
+
id: mod.string(),
|
4321
|
+
name: mod.string(),
|
4322
|
+
description: mod.string().optional(),
|
4323
|
+
challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
4324
|
+
status: mod.enum(["revoked", "active"], {
|
4325
|
+
required_error: "Status is required",
|
4326
|
+
invalid_type_error: "Status must be either active or revoked"
|
4327
|
+
}),
|
4328
|
+
scope: mod.string(),
|
4329
|
+
createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
|
4330
|
+
expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
4331
|
+
});
|
4332
|
+
var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
|
4333
|
+
var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
|
4334
|
+
var AuthGrantQueryValidator = mod.object({
|
4335
|
+
id: StringQuery,
|
4336
|
+
name: StringQuery,
|
4337
|
+
description: StringQuery,
|
4338
|
+
status: AuthGrantStatusValidator
|
4339
|
+
}).partial();
|
4311
4340
|
}
|
4312
4341
|
});
|
4313
4342
|
|