@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
|
@@ -54383,7 +54383,7 @@ var LCNProfileValidator = z.object({
|
|
|
54383
54383
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
54384
54384
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
54385
54385
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
54386
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
54386
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
54387
54387
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
54388
54388
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
54389
54389
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -54510,7 +54510,8 @@ var BoostValidator = z.object({
|
|
|
54510
54510
|
status: LCNBoostStatus.optional(),
|
|
54511
54511
|
autoConnectRecipients: z.boolean().optional(),
|
|
54512
54512
|
meta: z.record(z.any()).optional(),
|
|
54513
|
-
claimPermissions: BoostPermissionsValidator.optional()
|
|
54513
|
+
claimPermissions: BoostPermissionsValidator.optional(),
|
|
54514
|
+
allowAnyoneToCreateChildren: z.boolean().optional()
|
|
54514
54515
|
});
|
|
54515
54516
|
var BoostQueryValidator = z.object({
|
|
54516
54517
|
uri: StringQuery,
|
|
@@ -54551,7 +54552,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
|
|
|
54551
54552
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
54552
54553
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
54553
54554
|
}),
|
|
54554
|
-
did: z.string()
|
|
54555
|
+
did: z.string(),
|
|
54556
|
+
isPrimary: z.boolean().optional()
|
|
54555
54557
|
})
|
|
54556
54558
|
});
|
|
54557
54559
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -54732,16 +54734,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
|
|
|
54732
54734
|
"BOOST_ACCEPTED",
|
|
54733
54735
|
"PRESENTATION_REQUEST",
|
|
54734
54736
|
"PRESENTATION_RECEIVED",
|
|
54735
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
54737
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
54738
|
+
"ISSUANCE_CLAIMED",
|
|
54739
|
+
"ISSUANCE_DELIVERED"
|
|
54736
54740
|
]);
|
|
54737
54741
|
var LCNNotificationMessageValidator = z.object({
|
|
54738
54742
|
title: z.string().optional(),
|
|
54739
54743
|
body: z.string().optional()
|
|
54740
54744
|
});
|
|
54745
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
54746
|
+
type: z.string(),
|
|
54747
|
+
value: z.string()
|
|
54748
|
+
});
|
|
54749
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
54750
|
+
var LCNNotificationInboxValidator = z.object({
|
|
54751
|
+
issuanceId: z.string(),
|
|
54752
|
+
status: LCNInboxStatusEnumValidator,
|
|
54753
|
+
recipient: z.object({
|
|
54754
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
54755
|
+
learnCardId: z.string().optional()
|
|
54756
|
+
}),
|
|
54757
|
+
timestamp: z.string().datetime().optional()
|
|
54758
|
+
});
|
|
54741
54759
|
var LCNNotificationDataValidator = z.object({
|
|
54742
54760
|
vcUris: z.array(z.string()).optional(),
|
|
54743
54761
|
vpUris: z.array(z.string()).optional(),
|
|
54744
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
54762
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
54763
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
54745
54764
|
});
|
|
54746
54765
|
var LCNNotificationValidator = z.object({
|
|
54747
54766
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -54749,7 +54768,8 @@ var LCNNotificationValidator = z.object({
|
|
|
54749
54768
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
54750
54769
|
message: LCNNotificationMessageValidator.optional(),
|
|
54751
54770
|
data: LCNNotificationDataValidator.optional(),
|
|
54752
|
-
sent: z.string().datetime().optional()
|
|
54771
|
+
sent: z.string().datetime().optional(),
|
|
54772
|
+
webhookUrl: z.string().optional()
|
|
54753
54773
|
});
|
|
54754
54774
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
54755
54775
|
var AuthGrantValidator = z.object({
|
|
@@ -54773,6 +54793,126 @@ var AuthGrantQueryValidator = z.object({
|
|
|
54773
54793
|
description: StringQuery,
|
|
54774
54794
|
status: AuthGrantStatusValidator
|
|
54775
54795
|
}).partial();
|
|
54796
|
+
var contactMethodBase = z.object({
|
|
54797
|
+
id: z.string(),
|
|
54798
|
+
isVerified: z.boolean(),
|
|
54799
|
+
verifiedAt: z.string().optional(),
|
|
54800
|
+
isPrimary: z.boolean(),
|
|
54801
|
+
createdAt: z.string()
|
|
54802
|
+
});
|
|
54803
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
54804
|
+
z.object({
|
|
54805
|
+
type: z.literal("email"),
|
|
54806
|
+
value: z.string().email()
|
|
54807
|
+
}).merge(contactMethodBase),
|
|
54808
|
+
z.object({
|
|
54809
|
+
type: z.literal("phone"),
|
|
54810
|
+
value: z.string()
|
|
54811
|
+
}).merge(contactMethodBase)
|
|
54812
|
+
]);
|
|
54813
|
+
var createContactMethodBase = z.object({
|
|
54814
|
+
isVerified: z.boolean().optional(),
|
|
54815
|
+
isPrimary: z.boolean().optional()
|
|
54816
|
+
});
|
|
54817
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
54818
|
+
z.object({
|
|
54819
|
+
type: z.literal("email"),
|
|
54820
|
+
value: z.string().email()
|
|
54821
|
+
}).merge(createContactMethodBase),
|
|
54822
|
+
z.object({
|
|
54823
|
+
type: z.literal("phone"),
|
|
54824
|
+
value: z.string()
|
|
54825
|
+
}).merge(createContactMethodBase)
|
|
54826
|
+
]);
|
|
54827
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
54828
|
+
z.object({
|
|
54829
|
+
type: z.literal("email"),
|
|
54830
|
+
value: z.string().email()
|
|
54831
|
+
}),
|
|
54832
|
+
z.object({
|
|
54833
|
+
type: z.literal("phone"),
|
|
54834
|
+
value: z.string()
|
|
54835
|
+
})
|
|
54836
|
+
]);
|
|
54837
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
54838
|
+
value: z.string(),
|
|
54839
|
+
type: z.enum(["email", "phone"])
|
|
54840
|
+
});
|
|
54841
|
+
var ContactMethodVerificationValidator = z.object({
|
|
54842
|
+
token: z.string()
|
|
54843
|
+
});
|
|
54844
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
54845
|
+
contactMethodId: z.string()
|
|
54846
|
+
});
|
|
54847
|
+
var InboxCredentialValidator = z.object({
|
|
54848
|
+
id: z.string(),
|
|
54849
|
+
credential: z.string(),
|
|
54850
|
+
isSigned: z.boolean(),
|
|
54851
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
54852
|
+
expiresAt: z.string(),
|
|
54853
|
+
createdAt: z.string(),
|
|
54854
|
+
issuerDid: z.string(),
|
|
54855
|
+
webhookUrl: z.string().optional(),
|
|
54856
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
54857
|
+
"signingAuthority.name": z.string().optional()
|
|
54858
|
+
});
|
|
54859
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
54860
|
+
hasMore: z.boolean(),
|
|
54861
|
+
records: z.array(InboxCredentialValidator),
|
|
54862
|
+
cursor: z.string().optional()
|
|
54863
|
+
});
|
|
54864
|
+
var InboxCredentialQueryValidator = z.object({
|
|
54865
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
54866
|
+
id: z.string(),
|
|
54867
|
+
isSigned: z.boolean(),
|
|
54868
|
+
issuerDid: z.string()
|
|
54869
|
+
}).partial();
|
|
54870
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
54871
|
+
endpoint: z.string().url(),
|
|
54872
|
+
name: z.string()
|
|
54873
|
+
});
|
|
54874
|
+
var IssueInboxCredentialValidator = z.object({
|
|
54875
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
54876
|
+
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."),
|
|
54877
|
+
configuration: z.object({
|
|
54878
|
+
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."),
|
|
54879
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
54880
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
54881
|
+
delivery: z.object({
|
|
54882
|
+
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."),
|
|
54883
|
+
template: z.object({
|
|
54884
|
+
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."),
|
|
54885
|
+
model: z.object({
|
|
54886
|
+
issuer: z.object({
|
|
54887
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
54888
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
54889
|
+
}).optional(),
|
|
54890
|
+
credential: z.object({
|
|
54891
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
54892
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
54893
|
+
}).optional(),
|
|
54894
|
+
recipient: z.object({
|
|
54895
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
54896
|
+
}).optional()
|
|
54897
|
+
}).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.")
|
|
54898
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
54899
|
+
}).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.")
|
|
54900
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
54901
|
+
});
|
|
54902
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
54903
|
+
issuanceId: z.string(),
|
|
54904
|
+
status: LCNInboxStatusEnumValidator,
|
|
54905
|
+
recipient: ContactMethodQueryValidator,
|
|
54906
|
+
claimUrl: z.string().url().optional(),
|
|
54907
|
+
recipientDid: z.string().optional()
|
|
54908
|
+
});
|
|
54909
|
+
var ClaimTokenValidator = z.object({
|
|
54910
|
+
token: z.string(),
|
|
54911
|
+
contactMethodId: z.string(),
|
|
54912
|
+
createdAt: z.string(),
|
|
54913
|
+
expiresAt: z.string(),
|
|
54914
|
+
used: z.boolean()
|
|
54915
|
+
});
|
|
54776
54916
|
|
|
54777
54917
|
// src/helpers.ts
|
|
54778
54918
|
var streamIdToCeramicURI = /* @__PURE__ */ __name((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
|