@learncard/ceramic-plugin 1.0.40 → 1.0.42
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 +146 -6
- package/dist/ceramic-plugin.cjs.development.js.map +2 -2
- package/dist/ceramic-plugin.cjs.production.min.js +38 -38
- package/dist/ceramic-plugin.cjs.production.min.js.map +3 -3
- package/dist/ceramic-plugin.esm.js +146 -6
- package/dist/ceramic-plugin.esm.js.map +2 -2
- package/package.json +4 -4
|
@@ -54379,7 +54379,7 @@ var LCNProfileValidator = z.object({
|
|
|
54379
54379
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
54380
54380
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
54381
54381
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
54382
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
54382
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
54383
54383
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
54384
54384
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
54385
54385
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -54506,7 +54506,8 @@ var BoostValidator = z.object({
|
|
|
54506
54506
|
status: LCNBoostStatus.optional(),
|
|
54507
54507
|
autoConnectRecipients: z.boolean().optional(),
|
|
54508
54508
|
meta: z.record(z.any()).optional(),
|
|
54509
|
-
claimPermissions: BoostPermissionsValidator.optional()
|
|
54509
|
+
claimPermissions: BoostPermissionsValidator.optional(),
|
|
54510
|
+
allowAnyoneToCreateChildren: z.boolean().optional()
|
|
54510
54511
|
});
|
|
54511
54512
|
var BoostQueryValidator = z.object({
|
|
54512
54513
|
uri: StringQuery,
|
|
@@ -54547,7 +54548,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
|
|
|
54547
54548
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
54548
54549
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
54549
54550
|
}),
|
|
54550
|
-
did: z.string()
|
|
54551
|
+
did: z.string(),
|
|
54552
|
+
isPrimary: z.boolean().optional()
|
|
54551
54553
|
})
|
|
54552
54554
|
});
|
|
54553
54555
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -54728,16 +54730,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
|
|
|
54728
54730
|
"BOOST_ACCEPTED",
|
|
54729
54731
|
"PRESENTATION_REQUEST",
|
|
54730
54732
|
"PRESENTATION_RECEIVED",
|
|
54731
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
54733
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
54734
|
+
"ISSUANCE_CLAIMED",
|
|
54735
|
+
"ISSUANCE_DELIVERED"
|
|
54732
54736
|
]);
|
|
54733
54737
|
var LCNNotificationMessageValidator = z.object({
|
|
54734
54738
|
title: z.string().optional(),
|
|
54735
54739
|
body: z.string().optional()
|
|
54736
54740
|
});
|
|
54741
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
54742
|
+
type: z.string(),
|
|
54743
|
+
value: z.string()
|
|
54744
|
+
});
|
|
54745
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
54746
|
+
var LCNNotificationInboxValidator = z.object({
|
|
54747
|
+
issuanceId: z.string(),
|
|
54748
|
+
status: LCNInboxStatusEnumValidator,
|
|
54749
|
+
recipient: z.object({
|
|
54750
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
54751
|
+
learnCardId: z.string().optional()
|
|
54752
|
+
}),
|
|
54753
|
+
timestamp: z.string().datetime().optional()
|
|
54754
|
+
});
|
|
54737
54755
|
var LCNNotificationDataValidator = z.object({
|
|
54738
54756
|
vcUris: z.array(z.string()).optional(),
|
|
54739
54757
|
vpUris: z.array(z.string()).optional(),
|
|
54740
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
54758
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
54759
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
54741
54760
|
});
|
|
54742
54761
|
var LCNNotificationValidator = z.object({
|
|
54743
54762
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -54745,7 +54764,8 @@ var LCNNotificationValidator = z.object({
|
|
|
54745
54764
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
54746
54765
|
message: LCNNotificationMessageValidator.optional(),
|
|
54747
54766
|
data: LCNNotificationDataValidator.optional(),
|
|
54748
|
-
sent: z.string().datetime().optional()
|
|
54767
|
+
sent: z.string().datetime().optional(),
|
|
54768
|
+
webhookUrl: z.string().optional()
|
|
54749
54769
|
});
|
|
54750
54770
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
54751
54771
|
var AuthGrantValidator = z.object({
|
|
@@ -54769,6 +54789,126 @@ var AuthGrantQueryValidator = z.object({
|
|
|
54769
54789
|
description: StringQuery,
|
|
54770
54790
|
status: AuthGrantStatusValidator
|
|
54771
54791
|
}).partial();
|
|
54792
|
+
var contactMethodBase = z.object({
|
|
54793
|
+
id: z.string(),
|
|
54794
|
+
isVerified: z.boolean(),
|
|
54795
|
+
verifiedAt: z.string().optional(),
|
|
54796
|
+
isPrimary: z.boolean(),
|
|
54797
|
+
createdAt: z.string()
|
|
54798
|
+
});
|
|
54799
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
54800
|
+
z.object({
|
|
54801
|
+
type: z.literal("email"),
|
|
54802
|
+
value: z.string().email()
|
|
54803
|
+
}).merge(contactMethodBase),
|
|
54804
|
+
z.object({
|
|
54805
|
+
type: z.literal("phone"),
|
|
54806
|
+
value: z.string()
|
|
54807
|
+
}).merge(contactMethodBase)
|
|
54808
|
+
]);
|
|
54809
|
+
var createContactMethodBase = z.object({
|
|
54810
|
+
isVerified: z.boolean().optional(),
|
|
54811
|
+
isPrimary: z.boolean().optional()
|
|
54812
|
+
});
|
|
54813
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
54814
|
+
z.object({
|
|
54815
|
+
type: z.literal("email"),
|
|
54816
|
+
value: z.string().email()
|
|
54817
|
+
}).merge(createContactMethodBase),
|
|
54818
|
+
z.object({
|
|
54819
|
+
type: z.literal("phone"),
|
|
54820
|
+
value: z.string()
|
|
54821
|
+
}).merge(createContactMethodBase)
|
|
54822
|
+
]);
|
|
54823
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
54824
|
+
z.object({
|
|
54825
|
+
type: z.literal("email"),
|
|
54826
|
+
value: z.string().email()
|
|
54827
|
+
}),
|
|
54828
|
+
z.object({
|
|
54829
|
+
type: z.literal("phone"),
|
|
54830
|
+
value: z.string()
|
|
54831
|
+
})
|
|
54832
|
+
]);
|
|
54833
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
54834
|
+
value: z.string(),
|
|
54835
|
+
type: z.enum(["email", "phone"])
|
|
54836
|
+
});
|
|
54837
|
+
var ContactMethodVerificationValidator = z.object({
|
|
54838
|
+
token: z.string()
|
|
54839
|
+
});
|
|
54840
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
54841
|
+
contactMethodId: z.string()
|
|
54842
|
+
});
|
|
54843
|
+
var InboxCredentialValidator = z.object({
|
|
54844
|
+
id: z.string(),
|
|
54845
|
+
credential: z.string(),
|
|
54846
|
+
isSigned: z.boolean(),
|
|
54847
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
54848
|
+
expiresAt: z.string(),
|
|
54849
|
+
createdAt: z.string(),
|
|
54850
|
+
issuerDid: z.string(),
|
|
54851
|
+
webhookUrl: z.string().optional(),
|
|
54852
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
54853
|
+
"signingAuthority.name": z.string().optional()
|
|
54854
|
+
});
|
|
54855
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
54856
|
+
hasMore: z.boolean(),
|
|
54857
|
+
records: z.array(InboxCredentialValidator),
|
|
54858
|
+
cursor: z.string().optional()
|
|
54859
|
+
});
|
|
54860
|
+
var InboxCredentialQueryValidator = z.object({
|
|
54861
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
54862
|
+
id: z.string(),
|
|
54863
|
+
isSigned: z.boolean(),
|
|
54864
|
+
issuerDid: z.string()
|
|
54865
|
+
}).partial();
|
|
54866
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
54867
|
+
endpoint: z.string().url(),
|
|
54868
|
+
name: z.string()
|
|
54869
|
+
});
|
|
54870
|
+
var IssueInboxCredentialValidator = z.object({
|
|
54871
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
54872
|
+
credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."),
|
|
54873
|
+
configuration: z.object({
|
|
54874
|
+
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe("The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."),
|
|
54875
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
54876
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
54877
|
+
delivery: z.object({
|
|
54878
|
+
suppress: z.boolean().optional().default(false).describe("Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."),
|
|
54879
|
+
template: z.object({
|
|
54880
|
+
id: z.enum(["universal-inbox-claim"]).optional().describe("The template ID to use for the credential delivery. If not provided, the default template will be used."),
|
|
54881
|
+
model: z.object({
|
|
54882
|
+
issuer: z.object({
|
|
54883
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
54884
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
54885
|
+
}).optional(),
|
|
54886
|
+
credential: z.object({
|
|
54887
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
54888
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
54889
|
+
}).optional(),
|
|
54890
|
+
recipient: z.object({
|
|
54891
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
54892
|
+
}).optional()
|
|
54893
|
+
}).describe("The template model to use for the credential delivery. Injects via template variables into email/sms templates. If not provided, the default template will be used.")
|
|
54894
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
54895
|
+
}).optional().describe("Configuration for the credential delivery i.e. email or SMS. When credentials are sent to a user who has a verified email or phone associated with their account, delivery is skipped, and the credential will be sent using in-app notifications. If not provided, the default configuration will be used.")
|
|
54896
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
54897
|
+
});
|
|
54898
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
54899
|
+
issuanceId: z.string(),
|
|
54900
|
+
status: LCNInboxStatusEnumValidator,
|
|
54901
|
+
recipient: ContactMethodQueryValidator,
|
|
54902
|
+
claimUrl: z.string().url().optional(),
|
|
54903
|
+
recipientDid: z.string().optional()
|
|
54904
|
+
});
|
|
54905
|
+
var ClaimTokenValidator = z.object({
|
|
54906
|
+
token: z.string(),
|
|
54907
|
+
contactMethodId: z.string(),
|
|
54908
|
+
createdAt: z.string(),
|
|
54909
|
+
expiresAt: z.string(),
|
|
54910
|
+
used: z.boolean()
|
|
54911
|
+
});
|
|
54772
54912
|
|
|
54773
54913
|
// src/helpers.ts
|
|
54774
54914
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|