@learncard/ceramic-plugin 1.0.32 → 1.0.34

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.
@@ -54068,6 +54068,28 @@ var LCNNotificationValidator = mod.object({
54068
54068
  data: LCNNotificationDataValidator.optional(),
54069
54069
  sent: mod.string().datetime().optional()
54070
54070
  });
54071
+ var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
54072
+ var AuthGrantValidator = mod.object({
54073
+ id: mod.string(),
54074
+ name: mod.string(),
54075
+ description: mod.string().optional(),
54076
+ challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
54077
+ status: mod.enum(["revoked", "active"], {
54078
+ required_error: "Status is required",
54079
+ invalid_type_error: "Status must be either active or revoked"
54080
+ }),
54081
+ scope: mod.string(),
54082
+ createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
54083
+ expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
54084
+ });
54085
+ var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
54086
+ var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
54087
+ var AuthGrantQueryValidator = mod.object({
54088
+ id: StringQuery,
54089
+ name: StringQuery,
54090
+ description: StringQuery,
54091
+ status: AuthGrantStatusValidator
54092
+ }).partial();
54071
54093
 
54072
54094
  // src/helpers.ts
54073
54095
  var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");