@learncard/learn-card-plugin 1.1.45 → 1.1.46
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/learn-card-plugin.cjs.development.js +144 -5
- package/dist/learn-card-plugin.cjs.development.js.map +2 -2
- package/dist/learn-card-plugin.cjs.production.min.js +1 -1
- package/dist/learn-card-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-card-plugin.esm.js +144 -5
- package/dist/learn-card-plugin.esm.js.map +2 -2
- package/package.json +4 -4
|
@@ -4458,7 +4458,7 @@ var LCNProfileValidator = z.object({
|
|
|
4458
4458
|
bio: z.string().default("").describe("Longer bio for the profile."),
|
|
4459
4459
|
did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
4460
4460
|
isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
4461
|
-
email: z.string().optional().describe("Contact email address for the profile."),
|
|
4461
|
+
email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
4462
4462
|
image: z.string().optional().describe("Profile image URL for the profile."),
|
|
4463
4463
|
heroImage: z.string().optional().describe("Hero image URL for the profile."),
|
|
4464
4464
|
websiteLink: z.string().optional().describe("Website link for the profile."),
|
|
@@ -4627,7 +4627,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
|
|
|
4627
4627
|
name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
|
|
4628
4628
|
message: "The input string must contain only lowercase letters, numbers, and hyphens."
|
|
4629
4629
|
}),
|
|
4630
|
-
did: z.string()
|
|
4630
|
+
did: z.string(),
|
|
4631
|
+
isPrimary: z.boolean().optional()
|
|
4631
4632
|
})
|
|
4632
4633
|
});
|
|
4633
4634
|
var AutoBoostConfigValidator = z.object({
|
|
@@ -4808,16 +4809,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
|
|
|
4808
4809
|
"BOOST_ACCEPTED",
|
|
4809
4810
|
"PRESENTATION_REQUEST",
|
|
4810
4811
|
"PRESENTATION_RECEIVED",
|
|
4811
|
-
"CONSENT_FLOW_TRANSACTION"
|
|
4812
|
+
"CONSENT_FLOW_TRANSACTION",
|
|
4813
|
+
"ISSUANCE_CLAIMED",
|
|
4814
|
+
"ISSUANCE_DELIVERED"
|
|
4812
4815
|
]);
|
|
4813
4816
|
var LCNNotificationMessageValidator = z.object({
|
|
4814
4817
|
title: z.string().optional(),
|
|
4815
4818
|
body: z.string().optional()
|
|
4816
4819
|
});
|
|
4820
|
+
var LCNInboxContactMethodValidator = z.object({
|
|
4821
|
+
type: z.string(),
|
|
4822
|
+
value: z.string()
|
|
4823
|
+
});
|
|
4824
|
+
var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
|
|
4825
|
+
var LCNNotificationInboxValidator = z.object({
|
|
4826
|
+
issuanceId: z.string(),
|
|
4827
|
+
status: LCNInboxStatusEnumValidator,
|
|
4828
|
+
recipient: z.object({
|
|
4829
|
+
contactMethod: LCNInboxContactMethodValidator.optional(),
|
|
4830
|
+
learnCardId: z.string().optional()
|
|
4831
|
+
}),
|
|
4832
|
+
timestamp: z.string().datetime().optional()
|
|
4833
|
+
});
|
|
4817
4834
|
var LCNNotificationDataValidator = z.object({
|
|
4818
4835
|
vcUris: z.array(z.string()).optional(),
|
|
4819
4836
|
vpUris: z.array(z.string()).optional(),
|
|
4820
|
-
transaction: ConsentFlowTransactionValidator.optional()
|
|
4837
|
+
transaction: ConsentFlowTransactionValidator.optional(),
|
|
4838
|
+
inbox: LCNNotificationInboxValidator.optional()
|
|
4821
4839
|
});
|
|
4822
4840
|
var LCNNotificationValidator = z.object({
|
|
4823
4841
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -4825,7 +4843,8 @@ var LCNNotificationValidator = z.object({
|
|
|
4825
4843
|
from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
|
|
4826
4844
|
message: LCNNotificationMessageValidator.optional(),
|
|
4827
4845
|
data: LCNNotificationDataValidator.optional(),
|
|
4828
|
-
sent: z.string().datetime().optional()
|
|
4846
|
+
sent: z.string().datetime().optional(),
|
|
4847
|
+
webhookUrl: z.string().optional()
|
|
4829
4848
|
});
|
|
4830
4849
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
4831
4850
|
var AuthGrantValidator = z.object({
|
|
@@ -4849,6 +4868,126 @@ var AuthGrantQueryValidator = z.object({
|
|
|
4849
4868
|
description: StringQuery,
|
|
4850
4869
|
status: AuthGrantStatusValidator
|
|
4851
4870
|
}).partial();
|
|
4871
|
+
var contactMethodBase = z.object({
|
|
4872
|
+
id: z.string(),
|
|
4873
|
+
isVerified: z.boolean(),
|
|
4874
|
+
verifiedAt: z.string().optional(),
|
|
4875
|
+
isPrimary: z.boolean(),
|
|
4876
|
+
createdAt: z.string()
|
|
4877
|
+
});
|
|
4878
|
+
var ContactMethodValidator = z.discriminatedUnion("type", [
|
|
4879
|
+
z.object({
|
|
4880
|
+
type: z.literal("email"),
|
|
4881
|
+
value: z.string().email()
|
|
4882
|
+
}).merge(contactMethodBase),
|
|
4883
|
+
z.object({
|
|
4884
|
+
type: z.literal("phone"),
|
|
4885
|
+
value: z.string()
|
|
4886
|
+
}).merge(contactMethodBase)
|
|
4887
|
+
]);
|
|
4888
|
+
var createContactMethodBase = z.object({
|
|
4889
|
+
isVerified: z.boolean().optional(),
|
|
4890
|
+
isPrimary: z.boolean().optional()
|
|
4891
|
+
});
|
|
4892
|
+
var ContactMethodCreateValidator = z.discriminatedUnion("type", [
|
|
4893
|
+
z.object({
|
|
4894
|
+
type: z.literal("email"),
|
|
4895
|
+
value: z.string().email()
|
|
4896
|
+
}).merge(createContactMethodBase),
|
|
4897
|
+
z.object({
|
|
4898
|
+
type: z.literal("phone"),
|
|
4899
|
+
value: z.string()
|
|
4900
|
+
}).merge(createContactMethodBase)
|
|
4901
|
+
]);
|
|
4902
|
+
var ContactMethodQueryValidator = z.discriminatedUnion("type", [
|
|
4903
|
+
z.object({
|
|
4904
|
+
type: z.literal("email"),
|
|
4905
|
+
value: z.string().email()
|
|
4906
|
+
}),
|
|
4907
|
+
z.object({
|
|
4908
|
+
type: z.literal("phone"),
|
|
4909
|
+
value: z.string()
|
|
4910
|
+
})
|
|
4911
|
+
]);
|
|
4912
|
+
var ContactMethodVerificationRequestValidator = z.object({
|
|
4913
|
+
value: z.string(),
|
|
4914
|
+
type: z.enum(["email", "phone"])
|
|
4915
|
+
});
|
|
4916
|
+
var ContactMethodVerificationValidator = z.object({
|
|
4917
|
+
token: z.string()
|
|
4918
|
+
});
|
|
4919
|
+
var SetPrimaryContactMethodValidator = z.object({
|
|
4920
|
+
contactMethodId: z.string()
|
|
4921
|
+
});
|
|
4922
|
+
var InboxCredentialValidator = z.object({
|
|
4923
|
+
id: z.string(),
|
|
4924
|
+
credential: z.string(),
|
|
4925
|
+
isSigned: z.boolean(),
|
|
4926
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
4927
|
+
expiresAt: z.string(),
|
|
4928
|
+
createdAt: z.string(),
|
|
4929
|
+
issuerDid: z.string(),
|
|
4930
|
+
webhookUrl: z.string().optional(),
|
|
4931
|
+
"signingAuthority.endpoint": z.string().optional(),
|
|
4932
|
+
"signingAuthority.name": z.string().optional()
|
|
4933
|
+
});
|
|
4934
|
+
var PaginatedInboxCredentialsValidator = z.object({
|
|
4935
|
+
hasMore: z.boolean(),
|
|
4936
|
+
records: z.array(InboxCredentialValidator),
|
|
4937
|
+
cursor: z.string().optional()
|
|
4938
|
+
});
|
|
4939
|
+
var InboxCredentialQueryValidator = z.object({
|
|
4940
|
+
currentStatus: LCNInboxStatusEnumValidator,
|
|
4941
|
+
id: z.string(),
|
|
4942
|
+
isSigned: z.boolean(),
|
|
4943
|
+
issuerDid: z.string()
|
|
4944
|
+
}).partial();
|
|
4945
|
+
var IssueInboxSigningAuthorityValidator = z.object({
|
|
4946
|
+
endpoint: z.string().url(),
|
|
4947
|
+
name: z.string()
|
|
4948
|
+
});
|
|
4949
|
+
var IssueInboxCredentialValidator = z.object({
|
|
4950
|
+
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
4951
|
+
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."),
|
|
4952
|
+
configuration: z.object({
|
|
4953
|
+
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."),
|
|
4954
|
+
webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
4955
|
+
expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
4956
|
+
delivery: z.object({
|
|
4957
|
+
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."),
|
|
4958
|
+
template: z.object({
|
|
4959
|
+
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."),
|
|
4960
|
+
model: z.object({
|
|
4961
|
+
issuer: z.object({
|
|
4962
|
+
name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
|
|
4963
|
+
logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
|
|
4964
|
+
}).optional(),
|
|
4965
|
+
credential: z.object({
|
|
4966
|
+
name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
|
|
4967
|
+
type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
|
|
4968
|
+
}).optional(),
|
|
4969
|
+
recipient: z.object({
|
|
4970
|
+
name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
|
|
4971
|
+
}).optional()
|
|
4972
|
+
}).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.")
|
|
4973
|
+
}).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
|
|
4974
|
+
}).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.")
|
|
4975
|
+
}).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
|
|
4976
|
+
});
|
|
4977
|
+
var IssueInboxCredentialResponseValidator = z.object({
|
|
4978
|
+
issuanceId: z.string(),
|
|
4979
|
+
status: LCNInboxStatusEnumValidator,
|
|
4980
|
+
recipient: ContactMethodQueryValidator,
|
|
4981
|
+
claimUrl: z.string().url().optional(),
|
|
4982
|
+
recipientDid: z.string().optional()
|
|
4983
|
+
});
|
|
4984
|
+
var ClaimTokenValidator = z.object({
|
|
4985
|
+
token: z.string(),
|
|
4986
|
+
contactMethodId: z.string(),
|
|
4987
|
+
createdAt: z.string(),
|
|
4988
|
+
expiresAt: z.string(),
|
|
4989
|
+
used: z.boolean()
|
|
4990
|
+
});
|
|
4852
4991
|
|
|
4853
4992
|
// ../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
4854
4993
|
function _typeof(o) {
|