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