@learncard/types 5.12.3 → 5.13.1

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/types.esm.js CHANGED
@@ -988,7 +988,9 @@ var LCNNotificationTypeEnumValidator = z9.enum([
988
988
  "PROFILE_PARENT_APPROVED",
989
989
  "APP_LISTING_SUBMITTED",
990
990
  "APP_LISTING_APPROVED",
991
- "APP_LISTING_REJECTED"
991
+ "APP_LISTING_REJECTED",
992
+ "APP_LISTING_WITHDRAWN",
993
+ "DEVICE_LINK_REQUEST"
992
994
  ]);
993
995
  var LCNNotificationMessageValidator = z9.object({
994
996
  title: z9.string().optional(),
@@ -1127,6 +1129,7 @@ var InboxCredentialValidator = z9.object({
1127
1129
  webhookUrl: z9.string().optional(),
1128
1130
  boostUri: z9.string().optional(),
1129
1131
  activityId: z9.string().optional(),
1132
+ integrationId: z9.string().optional(),
1130
1133
  signingAuthority: z9.object({
1131
1134
  endpoint: z9.string().optional(),
1132
1135
  name: z9.string().optional()
@@ -1228,8 +1231,9 @@ var IssueInboxCredentialResponseValidator = z9.object({
1228
1231
  claimUrl: z9.string().url().optional(),
1229
1232
  recipientDid: z9.string().optional()
1230
1233
  });
1234
+ var CredentialNameRefValidator = z9.object({ name: z9.string() }).passthrough();
1231
1235
  var ClaimInboxCredentialValidator = z9.object({
1232
- credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
1236
+ credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
1233
1237
  configuration: z9.object({
1234
1238
  publishableKey: z9.string(),
1235
1239
  signingAuthorityName: z9.string().optional(),
@@ -1562,9 +1566,39 @@ var AppBoostValidator = z9.object({
1562
1566
  var SendCredentialEventValidator = z9.object({
1563
1567
  type: z9.literal("send-credential"),
1564
1568
  templateAlias: z9.string(),
1565
- templateData: z9.record(z9.string(), z9.unknown()).optional()
1569
+ templateData: z9.record(z9.string(), z9.unknown()).optional(),
1570
+ preventDuplicateClaim: z9.boolean().optional()
1571
+ });
1572
+ var CheckCredentialEventValidator = z9.object({
1573
+ type: z9.literal("check-credential"),
1574
+ templateAlias: z9.string().optional(),
1575
+ boostUri: z9.string().optional()
1576
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1577
+ message: "Exactly one of templateAlias or boostUri is required"
1578
+ });
1579
+ var CheckIssuanceStatusEventValidator = z9.object({
1580
+ type: z9.literal("check-issuance-status"),
1581
+ templateAlias: z9.string().optional(),
1582
+ boostUri: z9.string().optional(),
1583
+ recipient: z9.string()
1584
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1585
+ message: "Exactly one of templateAlias or boostUri is required"
1586
+ });
1587
+ var GetTemplateRecipientsEventValidator = z9.object({
1588
+ type: z9.literal("get-template-recipients"),
1589
+ templateAlias: z9.string().optional(),
1590
+ boostUri: z9.string().optional(),
1591
+ limit: z9.number().optional(),
1592
+ cursor: z9.string().optional()
1593
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1594
+ message: "Exactly one of templateAlias or boostUri is required"
1566
1595
  });
1567
- var AppEventValidator = z9.discriminatedUnion("type", [SendCredentialEventValidator]);
1596
+ var AppEventValidator = z9.discriminatedUnion("type", [
1597
+ SendCredentialEventValidator,
1598
+ CheckCredentialEventValidator,
1599
+ CheckIssuanceStatusEventValidator,
1600
+ GetTemplateRecipientsEventValidator
1601
+ ]);
1568
1602
  var AppEventInputValidator = z9.object({
1569
1603
  listingId: z9.string(),
1570
1604
  event: AppEventValidator
@@ -1627,6 +1661,18 @@ var CredentialActivityStatsValidator = z9.object({
1627
1661
  failed: z9.number(),
1628
1662
  claimRate: z9.number()
1629
1663
  });
1664
+
1665
+ // src/auth.ts
1666
+ var AuthSessionError = class extends Error {
1667
+ constructor(message, reason) {
1668
+ super(message);
1669
+ this.reason = reason;
1670
+ this.name = "AuthSessionError";
1671
+ }
1672
+ static {
1673
+ __name(this, "AuthSessionError");
1674
+ }
1675
+ };
1630
1676
  export {
1631
1677
  AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
1632
1678
  AchievementCredentialValidator,
@@ -1650,6 +1696,7 @@ export {
1650
1696
  AuthGrantQueryValidator,
1651
1697
  AuthGrantStatusValidator,
1652
1698
  AuthGrantValidator,
1699
+ AuthSessionError,
1653
1700
  AutoBoostConfigValidator,
1654
1701
  BoostPermissionsQueryValidator,
1655
1702
  BoostPermissionsValidator,
@@ -1657,6 +1704,8 @@ export {
1657
1704
  BoostRecipientValidator,
1658
1705
  BoostRecipientWithChildrenValidator,
1659
1706
  BoostValidator,
1707
+ CheckCredentialEventValidator,
1708
+ CheckIssuanceStatusEventValidator,
1660
1709
  ClaimHookQueryValidator,
1661
1710
  ClaimHookTypeValidator,
1662
1711
  ClaimHookValidator,
@@ -1698,6 +1747,7 @@ export {
1698
1747
  CredentialActivityValidator,
1699
1748
  CredentialActivityWithDetailsValidator,
1700
1749
  CredentialInfoValidator,
1750
+ CredentialNameRefValidator,
1701
1751
  CredentialRecordValidator,
1702
1752
  CredentialSchemaValidator,
1703
1753
  CredentialStatusValidator,
@@ -1719,6 +1769,7 @@ export {
1719
1769
  GetFullSkillTreeResultValidator,
1720
1770
  GetSkillPathInputValidator,
1721
1771
  GetSkillPathResultValidator,
1772
+ GetTemplateRecipientsEventValidator,
1722
1773
  IdentifierEntryValidator,
1723
1774
  IdentifierTypeValidator,
1724
1775
  IdentityObjectValidator,