@learncard/learn-card-plugin 1.1.61 → 1.1.63

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.
@@ -4841,7 +4841,13 @@ var LCNInboxContactMethodValidator = z.object({
4841
4841
  type: z.string(),
4842
4842
  value: z.string()
4843
4843
  });
4844
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
4844
+ var LCNInboxStatusEnumValidator = z.enum([
4845
+ "PENDING",
4846
+ "ISSUED",
4847
+ "EXPIRED",
4848
+ "DELIVERED",
4849
+ "CLAIMED"
4850
+ ]);
4845
4851
  var LCNNotificationInboxValidator = z.object({
4846
4852
  issuanceId: z.string(),
4847
4853
  status: LCNInboxStatusEnumValidator,
@@ -4939,11 +4945,19 @@ var ContactMethodVerificationValidator = z.object({
4939
4945
  var SetPrimaryContactMethodValidator = z.object({
4940
4946
  contactMethodId: z.string()
4941
4947
  });
4948
+ var CreateContactMethodSessionValidator = z.object({
4949
+ contactMethod: ContactMethodVerificationRequestValidator,
4950
+ otpChallenge: z.string()
4951
+ });
4952
+ var CreateContactMethodSessionResponseValidator = z.object({
4953
+ sessionJwt: z.string()
4954
+ });
4942
4955
  var InboxCredentialValidator = z.object({
4943
4956
  id: z.string(),
4944
4957
  credential: z.string(),
4945
4958
  isSigned: z.boolean(),
4946
4959
  currentStatus: LCNInboxStatusEnumValidator,
4960
+ isAccepted: z.boolean().optional(),
4947
4961
  expiresAt: z.string(),
4948
4962
  createdAt: z.string(),
4949
4963
  issuerDid: z.string(),
@@ -4962,6 +4976,7 @@ var InboxCredentialQueryValidator = z.object({
4962
4976
  currentStatus: LCNInboxStatusEnumValidator,
4963
4977
  id: z.string(),
4964
4978
  isSigned: z.boolean(),
4979
+ isAccepted: z.boolean().optional(),
4965
4980
  issuerDid: z.string()
4966
4981
  }).partial();
4967
4982
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -5003,6 +5018,51 @@ var IssueInboxCredentialResponseValidator = z.object({
5003
5018
  claimUrl: z.string().url().optional(),
5004
5019
  recipientDid: z.string().optional()
5005
5020
  });
5021
+ var ClaimInboxCredentialValidator = z.object({
5022
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
5023
+ configuration: z.object({
5024
+ publishableKey: z.string(),
5025
+ signingAuthorityName: z.string().optional()
5026
+ }).optional()
5027
+ });
5028
+ var LCNDomainOrOriginValidator = z.union([
5029
+ z.string().regex(
5030
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5031
+ {
5032
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
5033
+ }
5034
+ ),
5035
+ z.string().regex(
5036
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5037
+ { message: "Must be a valid http(s) origin" }
5038
+ )
5039
+ ]);
5040
+ var LCNIntegrationValidator = z.object({
5041
+ id: z.string(),
5042
+ name: z.string(),
5043
+ description: z.string().optional(),
5044
+ publishableKey: z.string(),
5045
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5046
+ });
5047
+ var LCNIntegrationCreateValidator = z.object({
5048
+ name: z.string(),
5049
+ description: z.string().optional(),
5050
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5051
+ });
5052
+ var LCNIntegrationUpdateValidator = z.object({
5053
+ name: z.string().optional(),
5054
+ description: z.string().optional(),
5055
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
5056
+ rotatePublishableKey: z.boolean().optional()
5057
+ });
5058
+ var LCNIntegrationQueryValidator = z.object({
5059
+ id: StringQuery,
5060
+ name: StringQuery,
5061
+ description: StringQuery
5062
+ }).partial();
5063
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
5064
+ records: LCNIntegrationValidator.array()
5065
+ });
5006
5066
  var ClaimTokenValidator = z.object({
5007
5067
  token: z.string(),
5008
5068
  contactMethodId: z.string(),
@@ -6593,10 +6653,7 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
6593
6653
  }, "transformErrorCheck");
6594
6654
  var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
6595
6655
  if (error.startsWith("expiration")) {
6596
- return credential.expirationDate ? `Invalid \u2022 Expired ${format(
6597
- new Date(credential.expirationDate),
6598
- "dd MMM yyyy"
6599
- ).toUpperCase()}` : "Invalid \u2022 Expired";
6656
+ return credential.expirationDate ? `Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Expired";
6600
6657
  }
6601
6658
  return error;
6602
6659
  }, "transformErrorMessage");
@@ -6609,10 +6666,10 @@ var transformWarningCheck = /* @__PURE__ */ __name((warning, _credential) => {
6609
6666
  var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
6610
6667
  return {
6611
6668
  proof: "Valid",
6612
- expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
6669
+ expiration: credential.expirationDate ? `Expires ${format(
6613
6670
  new Date(credential.expirationDate),
6614
6671
  "dd MMM yyyy"
6615
- ).toUpperCase()}` : "Valid \u2022 Does Not Expire"
6672
+ ).toUpperCase()}` : "Does Not Expire"
6616
6673
  }[check] || check;
6617
6674
  }, "transformCheckMessage");
6618
6675
  var verifyCredential = /* @__PURE__ */ __name((learnCard) => {