@learncard/types 5.11.1 → 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/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,22 +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
745
  signedCredential: VCValidator.optional(),
735
- templateData: z9.record(z9.string(), z9.unknown()).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")
736
751
  }).refine((data) => data.templateUri || data.template, {
737
752
  message: "Either templateUri or template creation data must be provided.",
738
753
  path: ["templateUri"]
739
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
+ });
740
760
  var SendBoostResponseValidator = z9.object({
741
761
  type: z9.literal("boost"),
742
762
  credentialUri: z9.string(),
743
- 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
+ )
744
768
  });
745
769
  var SendInputValidator = z9.discriminatedUnion("type", [SendBoostInputValidator]);
746
770
  var SendResponseValidator = z9.discriminatedUnion("type", [SendBoostResponseValidator]);
@@ -1092,6 +1116,8 @@ var InboxCredentialValidator = z9.object({
1092
1116
  createdAt: z9.string(),
1093
1117
  issuerDid: z9.string(),
1094
1118
  webhookUrl: z9.string().optional(),
1119
+ boostUri: z9.string().optional(),
1120
+ activityId: z9.string().optional(),
1095
1121
  signingAuthority: z9.object({
1096
1122
  endpoint: z9.string().optional(),
1097
1123
  name: z9.string().optional()
@@ -1107,7 +1133,8 @@ var InboxCredentialQueryValidator = z9.object({
1107
1133
  id: z9.string(),
1108
1134
  isSigned: z9.boolean(),
1109
1135
  isAccepted: z9.boolean().optional(),
1110
- issuerDid: z9.string()
1136
+ issuerDid: z9.string(),
1137
+ boostUri: z9.string()
1111
1138
  }).partial();
1112
1139
  var IssueInboxSigningAuthorityValidator = z9.object({
1113
1140
  endpoint: z9.string().url(),
@@ -1117,9 +1144,13 @@ var IssueInboxCredentialValidator = z9.object({
1117
1144
  // === CORE DATA (Required) ===
1118
1145
  // WHAT is being sent and WHO is it for?
1119
1146
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
1120
- credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe(
1147
+ // Either credential OR templateUri must be provided
1148
+ credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).optional().describe(
1121
1149
  "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
1122
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
+ ),
1123
1154
  // === OPTIONAL FEATURES ===
1124
1155
  // Add major, distinct features at the top level.
1125
1156
  //consentRequest: ConsentRequestValidator.optional(),
@@ -1131,6 +1162,9 @@ var IssueInboxCredentialValidator = z9.object({
1131
1162
  ),
1132
1163
  webhookUrl: z9.string().url().optional().describe("The webhook URL to receive credential issuance events."),
1133
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
+ ),
1134
1168
  // --- For User-Facing Delivery (Email/SMS) ---
1135
1169
  delivery: z9.object({
1136
1170
  suppress: z9.boolean().optional().default(false).describe(
@@ -1145,7 +1179,9 @@ var IssueInboxCredentialValidator = z9.object({
1145
1179
  name: z9.string().optional().describe(
1146
1180
  'The name of the organization (e.g., "State University").'
1147
1181
  ),
1148
- logoUrl: z9.string().url().optional().describe("The URL of the organization's logo.")
1182
+ logoUrl: z9.string().url().optional().describe(
1183
+ "The URL of the organization's logo."
1184
+ )
1149
1185
  }).optional(),
1150
1186
  credential: z9.object({
1151
1187
  name: z9.string().optional().describe(
@@ -1172,6 +1208,9 @@ var IssueInboxCredentialValidator = z9.object({
1172
1208
  }).optional().describe(
1173
1209
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
1174
1210
  )
1211
+ }).refine((data) => data.credential || data.templateUri, {
1212
+ message: "Either credential or templateUri must be provided.",
1213
+ path: ["credential"]
1175
1214
  });
1176
1215
  var IssueInboxCredentialResponseValidator = z9.object({
1177
1216
  issuanceId: z9.string(),
@@ -1199,28 +1238,43 @@ var LCNDomainOrOriginValidator = z9.union([
1199
1238
  { message: "Must be a valid http(s) origin" }
1200
1239
  )
1201
1240
  ]);
1241
+ var LCNIntegrationStatusEnum = z9.enum(["setup", "active", "paused"]);
1202
1242
  var LCNIntegrationValidator = z9.object({
1203
1243
  id: z9.string(),
1204
1244
  name: z9.string(),
1205
1245
  description: z9.string().optional(),
1206
1246
  publishableKey: z9.string(),
1207
- 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()
1208
1255
  });
1209
1256
  var LCNIntegrationCreateValidator = z9.object({
1210
1257
  name: z9.string(),
1211
1258
  description: z9.string().optional(),
1212
- whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([])
1259
+ whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([]),
1260
+ guideType: z9.string().optional()
1213
1261
  });
1214
1262
  var LCNIntegrationUpdateValidator = z9.object({
1215
1263
  name: z9.string().optional(),
1216
1264
  description: z9.string().optional(),
1217
1265
  whitelistedDomains: z9.array(LCNDomainOrOriginValidator).optional(),
1218
- 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()
1219
1271
  });
1220
1272
  var LCNIntegrationQueryValidator = z9.object({
1221
1273
  id: StringQuery,
1222
1274
  name: StringQuery,
1223
- description: StringQuery
1275
+ description: StringQuery,
1276
+ status: StringQuery,
1277
+ guideType: StringQuery
1224
1278
  }).partial();
1225
1279
  var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
1226
1280
  records: LCNIntegrationValidator.array()
@@ -1435,6 +1489,7 @@ var PromotionLevelValidator = z9.enum([
1435
1489
  ]);
1436
1490
  var AppStoreListingValidator = z9.object({
1437
1491
  listing_id: z9.string(),
1492
+ slug: z9.string().optional(),
1438
1493
  display_name: z9.string(),
1439
1494
  tagline: z9.string(),
1440
1495
  full_description: z9.string(),
@@ -1472,6 +1527,77 @@ var PaginatedAppStoreListingsValidator = PaginationResponseValidator.extend({
1472
1527
  var PaginatedInstalledAppsValidator = PaginationResponseValidator.extend({
1473
1528
  records: InstalledAppValidator.array()
1474
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
+ });
1475
1601
  export {
1476
1602
  AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
1477
1603
  AchievementCredentialValidator,
@@ -1483,6 +1609,10 @@ export {
1483
1609
  AddressValidator,
1484
1610
  AlignmentTargetTypeValidator,
1485
1611
  AlignmentValidator,
1612
+ AppBoostValidator,
1613
+ AppEventInputValidator,
1614
+ AppEventResponseValidator,
1615
+ AppEventValidator,
1486
1616
  AppListingStatusValidator,
1487
1617
  AppStoreListingCreateValidator,
1488
1618
  AppStoreListingUpdateValidator,
@@ -1531,6 +1661,12 @@ export {
1531
1661
  CreateManagedFrameworkInputValidator,
1532
1662
  CreateSkillInputValidator,
1533
1663
  CreateSkillsBatchInputValidator,
1664
+ CredentialActivityEventTypeValidator,
1665
+ CredentialActivityRecipientTypeValidator,
1666
+ CredentialActivitySourceTypeValidator,
1667
+ CredentialActivityStatsValidator,
1668
+ CredentialActivityValidator,
1669
+ CredentialActivityWithDetailsValidator,
1534
1670
  CredentialInfoValidator,
1535
1671
  CredentialRecordValidator,
1536
1672
  CredentialSchemaValidator,
@@ -1577,6 +1713,7 @@ export {
1577
1713
  LCNInboxStatusEnumValidator,
1578
1714
  LCNIntegrationCreateValidator,
1579
1715
  LCNIntegrationQueryValidator,
1716
+ LCNIntegrationStatusEnum,
1580
1717
  LCNIntegrationUpdateValidator,
1581
1718
  LCNIntegrationValidator,
1582
1719
  LCNNotificationDataValidator,
@@ -1605,6 +1742,7 @@ export {
1605
1742
  PaginatedConsentFlowTermsValidator,
1606
1743
  PaginatedConsentFlowTransactionsValidator,
1607
1744
  PaginatedContractCredentialsValidator,
1745
+ PaginatedCredentialActivitiesValidator,
1608
1746
  PaginatedEncryptedCredentialRecordsValidator,
1609
1747
  PaginatedEncryptedRecordsValidator,
1610
1748
  PaginatedInboxCredentialsValidator,
@@ -1632,7 +1770,11 @@ export {
1632
1770
  RubricCriterionValidator,
1633
1771
  SendBoostInputValidator,
1634
1772
  SendBoostResponseValidator,
1773
+ SendBrandingOptionsValidator,
1774
+ SendCredentialEventValidator,
1775
+ SendInboxResponseValidator,
1635
1776
  SendInputValidator,
1777
+ SendOptionsValidator,
1636
1778
  SendResponseValidator,
1637
1779
  SentCredentialInfoValidator,
1638
1780
  ServiceValidator,