@learncard/types 5.11.1 → 5.12.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/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]);
@@ -941,6 +965,7 @@ var PaginatedContractCredentialsValidator = PaginationResponseValidator.extend({
941
965
  });
942
966
  var LCNNotificationTypeEnumValidator = z9.enum([
943
967
  "CONNECTION_REQUEST",
968
+ "CONNECTION_REQUEST_EXPIRED_INVITE",
944
969
  "CONNECTION_ACCEPTED",
945
970
  "CREDENTIAL_RECEIVED",
946
971
  "CREDENTIAL_ACCEPTED",
@@ -1092,6 +1117,8 @@ var InboxCredentialValidator = z9.object({
1092
1117
  createdAt: z9.string(),
1093
1118
  issuerDid: z9.string(),
1094
1119
  webhookUrl: z9.string().optional(),
1120
+ boostUri: z9.string().optional(),
1121
+ activityId: z9.string().optional(),
1095
1122
  signingAuthority: z9.object({
1096
1123
  endpoint: z9.string().optional(),
1097
1124
  name: z9.string().optional()
@@ -1107,7 +1134,8 @@ var InboxCredentialQueryValidator = z9.object({
1107
1134
  id: z9.string(),
1108
1135
  isSigned: z9.boolean(),
1109
1136
  isAccepted: z9.boolean().optional(),
1110
- issuerDid: z9.string()
1137
+ issuerDid: z9.string(),
1138
+ boostUri: z9.string()
1111
1139
  }).partial();
1112
1140
  var IssueInboxSigningAuthorityValidator = z9.object({
1113
1141
  endpoint: z9.string().url(),
@@ -1117,9 +1145,13 @@ var IssueInboxCredentialValidator = z9.object({
1117
1145
  // === CORE DATA (Required) ===
1118
1146
  // WHAT is being sent and WHO is it for?
1119
1147
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
1120
- credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe(
1148
+ // Either credential OR templateUri must be provided
1149
+ credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).optional().describe(
1121
1150
  "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
1122
1151
  ),
1152
+ templateUri: z9.string().optional().describe(
1153
+ "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
1154
+ ),
1123
1155
  // === OPTIONAL FEATURES ===
1124
1156
  // Add major, distinct features at the top level.
1125
1157
  //consentRequest: ConsentRequestValidator.optional(),
@@ -1131,6 +1163,9 @@ var IssueInboxCredentialValidator = z9.object({
1131
1163
  ),
1132
1164
  webhookUrl: z9.string().url().optional().describe("The webhook URL to receive credential issuance events."),
1133
1165
  expiresInDays: z9.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
1166
+ templateData: z9.record(z9.string(), z9.unknown()).optional().describe(
1167
+ "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
1168
+ ),
1134
1169
  // --- For User-Facing Delivery (Email/SMS) ---
1135
1170
  delivery: z9.object({
1136
1171
  suppress: z9.boolean().optional().default(false).describe(
@@ -1145,7 +1180,9 @@ var IssueInboxCredentialValidator = z9.object({
1145
1180
  name: z9.string().optional().describe(
1146
1181
  'The name of the organization (e.g., "State University").'
1147
1182
  ),
1148
- logoUrl: z9.string().url().optional().describe("The URL of the organization's logo.")
1183
+ logoUrl: z9.string().url().optional().describe(
1184
+ "The URL of the organization's logo."
1185
+ )
1149
1186
  }).optional(),
1150
1187
  credential: z9.object({
1151
1188
  name: z9.string().optional().describe(
@@ -1172,6 +1209,9 @@ var IssueInboxCredentialValidator = z9.object({
1172
1209
  }).optional().describe(
1173
1210
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
1174
1211
  )
1212
+ }).refine((data) => data.credential || data.templateUri, {
1213
+ message: "Either credential or templateUri must be provided.",
1214
+ path: ["credential"]
1175
1215
  });
1176
1216
  var IssueInboxCredentialResponseValidator = z9.object({
1177
1217
  issuanceId: z9.string(),
@@ -1184,7 +1224,9 @@ var ClaimInboxCredentialValidator = z9.object({
1184
1224
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
1185
1225
  configuration: z9.object({
1186
1226
  publishableKey: z9.string(),
1187
- signingAuthorityName: z9.string().optional()
1227
+ signingAuthorityName: z9.string().optional(),
1228
+ listingId: z9.string().optional(),
1229
+ listingSlug: z9.string().optional()
1188
1230
  }).optional()
1189
1231
  });
1190
1232
  var LCNDomainOrOriginValidator = z9.union([
@@ -1199,28 +1241,43 @@ var LCNDomainOrOriginValidator = z9.union([
1199
1241
  { message: "Must be a valid http(s) origin" }
1200
1242
  )
1201
1243
  ]);
1244
+ var LCNIntegrationStatusEnum = z9.enum(["setup", "active", "paused"]);
1202
1245
  var LCNIntegrationValidator = z9.object({
1203
1246
  id: z9.string(),
1204
1247
  name: z9.string(),
1205
1248
  description: z9.string().optional(),
1206
1249
  publishableKey: z9.string(),
1207
- whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([])
1250
+ whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([]),
1251
+ // Setup/onboarding status
1252
+ status: LCNIntegrationStatusEnum.default("setup"),
1253
+ guideType: z9.string().optional(),
1254
+ guideState: z9.record(z9.string(), z9.any()).optional(),
1255
+ // Timestamps
1256
+ createdAt: z9.string().optional(),
1257
+ updatedAt: z9.string().optional()
1208
1258
  });
1209
1259
  var LCNIntegrationCreateValidator = z9.object({
1210
1260
  name: z9.string(),
1211
1261
  description: z9.string().optional(),
1212
- whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([])
1262
+ whitelistedDomains: z9.array(LCNDomainOrOriginValidator).default([]),
1263
+ guideType: z9.string().optional()
1213
1264
  });
1214
1265
  var LCNIntegrationUpdateValidator = z9.object({
1215
1266
  name: z9.string().optional(),
1216
1267
  description: z9.string().optional(),
1217
1268
  whitelistedDomains: z9.array(LCNDomainOrOriginValidator).optional(),
1218
- rotatePublishableKey: z9.boolean().optional()
1269
+ rotatePublishableKey: z9.boolean().optional(),
1270
+ // Setup/onboarding updates
1271
+ status: LCNIntegrationStatusEnum.optional(),
1272
+ guideType: z9.string().optional(),
1273
+ guideState: z9.record(z9.string(), z9.any()).optional()
1219
1274
  });
1220
1275
  var LCNIntegrationQueryValidator = z9.object({
1221
1276
  id: StringQuery,
1222
1277
  name: StringQuery,
1223
- description: StringQuery
1278
+ description: StringQuery,
1279
+ status: StringQuery,
1280
+ guideType: StringQuery
1224
1281
  }).partial();
1225
1282
  var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
1226
1283
  records: LCNIntegrationValidator.array()
@@ -1267,6 +1324,17 @@ var SkillQueryValidator = z9.union([
1267
1324
  }),
1268
1325
  BaseSkillQueryValidator
1269
1326
  ]);
1327
+ var SkillSemanticSearchInputValidator = z9.object({
1328
+ text: z9.string().min(1),
1329
+ frameworkId: z9.string().optional(),
1330
+ limit: z9.number().int().min(1).max(200).default(50)
1331
+ });
1332
+ var SkillSemanticSearchResultItemValidator = SkillValidator.extend({
1333
+ score: z9.number()
1334
+ });
1335
+ var SkillSemanticSearchResultValidator = z9.object({
1336
+ records: SkillSemanticSearchResultItemValidator.array()
1337
+ });
1270
1338
  var SkillFrameworkStatusEnum = z9.enum(["active", "archived"]);
1271
1339
  var SkillFrameworkValidator = z9.object({
1272
1340
  id: z9.string(),
@@ -1435,6 +1503,7 @@ var PromotionLevelValidator = z9.enum([
1435
1503
  ]);
1436
1504
  var AppStoreListingValidator = z9.object({
1437
1505
  listing_id: z9.string(),
1506
+ slug: z9.string().optional(),
1438
1507
  display_name: z9.string(),
1439
1508
  tagline: z9.string(),
1440
1509
  full_description: z9.string(),
@@ -1472,6 +1541,77 @@ var PaginatedAppStoreListingsValidator = PaginationResponseValidator.extend({
1472
1541
  var PaginatedInstalledAppsValidator = PaginationResponseValidator.extend({
1473
1542
  records: InstalledAppValidator.array()
1474
1543
  });
1544
+ var AppBoostValidator = z9.object({
1545
+ templateAlias: z9.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
1546
+ boostUri: z9.string()
1547
+ });
1548
+ var SendCredentialEventValidator = z9.object({
1549
+ type: z9.literal("send-credential"),
1550
+ templateAlias: z9.string(),
1551
+ templateData: z9.record(z9.string(), z9.unknown()).optional()
1552
+ });
1553
+ var AppEventValidator = z9.discriminatedUnion("type", [SendCredentialEventValidator]);
1554
+ var AppEventInputValidator = z9.object({
1555
+ listingId: z9.string(),
1556
+ event: AppEventValidator
1557
+ });
1558
+ var AppEventResponseValidator = z9.record(z9.string(), z9.unknown());
1559
+ var CredentialActivityEventTypeValidator = z9.enum([
1560
+ "CREATED",
1561
+ "DELIVERED",
1562
+ "CLAIMED",
1563
+ "EXPIRED",
1564
+ "FAILED"
1565
+ ]);
1566
+ var CredentialActivityRecipientTypeValidator = z9.enum(["profile", "email", "phone"]);
1567
+ var CredentialActivitySourceTypeValidator = z9.enum([
1568
+ "send",
1569
+ "sendBoost",
1570
+ "sendCredential",
1571
+ "contract",
1572
+ "claim",
1573
+ "inbox",
1574
+ "claimLink",
1575
+ "acceptCredential"
1576
+ ]);
1577
+ var CredentialActivityValidator = z9.object({
1578
+ id: z9.string(),
1579
+ activityId: z9.string(),
1580
+ eventType: CredentialActivityEventTypeValidator,
1581
+ timestamp: z9.string(),
1582
+ actorProfileId: z9.string(),
1583
+ recipientType: CredentialActivityRecipientTypeValidator,
1584
+ recipientIdentifier: z9.string(),
1585
+ boostUri: z9.string().optional(),
1586
+ credentialUri: z9.string().optional(),
1587
+ inboxCredentialId: z9.string().optional(),
1588
+ integrationId: z9.string().optional(),
1589
+ source: CredentialActivitySourceTypeValidator,
1590
+ metadata: z9.record(z9.string(), z9.unknown()).optional()
1591
+ });
1592
+ var CredentialActivityWithDetailsValidator = CredentialActivityValidator.extend({
1593
+ boost: z9.object({
1594
+ id: z9.string(),
1595
+ name: z9.string().optional(),
1596
+ category: z9.string().optional()
1597
+ }).optional(),
1598
+ recipientProfile: z9.object({
1599
+ profileId: z9.string(),
1600
+ displayName: z9.string().optional()
1601
+ }).optional()
1602
+ });
1603
+ var PaginatedCredentialActivitiesValidator = PaginationResponseValidator.extend({
1604
+ records: CredentialActivityWithDetailsValidator.array()
1605
+ });
1606
+ var CredentialActivityStatsValidator = z9.object({
1607
+ total: z9.number(),
1608
+ created: z9.number(),
1609
+ delivered: z9.number(),
1610
+ claimed: z9.number(),
1611
+ expired: z9.number(),
1612
+ failed: z9.number(),
1613
+ claimRate: z9.number()
1614
+ });
1475
1615
  export {
1476
1616
  AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
1477
1617
  AchievementCredentialValidator,
@@ -1483,6 +1623,10 @@ export {
1483
1623
  AddressValidator,
1484
1624
  AlignmentTargetTypeValidator,
1485
1625
  AlignmentValidator,
1626
+ AppBoostValidator,
1627
+ AppEventInputValidator,
1628
+ AppEventResponseValidator,
1629
+ AppEventValidator,
1486
1630
  AppListingStatusValidator,
1487
1631
  AppStoreListingCreateValidator,
1488
1632
  AppStoreListingUpdateValidator,
@@ -1531,6 +1675,12 @@ export {
1531
1675
  CreateManagedFrameworkInputValidator,
1532
1676
  CreateSkillInputValidator,
1533
1677
  CreateSkillsBatchInputValidator,
1678
+ CredentialActivityEventTypeValidator,
1679
+ CredentialActivityRecipientTypeValidator,
1680
+ CredentialActivitySourceTypeValidator,
1681
+ CredentialActivityStatsValidator,
1682
+ CredentialActivityValidator,
1683
+ CredentialActivityWithDetailsValidator,
1534
1684
  CredentialInfoValidator,
1535
1685
  CredentialRecordValidator,
1536
1686
  CredentialSchemaValidator,
@@ -1577,6 +1727,7 @@ export {
1577
1727
  LCNInboxStatusEnumValidator,
1578
1728
  LCNIntegrationCreateValidator,
1579
1729
  LCNIntegrationQueryValidator,
1730
+ LCNIntegrationStatusEnum,
1580
1731
  LCNIntegrationUpdateValidator,
1581
1732
  LCNIntegrationValidator,
1582
1733
  LCNNotificationDataValidator,
@@ -1605,6 +1756,7 @@ export {
1605
1756
  PaginatedConsentFlowTermsValidator,
1606
1757
  PaginatedConsentFlowTransactionsValidator,
1607
1758
  PaginatedContractCredentialsValidator,
1759
+ PaginatedCredentialActivitiesValidator,
1608
1760
  PaginatedEncryptedCredentialRecordsValidator,
1609
1761
  PaginatedEncryptedRecordsValidator,
1610
1762
  PaginatedInboxCredentialsValidator,
@@ -1632,7 +1784,11 @@ export {
1632
1784
  RubricCriterionValidator,
1633
1785
  SendBoostInputValidator,
1634
1786
  SendBoostResponseValidator,
1787
+ SendBrandingOptionsValidator,
1788
+ SendCredentialEventValidator,
1789
+ SendInboxResponseValidator,
1635
1790
  SendInputValidator,
1791
+ SendOptionsValidator,
1636
1792
  SendResponseValidator,
1637
1793
  SentCredentialInfoValidator,
1638
1794
  ServiceValidator,
@@ -1645,6 +1801,9 @@ export {
1645
1801
  SkillFrameworkStatusEnum,
1646
1802
  SkillFrameworkValidator,
1647
1803
  SkillQueryValidator,
1804
+ SkillSemanticSearchInputValidator,
1805
+ SkillSemanticSearchResultItemValidator,
1806
+ SkillSemanticSearchResultValidator,
1648
1807
  SkillStatusEnum,
1649
1808
  SkillTreeNodeInputValidator,
1650
1809
  SkillTreeNodeValidator,