@learncard/types 5.11.0 → 5.11.3
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/lcn.d.ts +361 -2
- package/dist/lcn.d.ts.map +1 -1
- package/dist/types.cjs.development.js +154 -11
- package/dist/types.cjs.development.js.map +2 -2
- package/dist/types.cjs.production.min.js +6 -6
- package/dist/types.cjs.production.min.js.map +3 -3
- package/dist/types.esm.js +154 -11
- package/dist/types.esm.js.map +2 -2
- package/package.json +1 -1
package/dist/types.esm.js
CHANGED
|
@@ -641,7 +641,7 @@ var FullClaimHookValidator = z9.object({ id: z9.string(), createdAt: z9.string()
|
|
|
641
641
|
var PaginatedClaimHooksValidator = PaginationResponseValidator.extend({
|
|
642
642
|
records: FullClaimHookValidator.array()
|
|
643
643
|
});
|
|
644
|
-
var LCNBoostStatus = z9.enum(["DRAFT", "LIVE"]);
|
|
644
|
+
var LCNBoostStatus = z9.enum(["DRAFT", "PROVISIONAL", "LIVE"]);
|
|
645
645
|
var BoostValidator = z9.object({
|
|
646
646
|
uri: z9.string(),
|
|
647
647
|
name: z9.string().optional(),
|
|
@@ -725,21 +725,46 @@ var SendBoostTemplateValidator = BoostValidator.partial().omit({ uri: true, clai
|
|
|
725
725
|
claimPermissions: BoostPermissionsValidator.partial().optional(),
|
|
726
726
|
skills: z9.array(z9.object({ frameworkId: z9.string(), id: z9.string() })).min(1).optional()
|
|
727
727
|
});
|
|
728
|
+
var SendBrandingOptionsValidator = z9.object({
|
|
729
|
+
issuerName: z9.string().optional().describe("Name of the issuing organization"),
|
|
730
|
+
issuerLogoUrl: z9.string().url().optional().describe("Logo URL of the issuing organization"),
|
|
731
|
+
credentialName: z9.string().optional().describe("Display name for the credential"),
|
|
732
|
+
recipientName: z9.string().optional().describe("Name of the recipient for personalization")
|
|
733
|
+
});
|
|
734
|
+
var SendOptionsValidator = z9.object({
|
|
735
|
+
webhookUrl: z9.string().url().optional().describe("Webhook URL to receive claim notifications"),
|
|
736
|
+
suppressDelivery: z9.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
|
|
737
|
+
branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery")
|
|
738
|
+
});
|
|
728
739
|
var SendBoostInputValidator = z9.object({
|
|
729
740
|
type: z9.literal("boost"),
|
|
730
|
-
recipient: z9.string(),
|
|
741
|
+
recipient: z9.string().describe("Profile ID, DID, email, or phone number (auto-detected)"),
|
|
731
742
|
contractUri: z9.string().optional(),
|
|
732
743
|
templateUri: z9.string().optional(),
|
|
733
744
|
template: SendBoostTemplateValidator.optional(),
|
|
734
|
-
signedCredential: VCValidator.optional()
|
|
745
|
+
signedCredential: VCValidator.optional(),
|
|
746
|
+
options: SendOptionsValidator.optional().describe(
|
|
747
|
+
"Options for email/phone recipients (Universal Inbox)"
|
|
748
|
+
),
|
|
749
|
+
templateData: z9.record(z9.string(), z9.unknown()).optional(),
|
|
750
|
+
integrationId: z9.string().optional().describe("Integration ID for activity tracking")
|
|
735
751
|
}).refine((data) => data.templateUri || data.template, {
|
|
736
752
|
message: "Either templateUri or template creation data must be provided.",
|
|
737
753
|
path: ["templateUri"]
|
|
738
754
|
});
|
|
755
|
+
var SendInboxResponseValidator = z9.object({
|
|
756
|
+
issuanceId: z9.string(),
|
|
757
|
+
status: z9.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
758
|
+
claimUrl: z9.string().url().optional().describe("Present when suppressDelivery=true")
|
|
759
|
+
});
|
|
739
760
|
var SendBoostResponseValidator = z9.object({
|
|
740
761
|
type: z9.literal("boost"),
|
|
741
762
|
credentialUri: z9.string(),
|
|
742
|
-
uri: z9.string()
|
|
763
|
+
uri: z9.string(),
|
|
764
|
+
activityId: z9.string().describe("Links to the activity lifecycle for this issuance"),
|
|
765
|
+
inbox: SendInboxResponseValidator.optional().describe(
|
|
766
|
+
"Present when sent via email/phone (Universal Inbox)"
|
|
767
|
+
)
|
|
743
768
|
});
|
|
744
769
|
var SendInputValidator = z9.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
745
770
|
var SendResponseValidator = z9.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
@@ -1091,6 +1116,8 @@ var InboxCredentialValidator = z9.object({
|
|
|
1091
1116
|
createdAt: z9.string(),
|
|
1092
1117
|
issuerDid: z9.string(),
|
|
1093
1118
|
webhookUrl: z9.string().optional(),
|
|
1119
|
+
boostUri: z9.string().optional(),
|
|
1120
|
+
activityId: z9.string().optional(),
|
|
1094
1121
|
signingAuthority: z9.object({
|
|
1095
1122
|
endpoint: z9.string().optional(),
|
|
1096
1123
|
name: z9.string().optional()
|
|
@@ -1106,7 +1133,8 @@ var InboxCredentialQueryValidator = z9.object({
|
|
|
1106
1133
|
id: z9.string(),
|
|
1107
1134
|
isSigned: z9.boolean(),
|
|
1108
1135
|
isAccepted: z9.boolean().optional(),
|
|
1109
|
-
issuerDid: z9.string()
|
|
1136
|
+
issuerDid: z9.string(),
|
|
1137
|
+
boostUri: z9.string()
|
|
1110
1138
|
}).partial();
|
|
1111
1139
|
var IssueInboxSigningAuthorityValidator = z9.object({
|
|
1112
1140
|
endpoint: z9.string().url(),
|
|
@@ -1116,9 +1144,13 @@ var IssueInboxCredentialValidator = z9.object({
|
|
|
1116
1144
|
// === CORE DATA (Required) ===
|
|
1117
1145
|
// WHAT is being sent and WHO is it for?
|
|
1118
1146
|
recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
|
|
1119
|
-
credential
|
|
1147
|
+
// Either credential OR templateUri must be provided
|
|
1148
|
+
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).optional().describe(
|
|
1120
1149
|
"The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
|
|
1121
1150
|
),
|
|
1151
|
+
templateUri: z9.string().optional().describe(
|
|
1152
|
+
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
1153
|
+
),
|
|
1122
1154
|
// === OPTIONAL FEATURES ===
|
|
1123
1155
|
// Add major, distinct features at the top level.
|
|
1124
1156
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
@@ -1130,6 +1162,9 @@ var IssueInboxCredentialValidator = z9.object({
|
|
|
1130
1162
|
),
|
|
1131
1163
|
webhookUrl: z9.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
1132
1164
|
expiresInDays: z9.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
|
|
1165
|
+
templateData: z9.record(z9.string(), z9.unknown()).optional().describe(
|
|
1166
|
+
"Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
|
|
1167
|
+
),
|
|
1133
1168
|
// --- For User-Facing Delivery (Email/SMS) ---
|
|
1134
1169
|
delivery: z9.object({
|
|
1135
1170
|
suppress: z9.boolean().optional().default(false).describe(
|
|
@@ -1144,7 +1179,9 @@ var IssueInboxCredentialValidator = z9.object({
|
|
|
1144
1179
|
name: z9.string().optional().describe(
|
|
1145
1180
|
'The name of the organization (e.g., "State University").'
|
|
1146
1181
|
),
|
|
1147
|
-
logoUrl: z9.string().url().optional().describe(
|
|
1182
|
+
logoUrl: z9.string().url().optional().describe(
|
|
1183
|
+
"The URL of the organization's logo."
|
|
1184
|
+
)
|
|
1148
1185
|
}).optional(),
|
|
1149
1186
|
credential: z9.object({
|
|
1150
1187
|
name: z9.string().optional().describe(
|
|
@@ -1171,6 +1208,9 @@ var IssueInboxCredentialValidator = z9.object({
|
|
|
1171
1208
|
}).optional().describe(
|
|
1172
1209
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
1173
1210
|
)
|
|
1211
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
1212
|
+
message: "Either credential or templateUri must be provided.",
|
|
1213
|
+
path: ["credential"]
|
|
1174
1214
|
});
|
|
1175
1215
|
var IssueInboxCredentialResponseValidator = z9.object({
|
|
1176
1216
|
issuanceId: z9.string(),
|
|
@@ -1198,28 +1238,43 @@ var LCNDomainOrOriginValidator = z9.union([
|
|
|
1198
1238
|
{ message: "Must be a valid http(s) origin" }
|
|
1199
1239
|
)
|
|
1200
1240
|
]);
|
|
1241
|
+
var LCNIntegrationStatusEnum = z9.enum(["setup", "active", "paused"]);
|
|
1201
1242
|
var LCNIntegrationValidator = z9.object({
|
|
1202
1243
|
id: z9.string(),
|
|
1203
1244
|
name: z9.string(),
|
|
1204
1245
|
description: z9.string().optional(),
|
|
1205
1246
|
publishableKey: z9.string(),
|
|
1206
|
-
whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([])
|
|
1247
|
+
whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([]),
|
|
1248
|
+
// Setup/onboarding status
|
|
1249
|
+
status: LCNIntegrationStatusEnum.default("setup"),
|
|
1250
|
+
guideType: z9.string().optional(),
|
|
1251
|
+
guideState: z9.record(z9.string(), z9.any()).optional(),
|
|
1252
|
+
// Timestamps
|
|
1253
|
+
createdAt: z9.string().optional(),
|
|
1254
|
+
updatedAt: z9.string().optional()
|
|
1207
1255
|
});
|
|
1208
1256
|
var LCNIntegrationCreateValidator = z9.object({
|
|
1209
1257
|
name: z9.string(),
|
|
1210
1258
|
description: z9.string().optional(),
|
|
1211
|
-
whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([])
|
|
1259
|
+
whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([]),
|
|
1260
|
+
guideType: z9.string().optional()
|
|
1212
1261
|
});
|
|
1213
1262
|
var LCNIntegrationUpdateValidator = z9.object({
|
|
1214
1263
|
name: z9.string().optional(),
|
|
1215
1264
|
description: z9.string().optional(),
|
|
1216
1265
|
whitelistedDomains: z9.array(LCNDomainOrOriginValidator).optional(),
|
|
1217
|
-
rotatePublishableKey: z9.boolean().optional()
|
|
1266
|
+
rotatePublishableKey: z9.boolean().optional(),
|
|
1267
|
+
// Setup/onboarding updates
|
|
1268
|
+
status: LCNIntegrationStatusEnum.optional(),
|
|
1269
|
+
guideType: z9.string().optional(),
|
|
1270
|
+
guideState: z9.record(z9.string(), z9.any()).optional()
|
|
1218
1271
|
});
|
|
1219
1272
|
var LCNIntegrationQueryValidator = z9.object({
|
|
1220
1273
|
id: StringQuery,
|
|
1221
1274
|
name: StringQuery,
|
|
1222
|
-
description: StringQuery
|
|
1275
|
+
description: StringQuery,
|
|
1276
|
+
status: StringQuery,
|
|
1277
|
+
guideType: StringQuery
|
|
1223
1278
|
}).partial();
|
|
1224
1279
|
var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
|
|
1225
1280
|
records: LCNIntegrationValidator.array()
|
|
@@ -1434,6 +1489,7 @@ var PromotionLevelValidator = z9.enum([
|
|
|
1434
1489
|
]);
|
|
1435
1490
|
var AppStoreListingValidator = z9.object({
|
|
1436
1491
|
listing_id: z9.string(),
|
|
1492
|
+
slug: z9.string().optional(),
|
|
1437
1493
|
display_name: z9.string(),
|
|
1438
1494
|
tagline: z9.string(),
|
|
1439
1495
|
full_description: z9.string(),
|
|
@@ -1471,6 +1527,77 @@ var PaginatedAppStoreListingsValidator = PaginationResponseValidator.extend({
|
|
|
1471
1527
|
var PaginatedInstalledAppsValidator = PaginationResponseValidator.extend({
|
|
1472
1528
|
records: InstalledAppValidator.array()
|
|
1473
1529
|
});
|
|
1530
|
+
var AppBoostValidator = z9.object({
|
|
1531
|
+
templateAlias: z9.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
|
|
1532
|
+
boostUri: z9.string()
|
|
1533
|
+
});
|
|
1534
|
+
var SendCredentialEventValidator = z9.object({
|
|
1535
|
+
type: z9.literal("send-credential"),
|
|
1536
|
+
templateAlias: z9.string(),
|
|
1537
|
+
templateData: z9.record(z9.string(), z9.unknown()).optional()
|
|
1538
|
+
});
|
|
1539
|
+
var AppEventValidator = z9.discriminatedUnion("type", [SendCredentialEventValidator]);
|
|
1540
|
+
var AppEventInputValidator = z9.object({
|
|
1541
|
+
listingId: z9.string(),
|
|
1542
|
+
event: AppEventValidator
|
|
1543
|
+
});
|
|
1544
|
+
var AppEventResponseValidator = z9.record(z9.string(), z9.unknown());
|
|
1545
|
+
var CredentialActivityEventTypeValidator = z9.enum([
|
|
1546
|
+
"CREATED",
|
|
1547
|
+
"DELIVERED",
|
|
1548
|
+
"CLAIMED",
|
|
1549
|
+
"EXPIRED",
|
|
1550
|
+
"FAILED"
|
|
1551
|
+
]);
|
|
1552
|
+
var CredentialActivityRecipientTypeValidator = z9.enum(["profile", "email", "phone"]);
|
|
1553
|
+
var CredentialActivitySourceTypeValidator = z9.enum([
|
|
1554
|
+
"send",
|
|
1555
|
+
"sendBoost",
|
|
1556
|
+
"sendCredential",
|
|
1557
|
+
"contract",
|
|
1558
|
+
"claim",
|
|
1559
|
+
"inbox",
|
|
1560
|
+
"claimLink",
|
|
1561
|
+
"acceptCredential"
|
|
1562
|
+
]);
|
|
1563
|
+
var CredentialActivityValidator = z9.object({
|
|
1564
|
+
id: z9.string(),
|
|
1565
|
+
activityId: z9.string(),
|
|
1566
|
+
eventType: CredentialActivityEventTypeValidator,
|
|
1567
|
+
timestamp: z9.string(),
|
|
1568
|
+
actorProfileId: z9.string(),
|
|
1569
|
+
recipientType: CredentialActivityRecipientTypeValidator,
|
|
1570
|
+
recipientIdentifier: z9.string(),
|
|
1571
|
+
boostUri: z9.string().optional(),
|
|
1572
|
+
credentialUri: z9.string().optional(),
|
|
1573
|
+
inboxCredentialId: z9.string().optional(),
|
|
1574
|
+
integrationId: z9.string().optional(),
|
|
1575
|
+
source: CredentialActivitySourceTypeValidator,
|
|
1576
|
+
metadata: z9.record(z9.string(), z9.unknown()).optional()
|
|
1577
|
+
});
|
|
1578
|
+
var CredentialActivityWithDetailsValidator = CredentialActivityValidator.extend({
|
|
1579
|
+
boost: z9.object({
|
|
1580
|
+
id: z9.string(),
|
|
1581
|
+
name: z9.string().optional(),
|
|
1582
|
+
category: z9.string().optional()
|
|
1583
|
+
}).optional(),
|
|
1584
|
+
recipientProfile: z9.object({
|
|
1585
|
+
profileId: z9.string(),
|
|
1586
|
+
displayName: z9.string().optional()
|
|
1587
|
+
}).optional()
|
|
1588
|
+
});
|
|
1589
|
+
var PaginatedCredentialActivitiesValidator = PaginationResponseValidator.extend({
|
|
1590
|
+
records: CredentialActivityWithDetailsValidator.array()
|
|
1591
|
+
});
|
|
1592
|
+
var CredentialActivityStatsValidator = z9.object({
|
|
1593
|
+
total: z9.number(),
|
|
1594
|
+
created: z9.number(),
|
|
1595
|
+
delivered: z9.number(),
|
|
1596
|
+
claimed: z9.number(),
|
|
1597
|
+
expired: z9.number(),
|
|
1598
|
+
failed: z9.number(),
|
|
1599
|
+
claimRate: z9.number()
|
|
1600
|
+
});
|
|
1474
1601
|
export {
|
|
1475
1602
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
|
1476
1603
|
AchievementCredentialValidator,
|
|
@@ -1482,6 +1609,10 @@ export {
|
|
|
1482
1609
|
AddressValidator,
|
|
1483
1610
|
AlignmentTargetTypeValidator,
|
|
1484
1611
|
AlignmentValidator,
|
|
1612
|
+
AppBoostValidator,
|
|
1613
|
+
AppEventInputValidator,
|
|
1614
|
+
AppEventResponseValidator,
|
|
1615
|
+
AppEventValidator,
|
|
1485
1616
|
AppListingStatusValidator,
|
|
1486
1617
|
AppStoreListingCreateValidator,
|
|
1487
1618
|
AppStoreListingUpdateValidator,
|
|
@@ -1530,6 +1661,12 @@ export {
|
|
|
1530
1661
|
CreateManagedFrameworkInputValidator,
|
|
1531
1662
|
CreateSkillInputValidator,
|
|
1532
1663
|
CreateSkillsBatchInputValidator,
|
|
1664
|
+
CredentialActivityEventTypeValidator,
|
|
1665
|
+
CredentialActivityRecipientTypeValidator,
|
|
1666
|
+
CredentialActivitySourceTypeValidator,
|
|
1667
|
+
CredentialActivityStatsValidator,
|
|
1668
|
+
CredentialActivityValidator,
|
|
1669
|
+
CredentialActivityWithDetailsValidator,
|
|
1533
1670
|
CredentialInfoValidator,
|
|
1534
1671
|
CredentialRecordValidator,
|
|
1535
1672
|
CredentialSchemaValidator,
|
|
@@ -1576,6 +1713,7 @@ export {
|
|
|
1576
1713
|
LCNInboxStatusEnumValidator,
|
|
1577
1714
|
LCNIntegrationCreateValidator,
|
|
1578
1715
|
LCNIntegrationQueryValidator,
|
|
1716
|
+
LCNIntegrationStatusEnum,
|
|
1579
1717
|
LCNIntegrationUpdateValidator,
|
|
1580
1718
|
LCNIntegrationValidator,
|
|
1581
1719
|
LCNNotificationDataValidator,
|
|
@@ -1604,6 +1742,7 @@ export {
|
|
|
1604
1742
|
PaginatedConsentFlowTermsValidator,
|
|
1605
1743
|
PaginatedConsentFlowTransactionsValidator,
|
|
1606
1744
|
PaginatedContractCredentialsValidator,
|
|
1745
|
+
PaginatedCredentialActivitiesValidator,
|
|
1607
1746
|
PaginatedEncryptedCredentialRecordsValidator,
|
|
1608
1747
|
PaginatedEncryptedRecordsValidator,
|
|
1609
1748
|
PaginatedInboxCredentialsValidator,
|
|
@@ -1631,7 +1770,11 @@ export {
|
|
|
1631
1770
|
RubricCriterionValidator,
|
|
1632
1771
|
SendBoostInputValidator,
|
|
1633
1772
|
SendBoostResponseValidator,
|
|
1773
|
+
SendBrandingOptionsValidator,
|
|
1774
|
+
SendCredentialEventValidator,
|
|
1775
|
+
SendInboxResponseValidator,
|
|
1634
1776
|
SendInputValidator,
|
|
1777
|
+
SendOptionsValidator,
|
|
1635
1778
|
SendResponseValidator,
|
|
1636
1779
|
SentCredentialInfoValidator,
|
|
1637
1780
|
ServiceValidator,
|