@learncard/ceramic-plugin 1.0.33 → 1.0.35
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 +42 -7
- package/dist/ceramic-plugin.cjs.development.js.map +2 -2
- package/dist/ceramic-plugin.cjs.production.min.js +33 -33
- package/dist/ceramic-plugin.cjs.production.min.js.map +3 -3
- package/dist/ceramic-plugin.esm.js +42 -7
- package/dist/ceramic-plugin.esm.js.map +2 -2
- package/package.json +4 -4
|
@@ -53328,18 +53328,31 @@ var ProfileValidator = mod.string().or(
|
|
|
53328
53328
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
|
53329
53329
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
|
53330
53330
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
53331
|
-
var RefreshServiceValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
53331
|
+
var RefreshServiceValidator = mod.object({ id: mod.string().optional(), type: mod.string() }).catchall(mod.any());
|
|
53332
|
+
var TermsOfUseValidator = mod.object({ type: mod.string(), id: mod.string().optional() }).catchall(mod.any());
|
|
53333
|
+
var VC2EvidenceValidator = mod.object({ type: mod.string().or(mod.string().array().nonempty()), id: mod.string().optional() }).catchall(mod.any());
|
|
53332
53334
|
var UnsignedVCValidator = mod.object({
|
|
53333
53335
|
"@context": ContextValidator,
|
|
53334
53336
|
id: mod.string().optional(),
|
|
53335
53337
|
type: mod.string().array().nonempty(),
|
|
53336
53338
|
issuer: ProfileValidator,
|
|
53337
|
-
issuanceDate: mod.string(),
|
|
53338
|
-
expirationDate: mod.string().optional(),
|
|
53339
53339
|
credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),
|
|
53340
|
-
|
|
53341
|
-
credentialSchema: CredentialSchemaValidator.
|
|
53342
|
-
|
|
53340
|
+
refreshService: RefreshServiceValidator.or(RefreshServiceValidator.array()).optional(),
|
|
53341
|
+
credentialSchema: CredentialSchemaValidator.or(
|
|
53342
|
+
CredentialSchemaValidator.array()
|
|
53343
|
+
).optional(),
|
|
53344
|
+
issuanceDate: mod.string().optional(),
|
|
53345
|
+
expirationDate: mod.string().optional(),
|
|
53346
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
53347
|
+
CredentialStatusValidator.array()
|
|
53348
|
+
).optional(),
|
|
53349
|
+
name: mod.string().optional(),
|
|
53350
|
+
description: mod.string().optional(),
|
|
53351
|
+
validFrom: mod.string().optional(),
|
|
53352
|
+
validUntil: mod.string().optional(),
|
|
53353
|
+
status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
|
|
53354
|
+
termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
|
|
53355
|
+
evidence: VC2EvidenceValidator.or(VC2EvidenceValidator.array()).optional()
|
|
53343
53356
|
}).catchall(mod.any());
|
|
53344
53357
|
var ProofValidator = mod.object({
|
|
53345
53358
|
type: mod.string(),
|
|
@@ -53591,7 +53604,7 @@ var AchievementSubjectValidator = mod.object({
|
|
|
53591
53604
|
}).catchall(mod.any());
|
|
53592
53605
|
var EvidenceValidator = mod.object({
|
|
53593
53606
|
id: mod.string().optional(),
|
|
53594
|
-
type: mod.string().array().nonempty(),
|
|
53607
|
+
type: mod.string().or(mod.string().array().nonempty()),
|
|
53595
53608
|
narrative: mod.string().optional(),
|
|
53596
53609
|
name: mod.string().optional(),
|
|
53597
53610
|
description: mod.string().optional(),
|
|
@@ -54064,6 +54077,28 @@ var LCNNotificationValidator = mod.object({
|
|
|
54064
54077
|
data: LCNNotificationDataValidator.optional(),
|
|
54065
54078
|
sent: mod.string().datetime().optional()
|
|
54066
54079
|
});
|
|
54080
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
54081
|
+
var AuthGrantValidator = mod.object({
|
|
54082
|
+
id: mod.string(),
|
|
54083
|
+
name: mod.string(),
|
|
54084
|
+
description: mod.string().optional(),
|
|
54085
|
+
challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
54086
|
+
status: mod.enum(["revoked", "active"], {
|
|
54087
|
+
required_error: "Status is required",
|
|
54088
|
+
invalid_type_error: "Status must be either active or revoked"
|
|
54089
|
+
}),
|
|
54090
|
+
scope: mod.string(),
|
|
54091
|
+
createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
54092
|
+
expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
54093
|
+
});
|
|
54094
|
+
var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
|
|
54095
|
+
var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
|
|
54096
|
+
var AuthGrantQueryValidator = mod.object({
|
|
54097
|
+
id: StringQuery,
|
|
54098
|
+
name: StringQuery,
|
|
54099
|
+
description: StringQuery,
|
|
54100
|
+
status: AuthGrantStatusValidator
|
|
54101
|
+
}).partial();
|
|
54067
54102
|
|
|
54068
54103
|
// src/helpers.ts
|
|
54069
54104
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|