@learncard/types 5.12.3 → 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 +66 -2
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +54 -4
- 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 +54 -4
- 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(),
|
|
@@ -1562,9 +1565,39 @@ var AppBoostValidator = z9.object({
|
|
|
1562
1565
|
var SendCredentialEventValidator = z9.object({
|
|
1563
1566
|
type: z9.literal("send-credential"),
|
|
1564
1567
|
templateAlias: z9.string(),
|
|
1565
|
-
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"
|
|
1566
1594
|
});
|
|
1567
|
-
var AppEventValidator = z9.discriminatedUnion("type", [
|
|
1595
|
+
var AppEventValidator = z9.discriminatedUnion("type", [
|
|
1596
|
+
SendCredentialEventValidator,
|
|
1597
|
+
CheckCredentialEventValidator,
|
|
1598
|
+
CheckIssuanceStatusEventValidator,
|
|
1599
|
+
GetTemplateRecipientsEventValidator
|
|
1600
|
+
]);
|
|
1568
1601
|
var AppEventInputValidator = z9.object({
|
|
1569
1602
|
listingId: z9.string(),
|
|
1570
1603
|
event: AppEventValidator
|
|
@@ -1627,6 +1660,18 @@ var CredentialActivityStatsValidator = z9.object({
|
|
|
1627
1660
|
failed: z9.number(),
|
|
1628
1661
|
claimRate: z9.number()
|
|
1629
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
|
+
};
|
|
1630
1675
|
export {
|
|
1631
1676
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
|
1632
1677
|
AchievementCredentialValidator,
|
|
@@ -1650,6 +1695,7 @@ export {
|
|
|
1650
1695
|
AuthGrantQueryValidator,
|
|
1651
1696
|
AuthGrantStatusValidator,
|
|
1652
1697
|
AuthGrantValidator,
|
|
1698
|
+
AuthSessionError,
|
|
1653
1699
|
AutoBoostConfigValidator,
|
|
1654
1700
|
BoostPermissionsQueryValidator,
|
|
1655
1701
|
BoostPermissionsValidator,
|
|
@@ -1657,6 +1703,8 @@ export {
|
|
|
1657
1703
|
BoostRecipientValidator,
|
|
1658
1704
|
BoostRecipientWithChildrenValidator,
|
|
1659
1705
|
BoostValidator,
|
|
1706
|
+
CheckCredentialEventValidator,
|
|
1707
|
+
CheckIssuanceStatusEventValidator,
|
|
1660
1708
|
ClaimHookQueryValidator,
|
|
1661
1709
|
ClaimHookTypeValidator,
|
|
1662
1710
|
ClaimHookValidator,
|
|
@@ -1698,6 +1746,7 @@ export {
|
|
|
1698
1746
|
CredentialActivityValidator,
|
|
1699
1747
|
CredentialActivityWithDetailsValidator,
|
|
1700
1748
|
CredentialInfoValidator,
|
|
1749
|
+
CredentialNameRefValidator,
|
|
1701
1750
|
CredentialRecordValidator,
|
|
1702
1751
|
CredentialSchemaValidator,
|
|
1703
1752
|
CredentialStatusValidator,
|
|
@@ -1719,6 +1768,7 @@ export {
|
|
|
1719
1768
|
GetFullSkillTreeResultValidator,
|
|
1720
1769
|
GetSkillPathInputValidator,
|
|
1721
1770
|
GetSkillPathResultValidator,
|
|
1771
|
+
GetTemplateRecipientsEventValidator,
|
|
1722
1772
|
IdentifierEntryValidator,
|
|
1723
1773
|
IdentifierTypeValidator,
|
|
1724
1774
|
IdentityObjectValidator,
|