@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.
@@ -4865,7 +4865,13 @@ var LCNInboxContactMethodValidator = z.object({
4865
4865
  type: z.string(),
4866
4866
  value: z.string()
4867
4867
  });
4868
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
4868
+ var LCNInboxStatusEnumValidator = z.enum([
4869
+ "PENDING",
4870
+ "ISSUED",
4871
+ "EXPIRED",
4872
+ "DELIVERED",
4873
+ "CLAIMED"
4874
+ ]);
4869
4875
  var LCNNotificationInboxValidator = z.object({
4870
4876
  issuanceId: z.string(),
4871
4877
  status: LCNInboxStatusEnumValidator,
@@ -4963,11 +4969,19 @@ var ContactMethodVerificationValidator = z.object({
4963
4969
  var SetPrimaryContactMethodValidator = z.object({
4964
4970
  contactMethodId: z.string()
4965
4971
  });
4972
+ var CreateContactMethodSessionValidator = z.object({
4973
+ contactMethod: ContactMethodVerificationRequestValidator,
4974
+ otpChallenge: z.string()
4975
+ });
4976
+ var CreateContactMethodSessionResponseValidator = z.object({
4977
+ sessionJwt: z.string()
4978
+ });
4966
4979
  var InboxCredentialValidator = z.object({
4967
4980
  id: z.string(),
4968
4981
  credential: z.string(),
4969
4982
  isSigned: z.boolean(),
4970
4983
  currentStatus: LCNInboxStatusEnumValidator,
4984
+ isAccepted: z.boolean().optional(),
4971
4985
  expiresAt: z.string(),
4972
4986
  createdAt: z.string(),
4973
4987
  issuerDid: z.string(),
@@ -4986,6 +5000,7 @@ var InboxCredentialQueryValidator = z.object({
4986
5000
  currentStatus: LCNInboxStatusEnumValidator,
4987
5001
  id: z.string(),
4988
5002
  isSigned: z.boolean(),
5003
+ isAccepted: z.boolean().optional(),
4989
5004
  issuerDid: z.string()
4990
5005
  }).partial();
4991
5006
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -5027,6 +5042,51 @@ var IssueInboxCredentialResponseValidator = z.object({
5027
5042
  claimUrl: z.string().url().optional(),
5028
5043
  recipientDid: z.string().optional()
5029
5044
  });
5045
+ var ClaimInboxCredentialValidator = z.object({
5046
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
5047
+ configuration: z.object({
5048
+ publishableKey: z.string(),
5049
+ signingAuthorityName: z.string().optional()
5050
+ }).optional()
5051
+ });
5052
+ var LCNDomainOrOriginValidator = z.union([
5053
+ z.string().regex(
5054
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5055
+ {
5056
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
5057
+ }
5058
+ ),
5059
+ z.string().regex(
5060
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
5061
+ { message: "Must be a valid http(s) origin" }
5062
+ )
5063
+ ]);
5064
+ var LCNIntegrationValidator = z.object({
5065
+ id: z.string(),
5066
+ name: z.string(),
5067
+ description: z.string().optional(),
5068
+ publishableKey: z.string(),
5069
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5070
+ });
5071
+ var LCNIntegrationCreateValidator = z.object({
5072
+ name: z.string(),
5073
+ description: z.string().optional(),
5074
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
5075
+ });
5076
+ var LCNIntegrationUpdateValidator = z.object({
5077
+ name: z.string().optional(),
5078
+ description: z.string().optional(),
5079
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
5080
+ rotatePublishableKey: z.boolean().optional()
5081
+ });
5082
+ var LCNIntegrationQueryValidator = z.object({
5083
+ id: StringQuery,
5084
+ name: StringQuery,
5085
+ description: StringQuery
5086
+ }).partial();
5087
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
5088
+ records: LCNIntegrationValidator.array()
5089
+ });
5030
5090
  var ClaimTokenValidator = z.object({
5031
5091
  token: z.string(),
5032
5092
  contactMethodId: z.string(),
@@ -6617,10 +6677,7 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
6617
6677
  }, "transformErrorCheck");
6618
6678
  var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
6619
6679
  if (error.startsWith("expiration")) {
6620
- return credential.expirationDate ? `Invalid \u2022 Expired ${format(
6621
- new Date(credential.expirationDate),
6622
- "dd MMM yyyy"
6623
- ).toUpperCase()}` : "Invalid \u2022 Expired";
6680
+ return credential.expirationDate ? `Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Expired";
6624
6681
  }
6625
6682
  return error;
6626
6683
  }, "transformErrorMessage");
@@ -6633,10 +6690,10 @@ var transformWarningCheck = /* @__PURE__ */ __name((warning, _credential) => {
6633
6690
  var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
6634
6691
  return {
6635
6692
  proof: "Valid",
6636
- expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
6693
+ expiration: credential.expirationDate ? `Expires ${format(
6637
6694
  new Date(credential.expirationDate),
6638
6695
  "dd MMM yyyy"
6639
- ).toUpperCase()}` : "Valid \u2022 Does Not Expire"
6696
+ ).toUpperCase()}` : "Does Not Expire"
6640
6697
  }[check] || check;
6641
6698
  }, "transformCheckMessage");
6642
6699
  var verifyCredential = /* @__PURE__ */ __name((learnCard) => {