@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.
@@ -4482,7 +4482,7 @@ var LCNProfileValidator = z.object({
4482
4482
  bio: z.string().default("").describe("Longer bio for the profile."),
4483
4483
  did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
4484
4484
  isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
4485
- email: z.string().optional().describe("Contact email address for the profile."),
4485
+ email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
4486
4486
  image: z.string().optional().describe("Profile image URL for the profile."),
4487
4487
  heroImage: z.string().optional().describe("Hero image URL for the profile."),
4488
4488
  websiteLink: z.string().optional().describe("Website link for the profile."),
@@ -4651,7 +4651,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
4651
4651
  name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
4652
4652
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
4653
4653
  }),
4654
- did: z.string()
4654
+ did: z.string(),
4655
+ isPrimary: z.boolean().optional()
4655
4656
  })
4656
4657
  });
4657
4658
  var AutoBoostConfigValidator = z.object({
@@ -4832,16 +4833,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
4832
4833
  "BOOST_ACCEPTED",
4833
4834
  "PRESENTATION_REQUEST",
4834
4835
  "PRESENTATION_RECEIVED",
4835
- "CONSENT_FLOW_TRANSACTION"
4836
+ "CONSENT_FLOW_TRANSACTION",
4837
+ "ISSUANCE_CLAIMED",
4838
+ "ISSUANCE_DELIVERED"
4836
4839
  ]);
4837
4840
  var LCNNotificationMessageValidator = z.object({
4838
4841
  title: z.string().optional(),
4839
4842
  body: z.string().optional()
4840
4843
  });
4844
+ var LCNInboxContactMethodValidator = z.object({
4845
+ type: z.string(),
4846
+ value: z.string()
4847
+ });
4848
+ var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
4849
+ var LCNNotificationInboxValidator = z.object({
4850
+ issuanceId: z.string(),
4851
+ status: LCNInboxStatusEnumValidator,
4852
+ recipient: z.object({
4853
+ contactMethod: LCNInboxContactMethodValidator.optional(),
4854
+ learnCardId: z.string().optional()
4855
+ }),
4856
+ timestamp: z.string().datetime().optional()
4857
+ });
4841
4858
  var LCNNotificationDataValidator = z.object({
4842
4859
  vcUris: z.array(z.string()).optional(),
4843
4860
  vpUris: z.array(z.string()).optional(),
4844
- transaction: ConsentFlowTransactionValidator.optional()
4861
+ transaction: ConsentFlowTransactionValidator.optional(),
4862
+ inbox: LCNNotificationInboxValidator.optional()
4845
4863
  });
4846
4864
  var LCNNotificationValidator = z.object({
4847
4865
  type: LCNNotificationTypeEnumValidator,
@@ -4849,7 +4867,8 @@ var LCNNotificationValidator = z.object({
4849
4867
  from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
4850
4868
  message: LCNNotificationMessageValidator.optional(),
4851
4869
  data: LCNNotificationDataValidator.optional(),
4852
- sent: z.string().datetime().optional()
4870
+ sent: z.string().datetime().optional(),
4871
+ webhookUrl: z.string().optional()
4853
4872
  });
4854
4873
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
4855
4874
  var AuthGrantValidator = z.object({
@@ -4873,6 +4892,126 @@ var AuthGrantQueryValidator = z.object({
4873
4892
  description: StringQuery,
4874
4893
  status: AuthGrantStatusValidator
4875
4894
  }).partial();
4895
+ var contactMethodBase = z.object({
4896
+ id: z.string(),
4897
+ isVerified: z.boolean(),
4898
+ verifiedAt: z.string().optional(),
4899
+ isPrimary: z.boolean(),
4900
+ createdAt: z.string()
4901
+ });
4902
+ var ContactMethodValidator = z.discriminatedUnion("type", [
4903
+ z.object({
4904
+ type: z.literal("email"),
4905
+ value: z.string().email()
4906
+ }).merge(contactMethodBase),
4907
+ z.object({
4908
+ type: z.literal("phone"),
4909
+ value: z.string()
4910
+ }).merge(contactMethodBase)
4911
+ ]);
4912
+ var createContactMethodBase = z.object({
4913
+ isVerified: z.boolean().optional(),
4914
+ isPrimary: z.boolean().optional()
4915
+ });
4916
+ var ContactMethodCreateValidator = z.discriminatedUnion("type", [
4917
+ z.object({
4918
+ type: z.literal("email"),
4919
+ value: z.string().email()
4920
+ }).merge(createContactMethodBase),
4921
+ z.object({
4922
+ type: z.literal("phone"),
4923
+ value: z.string()
4924
+ }).merge(createContactMethodBase)
4925
+ ]);
4926
+ var ContactMethodQueryValidator = z.discriminatedUnion("type", [
4927
+ z.object({
4928
+ type: z.literal("email"),
4929
+ value: z.string().email()
4930
+ }),
4931
+ z.object({
4932
+ type: z.literal("phone"),
4933
+ value: z.string()
4934
+ })
4935
+ ]);
4936
+ var ContactMethodVerificationRequestValidator = z.object({
4937
+ value: z.string(),
4938
+ type: z.enum(["email", "phone"])
4939
+ });
4940
+ var ContactMethodVerificationValidator = z.object({
4941
+ token: z.string()
4942
+ });
4943
+ var SetPrimaryContactMethodValidator = z.object({
4944
+ contactMethodId: z.string()
4945
+ });
4946
+ var InboxCredentialValidator = z.object({
4947
+ id: z.string(),
4948
+ credential: z.string(),
4949
+ isSigned: z.boolean(),
4950
+ currentStatus: LCNInboxStatusEnumValidator,
4951
+ expiresAt: z.string(),
4952
+ createdAt: z.string(),
4953
+ issuerDid: z.string(),
4954
+ webhookUrl: z.string().optional(),
4955
+ "signingAuthority.endpoint": z.string().optional(),
4956
+ "signingAuthority.name": z.string().optional()
4957
+ });
4958
+ var PaginatedInboxCredentialsValidator = z.object({
4959
+ hasMore: z.boolean(),
4960
+ records: z.array(InboxCredentialValidator),
4961
+ cursor: z.string().optional()
4962
+ });
4963
+ var InboxCredentialQueryValidator = z.object({
4964
+ currentStatus: LCNInboxStatusEnumValidator,
4965
+ id: z.string(),
4966
+ isSigned: z.boolean(),
4967
+ issuerDid: z.string()
4968
+ }).partial();
4969
+ var IssueInboxSigningAuthorityValidator = z.object({
4970
+ endpoint: z.string().url(),
4971
+ name: z.string()
4972
+ });
4973
+ var IssueInboxCredentialValidator = z.object({
4974
+ recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
4975
+ 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."),
4976
+ configuration: z.object({
4977
+ 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."),
4978
+ webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
4979
+ expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
4980
+ delivery: z.object({
4981
+ 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."),
4982
+ template: z.object({
4983
+ 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."),
4984
+ model: z.object({
4985
+ issuer: z.object({
4986
+ name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
4987
+ logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
4988
+ }).optional(),
4989
+ credential: z.object({
4990
+ name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
4991
+ type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
4992
+ }).optional(),
4993
+ recipient: z.object({
4994
+ name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
4995
+ }).optional()
4996
+ }).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.")
4997
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
4998
+ }).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.")
4999
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
5000
+ });
5001
+ var IssueInboxCredentialResponseValidator = z.object({
5002
+ issuanceId: z.string(),
5003
+ status: LCNInboxStatusEnumValidator,
5004
+ recipient: ContactMethodQueryValidator,
5005
+ claimUrl: z.string().url().optional(),
5006
+ recipientDid: z.string().optional()
5007
+ });
5008
+ var ClaimTokenValidator = z.object({
5009
+ token: z.string(),
5010
+ contactMethodId: z.string(),
5011
+ createdAt: z.string(),
5012
+ expiresAt: z.string(),
5013
+ used: z.boolean()
5014
+ });
4876
5015
 
4877
5016
  // ../../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/typeof.js
4878
5017
  function _typeof(o) {