@learncard/types 5.12.2 → 5.13.0
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/auth.d.ts +328 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lcn.d.ts +115 -2
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +59 -5
- package/dist/types.cjs.development.js.map +3 -3
- package/dist/types.cjs.production.min.js +10 -10
- package/dist/types.cjs.production.min.js.map +4 -4
- package/dist/types.esm.js +59 -5
- package/dist/types.esm.js.map +3 -3
- package/package.json +1 -1
package/dist/types.esm.js
CHANGED
|
@@ -988,7 +988,8 @@ 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
|
+
"DEVICE_LINK_REQUEST"
|
|
992
993
|
]);
|
|
993
994
|
var LCNNotificationMessageValidator = z9.object({
|
|
994
995
|
title: z9.string().optional(),
|
|
@@ -1127,6 +1128,7 @@ var InboxCredentialValidator = z9.object({
|
|
|
1127
1128
|
webhookUrl: z9.string().optional(),
|
|
1128
1129
|
boostUri: z9.string().optional(),
|
|
1129
1130
|
activityId: z9.string().optional(),
|
|
1131
|
+
integrationId: z9.string().optional(),
|
|
1130
1132
|
signingAuthority: z9.object({
|
|
1131
1133
|
endpoint: z9.string().optional(),
|
|
1132
1134
|
name: z9.string().optional()
|
|
@@ -1228,8 +1230,9 @@ var IssueInboxCredentialResponseValidator = z9.object({
|
|
|
1228
1230
|
claimUrl: z9.string().url().optional(),
|
|
1229
1231
|
recipientDid: z9.string().optional()
|
|
1230
1232
|
});
|
|
1233
|
+
var CredentialNameRefValidator = z9.object({ name: z9.string() }).passthrough();
|
|
1231
1234
|
var ClaimInboxCredentialValidator = z9.object({
|
|
1232
|
-
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
|
|
1235
|
+
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
1233
1236
|
configuration: z9.object({
|
|
1234
1237
|
publishableKey: z9.string(),
|
|
1235
1238
|
signingAuthorityName: z9.string().optional(),
|
|
@@ -1512,6 +1515,7 @@ var PromotionLevelValidator = z9.enum([
|
|
|
1512
1515
|
"STANDARD",
|
|
1513
1516
|
"DEMOTED"
|
|
1514
1517
|
]);
|
|
1518
|
+
var AgeRatingValidator = z9.enum(["4+", "9+", "12+", "17+"]);
|
|
1515
1519
|
var AppStoreListingValidator = z9.object({
|
|
1516
1520
|
listing_id: z9.string(),
|
|
1517
1521
|
slug: z9.string().optional(),
|
|
@@ -1531,7 +1535,9 @@ var AppStoreListingValidator = z9.object({
|
|
|
1531
1535
|
terms_url: z9.string().optional(),
|
|
1532
1536
|
highlights: z9.array(z9.string()).optional(),
|
|
1533
1537
|
screenshots: z9.array(z9.string()).optional(),
|
|
1534
|
-
hero_background_color: z9.string().optional()
|
|
1538
|
+
hero_background_color: z9.string().optional(),
|
|
1539
|
+
min_age: z9.number().int().min(0).max(18).optional(),
|
|
1540
|
+
age_rating: AgeRatingValidator.optional()
|
|
1535
1541
|
});
|
|
1536
1542
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
1537
1543
|
listing_id: true,
|
|
@@ -1559,9 +1565,39 @@ var AppBoostValidator = z9.object({
|
|
|
1559
1565
|
var SendCredentialEventValidator = z9.object({
|
|
1560
1566
|
type: z9.literal("send-credential"),
|
|
1561
1567
|
templateAlias: z9.string(),
|
|
1562
|
-
templateData: z9.record(z9.string(), z9.unknown()).optional()
|
|
1568
|
+
templateData: z9.record(z9.string(), z9.unknown()).optional(),
|
|
1569
|
+
preventDuplicateClaim: z9.boolean().optional()
|
|
1570
|
+
});
|
|
1571
|
+
var CheckCredentialEventValidator = z9.object({
|
|
1572
|
+
type: z9.literal("check-credential"),
|
|
1573
|
+
templateAlias: z9.string().optional(),
|
|
1574
|
+
boostUri: z9.string().optional()
|
|
1575
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
1576
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
1577
|
+
});
|
|
1578
|
+
var CheckIssuanceStatusEventValidator = z9.object({
|
|
1579
|
+
type: z9.literal("check-issuance-status"),
|
|
1580
|
+
templateAlias: z9.string().optional(),
|
|
1581
|
+
boostUri: z9.string().optional(),
|
|
1582
|
+
recipient: z9.string()
|
|
1583
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
1584
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
1585
|
+
});
|
|
1586
|
+
var GetTemplateRecipientsEventValidator = z9.object({
|
|
1587
|
+
type: z9.literal("get-template-recipients"),
|
|
1588
|
+
templateAlias: z9.string().optional(),
|
|
1589
|
+
boostUri: z9.string().optional(),
|
|
1590
|
+
limit: z9.number().optional(),
|
|
1591
|
+
cursor: z9.string().optional()
|
|
1592
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
1593
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
1563
1594
|
});
|
|
1564
|
-
var AppEventValidator = z9.discriminatedUnion("type", [
|
|
1595
|
+
var AppEventValidator = z9.discriminatedUnion("type", [
|
|
1596
|
+
SendCredentialEventValidator,
|
|
1597
|
+
CheckCredentialEventValidator,
|
|
1598
|
+
CheckIssuanceStatusEventValidator,
|
|
1599
|
+
GetTemplateRecipientsEventValidator
|
|
1600
|
+
]);
|
|
1565
1601
|
var AppEventInputValidator = z9.object({
|
|
1566
1602
|
listingId: z9.string(),
|
|
1567
1603
|
event: AppEventValidator
|
|
@@ -1624,6 +1660,18 @@ var CredentialActivityStatsValidator = z9.object({
|
|
|
1624
1660
|
failed: z9.number(),
|
|
1625
1661
|
claimRate: z9.number()
|
|
1626
1662
|
});
|
|
1663
|
+
|
|
1664
|
+
// src/auth.ts
|
|
1665
|
+
var AuthSessionError = class extends Error {
|
|
1666
|
+
constructor(message, reason) {
|
|
1667
|
+
super(message);
|
|
1668
|
+
this.reason = reason;
|
|
1669
|
+
this.name = "AuthSessionError";
|
|
1670
|
+
}
|
|
1671
|
+
static {
|
|
1672
|
+
__name(this, "AuthSessionError");
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1627
1675
|
export {
|
|
1628
1676
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
|
1629
1677
|
AchievementCredentialValidator,
|
|
@@ -1633,6 +1681,7 @@ export {
|
|
|
1633
1681
|
AchievementValidator,
|
|
1634
1682
|
AddTagInputValidator,
|
|
1635
1683
|
AddressValidator,
|
|
1684
|
+
AgeRatingValidator,
|
|
1636
1685
|
AlignmentTargetTypeValidator,
|
|
1637
1686
|
AlignmentValidator,
|
|
1638
1687
|
AppBoostValidator,
|
|
@@ -1646,6 +1695,7 @@ export {
|
|
|
1646
1695
|
AuthGrantQueryValidator,
|
|
1647
1696
|
AuthGrantStatusValidator,
|
|
1648
1697
|
AuthGrantValidator,
|
|
1698
|
+
AuthSessionError,
|
|
1649
1699
|
AutoBoostConfigValidator,
|
|
1650
1700
|
BoostPermissionsQueryValidator,
|
|
1651
1701
|
BoostPermissionsValidator,
|
|
@@ -1653,6 +1703,8 @@ export {
|
|
|
1653
1703
|
BoostRecipientValidator,
|
|
1654
1704
|
BoostRecipientWithChildrenValidator,
|
|
1655
1705
|
BoostValidator,
|
|
1706
|
+
CheckCredentialEventValidator,
|
|
1707
|
+
CheckIssuanceStatusEventValidator,
|
|
1656
1708
|
ClaimHookQueryValidator,
|
|
1657
1709
|
ClaimHookTypeValidator,
|
|
1658
1710
|
ClaimHookValidator,
|
|
@@ -1694,6 +1746,7 @@ export {
|
|
|
1694
1746
|
CredentialActivityValidator,
|
|
1695
1747
|
CredentialActivityWithDetailsValidator,
|
|
1696
1748
|
CredentialInfoValidator,
|
|
1749
|
+
CredentialNameRefValidator,
|
|
1697
1750
|
CredentialRecordValidator,
|
|
1698
1751
|
CredentialSchemaValidator,
|
|
1699
1752
|
CredentialStatusValidator,
|
|
@@ -1715,6 +1768,7 @@ export {
|
|
|
1715
1768
|
GetFullSkillTreeResultValidator,
|
|
1716
1769
|
GetSkillPathInputValidator,
|
|
1717
1770
|
GetSkillPathResultValidator,
|
|
1771
|
+
GetTemplateRecipientsEventValidator,
|
|
1718
1772
|
IdentifierEntryValidator,
|
|
1719
1773
|
IdentifierTypeValidator,
|
|
1720
1774
|
IdentityObjectValidator,
|