@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
|
@@ -53332,18 +53332,31 @@ var ProfileValidator = mod.string().or(
|
|
|
53332
53332
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
|
53333
53333
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
|
53334
53334
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
53335
|
-
var RefreshServiceValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
53335
|
+
var RefreshServiceValidator = mod.object({ id: mod.string().optional(), type: mod.string() }).catchall(mod.any());
|
|
53336
|
+
var TermsOfUseValidator = mod.object({ type: mod.string(), id: mod.string().optional() }).catchall(mod.any());
|
|
53337
|
+
var VC2EvidenceValidator = mod.object({ type: mod.string().or(mod.string().array().nonempty()), id: mod.string().optional() }).catchall(mod.any());
|
|
53336
53338
|
var UnsignedVCValidator = mod.object({
|
|
53337
53339
|
"@context": ContextValidator,
|
|
53338
53340
|
id: mod.string().optional(),
|
|
53339
53341
|
type: mod.string().array().nonempty(),
|
|
53340
53342
|
issuer: ProfileValidator,
|
|
53341
|
-
issuanceDate: mod.string(),
|
|
53342
|
-
expirationDate: mod.string().optional(),
|
|
53343
53343
|
credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),
|
|
53344
|
-
|
|
53345
|
-
credentialSchema: CredentialSchemaValidator.
|
|
53346
|
-
|
|
53344
|
+
refreshService: RefreshServiceValidator.or(RefreshServiceValidator.array()).optional(),
|
|
53345
|
+
credentialSchema: CredentialSchemaValidator.or(
|
|
53346
|
+
CredentialSchemaValidator.array()
|
|
53347
|
+
).optional(),
|
|
53348
|
+
issuanceDate: mod.string().optional(),
|
|
53349
|
+
expirationDate: mod.string().optional(),
|
|
53350
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
53351
|
+
CredentialStatusValidator.array()
|
|
53352
|
+
).optional(),
|
|
53353
|
+
name: mod.string().optional(),
|
|
53354
|
+
description: mod.string().optional(),
|
|
53355
|
+
validFrom: mod.string().optional(),
|
|
53356
|
+
validUntil: mod.string().optional(),
|
|
53357
|
+
status: CredentialStatusValidator.or(CredentialStatusValidator.array()).optional(),
|
|
53358
|
+
termsOfUse: TermsOfUseValidator.or(TermsOfUseValidator.array()).optional(),
|
|
53359
|
+
evidence: VC2EvidenceValidator.or(VC2EvidenceValidator.array()).optional()
|
|
53347
53360
|
}).catchall(mod.any());
|
|
53348
53361
|
var ProofValidator = mod.object({
|
|
53349
53362
|
type: mod.string(),
|
|
@@ -53595,7 +53608,7 @@ var AchievementSubjectValidator = mod.object({
|
|
|
53595
53608
|
}).catchall(mod.any());
|
|
53596
53609
|
var EvidenceValidator = mod.object({
|
|
53597
53610
|
id: mod.string().optional(),
|
|
53598
|
-
type: mod.string().array().nonempty(),
|
|
53611
|
+
type: mod.string().or(mod.string().array().nonempty()),
|
|
53599
53612
|
narrative: mod.string().optional(),
|
|
53600
53613
|
name: mod.string().optional(),
|
|
53601
53614
|
description: mod.string().optional(),
|
|
@@ -54068,6 +54081,28 @@ var LCNNotificationValidator = mod.object({
|
|
|
54068
54081
|
data: LCNNotificationDataValidator.optional(),
|
|
54069
54082
|
sent: mod.string().datetime().optional()
|
|
54070
54083
|
});
|
|
54084
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
54085
|
+
var AuthGrantValidator = mod.object({
|
|
54086
|
+
id: mod.string(),
|
|
54087
|
+
name: mod.string(),
|
|
54088
|
+
description: mod.string().optional(),
|
|
54089
|
+
challenge: mod.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
54090
|
+
status: mod.enum(["revoked", "active"], {
|
|
54091
|
+
required_error: "Status is required",
|
|
54092
|
+
invalid_type_error: "Status must be either active or revoked"
|
|
54093
|
+
}),
|
|
54094
|
+
scope: mod.string(),
|
|
54095
|
+
createdAt: mod.string().datetime({ message: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
54096
|
+
expiresAt: mod.string().datetime({ message: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
54097
|
+
});
|
|
54098
|
+
var FlatAuthGrantValidator = mod.object({ id: mod.string() }).catchall(mod.any());
|
|
54099
|
+
var AuthGrantStatusValidator = mod.enum(["active", "revoked"]);
|
|
54100
|
+
var AuthGrantQueryValidator = mod.object({
|
|
54101
|
+
id: StringQuery,
|
|
54102
|
+
name: StringQuery,
|
|
54103
|
+
description: StringQuery,
|
|
54104
|
+
status: AuthGrantStatusValidator
|
|
54105
|
+
}).partial();
|
|
54071
54106
|
|
|
54072
54107
|
// src/helpers.ts
|
|
54073
54108
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|