@learncard/idx-plugin 1.0.40 → 1.0.42

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.
@@ -12047,7 +12047,7 @@ var LCNProfileValidator = z.object({
12047
12047
  bio: z.string().default("").describe("Longer bio for the profile."),
12048
12048
  did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
12049
12049
  isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
12050
- email: z.string().optional().describe("Contact email address for the profile."),
12050
+ email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
12051
12051
  image: z.string().optional().describe("Profile image URL for the profile."),
12052
12052
  heroImage: z.string().optional().describe("Hero image URL for the profile."),
12053
12053
  websiteLink: z.string().optional().describe("Website link for the profile."),
@@ -12174,7 +12174,8 @@ var BoostValidator = z.object({
12174
12174
  status: LCNBoostStatus.optional(),
12175
12175
  autoConnectRecipients: z.boolean().optional(),
12176
12176
  meta: z.record(z.any()).optional(),
12177
- claimPermissions: BoostPermissionsValidator.optional()
12177
+ claimPermissions: BoostPermissionsValidator.optional(),
12178
+ allowAnyoneToCreateChildren: z.boolean().optional()
12178
12179
  });
12179
12180
  var BoostQueryValidator = z.object({
12180
12181
  uri: StringQuery,
@@ -12215,7 +12216,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
12215
12216
  name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
12216
12217
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
12217
12218
  }),
12218
- did: z.string()
12219
+ did: z.string(),
12220
+ isPrimary: z.boolean().optional()
12219
12221
  })
12220
12222
  });
12221
12223
  var AutoBoostConfigValidator = z.object({
@@ -12396,16 +12398,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
12396
12398
  "BOOST_ACCEPTED",
12397
12399
  "PRESENTATION_REQUEST",
12398
12400
  "PRESENTATION_RECEIVED",
12399
- "CONSENT_FLOW_TRANSACTION"
12401
+ "CONSENT_FLOW_TRANSACTION",
12402
+ "ISSUANCE_CLAIMED",
12403
+ "ISSUANCE_DELIVERED"
12400
12404
  ]);
12401
12405
  var LCNNotificationMessageValidator = z.object({
12402
12406
  title: z.string().optional(),
12403
12407
  body: z.string().optional()
12404
12408
  });
12409
+ var LCNInboxContactMethodValidator = z.object({
12410
+ type: z.string(),
12411
+ value: z.string()
12412
+ });
12413
+ var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
12414
+ var LCNNotificationInboxValidator = z.object({
12415
+ issuanceId: z.string(),
12416
+ status: LCNInboxStatusEnumValidator,
12417
+ recipient: z.object({
12418
+ contactMethod: LCNInboxContactMethodValidator.optional(),
12419
+ learnCardId: z.string().optional()
12420
+ }),
12421
+ timestamp: z.string().datetime().optional()
12422
+ });
12405
12423
  var LCNNotificationDataValidator = z.object({
12406
12424
  vcUris: z.array(z.string()).optional(),
12407
12425
  vpUris: z.array(z.string()).optional(),
12408
- transaction: ConsentFlowTransactionValidator.optional()
12426
+ transaction: ConsentFlowTransactionValidator.optional(),
12427
+ inbox: LCNNotificationInboxValidator.optional()
12409
12428
  });
12410
12429
  var LCNNotificationValidator = z.object({
12411
12430
  type: LCNNotificationTypeEnumValidator,
@@ -12413,7 +12432,8 @@ var LCNNotificationValidator = z.object({
12413
12432
  from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
12414
12433
  message: LCNNotificationMessageValidator.optional(),
12415
12434
  data: LCNNotificationDataValidator.optional(),
12416
- sent: z.string().datetime().optional()
12435
+ sent: z.string().datetime().optional(),
12436
+ webhookUrl: z.string().optional()
12417
12437
  });
12418
12438
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
12419
12439
  var AuthGrantValidator = z.object({
@@ -12437,6 +12457,126 @@ var AuthGrantQueryValidator = z.object({
12437
12457
  description: StringQuery,
12438
12458
  status: AuthGrantStatusValidator
12439
12459
  }).partial();
12460
+ var contactMethodBase = z.object({
12461
+ id: z.string(),
12462
+ isVerified: z.boolean(),
12463
+ verifiedAt: z.string().optional(),
12464
+ isPrimary: z.boolean(),
12465
+ createdAt: z.string()
12466
+ });
12467
+ var ContactMethodValidator = z.discriminatedUnion("type", [
12468
+ z.object({
12469
+ type: z.literal("email"),
12470
+ value: z.string().email()
12471
+ }).merge(contactMethodBase),
12472
+ z.object({
12473
+ type: z.literal("phone"),
12474
+ value: z.string()
12475
+ }).merge(contactMethodBase)
12476
+ ]);
12477
+ var createContactMethodBase = z.object({
12478
+ isVerified: z.boolean().optional(),
12479
+ isPrimary: z.boolean().optional()
12480
+ });
12481
+ var ContactMethodCreateValidator = z.discriminatedUnion("type", [
12482
+ z.object({
12483
+ type: z.literal("email"),
12484
+ value: z.string().email()
12485
+ }).merge(createContactMethodBase),
12486
+ z.object({
12487
+ type: z.literal("phone"),
12488
+ value: z.string()
12489
+ }).merge(createContactMethodBase)
12490
+ ]);
12491
+ var ContactMethodQueryValidator = z.discriminatedUnion("type", [
12492
+ z.object({
12493
+ type: z.literal("email"),
12494
+ value: z.string().email()
12495
+ }),
12496
+ z.object({
12497
+ type: z.literal("phone"),
12498
+ value: z.string()
12499
+ })
12500
+ ]);
12501
+ var ContactMethodVerificationRequestValidator = z.object({
12502
+ value: z.string(),
12503
+ type: z.enum(["email", "phone"])
12504
+ });
12505
+ var ContactMethodVerificationValidator = z.object({
12506
+ token: z.string()
12507
+ });
12508
+ var SetPrimaryContactMethodValidator = z.object({
12509
+ contactMethodId: z.string()
12510
+ });
12511
+ var InboxCredentialValidator = z.object({
12512
+ id: z.string(),
12513
+ credential: z.string(),
12514
+ isSigned: z.boolean(),
12515
+ currentStatus: LCNInboxStatusEnumValidator,
12516
+ expiresAt: z.string(),
12517
+ createdAt: z.string(),
12518
+ issuerDid: z.string(),
12519
+ webhookUrl: z.string().optional(),
12520
+ "signingAuthority.endpoint": z.string().optional(),
12521
+ "signingAuthority.name": z.string().optional()
12522
+ });
12523
+ var PaginatedInboxCredentialsValidator = z.object({
12524
+ hasMore: z.boolean(),
12525
+ records: z.array(InboxCredentialValidator),
12526
+ cursor: z.string().optional()
12527
+ });
12528
+ var InboxCredentialQueryValidator = z.object({
12529
+ currentStatus: LCNInboxStatusEnumValidator,
12530
+ id: z.string(),
12531
+ isSigned: z.boolean(),
12532
+ issuerDid: z.string()
12533
+ }).partial();
12534
+ var IssueInboxSigningAuthorityValidator = z.object({
12535
+ endpoint: z.string().url(),
12536
+ name: z.string()
12537
+ });
12538
+ var IssueInboxCredentialValidator = z.object({
12539
+ recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
12540
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."),
12541
+ configuration: z.object({
12542
+ signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe("The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."),
12543
+ webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
12544
+ expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
12545
+ delivery: z.object({
12546
+ suppress: z.boolean().optional().default(false).describe("Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."),
12547
+ template: z.object({
12548
+ id: z.enum(["universal-inbox-claim"]).optional().describe("The template ID to use for the credential delivery. If not provided, the default template will be used."),
12549
+ model: z.object({
12550
+ issuer: z.object({
12551
+ name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
12552
+ logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
12553
+ }).optional(),
12554
+ credential: z.object({
12555
+ name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
12556
+ type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
12557
+ }).optional(),
12558
+ recipient: z.object({
12559
+ name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
12560
+ }).optional()
12561
+ }).describe("The template model to use for the credential delivery. Injects via template variables into email/sms templates. If not provided, the default template will be used.")
12562
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
12563
+ }).optional().describe("Configuration for the credential delivery i.e. email or SMS. When credentials are sent to a user who has a verified email or phone associated with their account, delivery is skipped, and the credential will be sent using in-app notifications. If not provided, the default configuration will be used.")
12564
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
12565
+ });
12566
+ var IssueInboxCredentialResponseValidator = z.object({
12567
+ issuanceId: z.string(),
12568
+ status: LCNInboxStatusEnumValidator,
12569
+ recipient: ContactMethodQueryValidator,
12570
+ claimUrl: z.string().url().optional(),
12571
+ recipientDid: z.string().optional()
12572
+ });
12573
+ var ClaimTokenValidator = z.object({
12574
+ token: z.string(),
12575
+ contactMethodId: z.string(),
12576
+ createdAt: z.string(),
12577
+ expiresAt: z.string(),
12578
+ used: z.boolean()
12579
+ });
12440
12580
 
12441
12581
  // ../ceramic/dist/ceramic-plugin.esm.js
12442
12582
  var __create2 = Object.create;
@@ -67770,7 +67910,7 @@ var LCNProfileValidator2 = z2.object({
67770
67910
  bio: z2.string().default("").describe("Longer bio for the profile."),
67771
67911
  did: z2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
67772
67912
  isPrivate: z2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
67773
- email: z2.string().optional().describe("Contact email address for the profile."),
67913
+ email: z2.string().optional().describe("Contact email address for the profile. (deprecated)"),
67774
67914
  image: z2.string().optional().describe("Profile image URL for the profile."),
67775
67915
  heroImage: z2.string().optional().describe("Hero image URL for the profile."),
67776
67916
  websiteLink: z2.string().optional().describe("Website link for the profile."),
@@ -67897,7 +68037,8 @@ var BoostValidator2 = z2.object({
67897
68037
  status: LCNBoostStatus2.optional(),
67898
68038
  autoConnectRecipients: z2.boolean().optional(),
67899
68039
  meta: z2.record(z2.any()).optional(),
67900
- claimPermissions: BoostPermissionsValidator2.optional()
68040
+ claimPermissions: BoostPermissionsValidator2.optional(),
68041
+ allowAnyoneToCreateChildren: z2.boolean().optional()
67901
68042
  });
67902
68043
  var BoostQueryValidator2 = z2.object({
67903
68044
  uri: StringQuery2,
@@ -67938,7 +68079,8 @@ var LCNSigningAuthorityForUserValidator2 = z2.object({
67938
68079
  name: z2.string().max(15).regex(/^[a-z0-9-]+$/, {
67939
68080
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
67940
68081
  }),
67941
- did: z2.string()
68082
+ did: z2.string(),
68083
+ isPrimary: z2.boolean().optional()
67942
68084
  })
67943
68085
  });
67944
68086
  var AutoBoostConfigValidator2 = z2.object({
@@ -68119,16 +68261,33 @@ var LCNNotificationTypeEnumValidator2 = z2.enum([
68119
68261
  "BOOST_ACCEPTED",
68120
68262
  "PRESENTATION_REQUEST",
68121
68263
  "PRESENTATION_RECEIVED",
68122
- "CONSENT_FLOW_TRANSACTION"
68264
+ "CONSENT_FLOW_TRANSACTION",
68265
+ "ISSUANCE_CLAIMED",
68266
+ "ISSUANCE_DELIVERED"
68123
68267
  ]);
68124
68268
  var LCNNotificationMessageValidator2 = z2.object({
68125
68269
  title: z2.string().optional(),
68126
68270
  body: z2.string().optional()
68127
68271
  });
68272
+ var LCNInboxContactMethodValidator2 = z2.object({
68273
+ type: z2.string(),
68274
+ value: z2.string()
68275
+ });
68276
+ var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
68277
+ var LCNNotificationInboxValidator2 = z2.object({
68278
+ issuanceId: z2.string(),
68279
+ status: LCNInboxStatusEnumValidator2,
68280
+ recipient: z2.object({
68281
+ contactMethod: LCNInboxContactMethodValidator2.optional(),
68282
+ learnCardId: z2.string().optional()
68283
+ }),
68284
+ timestamp: z2.string().datetime().optional()
68285
+ });
68128
68286
  var LCNNotificationDataValidator2 = z2.object({
68129
68287
  vcUris: z2.array(z2.string()).optional(),
68130
68288
  vpUris: z2.array(z2.string()).optional(),
68131
- transaction: ConsentFlowTransactionValidator2.optional()
68289
+ transaction: ConsentFlowTransactionValidator2.optional(),
68290
+ inbox: LCNNotificationInboxValidator2.optional()
68132
68291
  });
68133
68292
  var LCNNotificationValidator2 = z2.object({
68134
68293
  type: LCNNotificationTypeEnumValidator2,
@@ -68136,7 +68295,8 @@ var LCNNotificationValidator2 = z2.object({
68136
68295
  from: LCNProfileValidator2.partial().and(z2.object({ did: z2.string() })),
68137
68296
  message: LCNNotificationMessageValidator2.optional(),
68138
68297
  data: LCNNotificationDataValidator2.optional(),
68139
- sent: z2.string().datetime().optional()
68298
+ sent: z2.string().datetime().optional(),
68299
+ webhookUrl: z2.string().optional()
68140
68300
  });
68141
68301
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
68142
68302
  var AuthGrantValidator2 = z2.object({
@@ -68160,6 +68320,126 @@ var AuthGrantQueryValidator2 = z2.object({
68160
68320
  description: StringQuery2,
68161
68321
  status: AuthGrantStatusValidator2
68162
68322
  }).partial();
68323
+ var contactMethodBase2 = z2.object({
68324
+ id: z2.string(),
68325
+ isVerified: z2.boolean(),
68326
+ verifiedAt: z2.string().optional(),
68327
+ isPrimary: z2.boolean(),
68328
+ createdAt: z2.string()
68329
+ });
68330
+ var ContactMethodValidator2 = z2.discriminatedUnion("type", [
68331
+ z2.object({
68332
+ type: z2.literal("email"),
68333
+ value: z2.string().email()
68334
+ }).merge(contactMethodBase2),
68335
+ z2.object({
68336
+ type: z2.literal("phone"),
68337
+ value: z2.string()
68338
+ }).merge(contactMethodBase2)
68339
+ ]);
68340
+ var createContactMethodBase2 = z2.object({
68341
+ isVerified: z2.boolean().optional(),
68342
+ isPrimary: z2.boolean().optional()
68343
+ });
68344
+ var ContactMethodCreateValidator2 = z2.discriminatedUnion("type", [
68345
+ z2.object({
68346
+ type: z2.literal("email"),
68347
+ value: z2.string().email()
68348
+ }).merge(createContactMethodBase2),
68349
+ z2.object({
68350
+ type: z2.literal("phone"),
68351
+ value: z2.string()
68352
+ }).merge(createContactMethodBase2)
68353
+ ]);
68354
+ var ContactMethodQueryValidator2 = z2.discriminatedUnion("type", [
68355
+ z2.object({
68356
+ type: z2.literal("email"),
68357
+ value: z2.string().email()
68358
+ }),
68359
+ z2.object({
68360
+ type: z2.literal("phone"),
68361
+ value: z2.string()
68362
+ })
68363
+ ]);
68364
+ var ContactMethodVerificationRequestValidator2 = z2.object({
68365
+ value: z2.string(),
68366
+ type: z2.enum(["email", "phone"])
68367
+ });
68368
+ var ContactMethodVerificationValidator2 = z2.object({
68369
+ token: z2.string()
68370
+ });
68371
+ var SetPrimaryContactMethodValidator2 = z2.object({
68372
+ contactMethodId: z2.string()
68373
+ });
68374
+ var InboxCredentialValidator2 = z2.object({
68375
+ id: z2.string(),
68376
+ credential: z2.string(),
68377
+ isSigned: z2.boolean(),
68378
+ currentStatus: LCNInboxStatusEnumValidator2,
68379
+ expiresAt: z2.string(),
68380
+ createdAt: z2.string(),
68381
+ issuerDid: z2.string(),
68382
+ webhookUrl: z2.string().optional(),
68383
+ "signingAuthority.endpoint": z2.string().optional(),
68384
+ "signingAuthority.name": z2.string().optional()
68385
+ });
68386
+ var PaginatedInboxCredentialsValidator2 = z2.object({
68387
+ hasMore: z2.boolean(),
68388
+ records: z2.array(InboxCredentialValidator2),
68389
+ cursor: z2.string().optional()
68390
+ });
68391
+ var InboxCredentialQueryValidator2 = z2.object({
68392
+ currentStatus: LCNInboxStatusEnumValidator2,
68393
+ id: z2.string(),
68394
+ isSigned: z2.boolean(),
68395
+ issuerDid: z2.string()
68396
+ }).partial();
68397
+ var IssueInboxSigningAuthorityValidator2 = z2.object({
68398
+ endpoint: z2.string().url(),
68399
+ name: z2.string()
68400
+ });
68401
+ var IssueInboxCredentialValidator2 = z2.object({
68402
+ recipient: ContactMethodQueryValidator2.describe("The recipient of the credential"),
68403
+ credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.passthrough()).describe("The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."),
68404
+ configuration: z2.object({
68405
+ signingAuthority: IssueInboxSigningAuthorityValidator2.optional().describe("The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."),
68406
+ webhookUrl: z2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
68407
+ expiresInDays: z2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
68408
+ delivery: z2.object({
68409
+ suppress: z2.boolean().optional().default(false).describe("Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."),
68410
+ template: z2.object({
68411
+ id: z2.enum(["universal-inbox-claim"]).optional().describe("The template ID to use for the credential delivery. If not provided, the default template will be used."),
68412
+ model: z2.object({
68413
+ issuer: z2.object({
68414
+ name: z2.string().optional().describe('The name of the organization (e.g., "State University").'),
68415
+ logoUrl: z2.string().url().optional().describe("The URL of the organization's logo.")
68416
+ }).optional(),
68417
+ credential: z2.object({
68418
+ name: z2.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
68419
+ type: z2.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
68420
+ }).optional(),
68421
+ recipient: z2.object({
68422
+ name: z2.string().optional().describe('The name of the recipient (e.g., "John Doe").')
68423
+ }).optional()
68424
+ }).describe("The template model to use for the credential delivery. Injects via template variables into email/sms templates. If not provided, the default template will be used.")
68425
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
68426
+ }).optional().describe("Configuration for the credential delivery i.e. email or SMS. When credentials are sent to a user who has a verified email or phone associated with their account, delivery is skipped, and the credential will be sent using in-app notifications. If not provided, the default configuration will be used.")
68427
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
68428
+ });
68429
+ var IssueInboxCredentialResponseValidator2 = z2.object({
68430
+ issuanceId: z2.string(),
68431
+ status: LCNInboxStatusEnumValidator2,
68432
+ recipient: ContactMethodQueryValidator2,
68433
+ claimUrl: z2.string().url().optional(),
68434
+ recipientDid: z2.string().optional()
68435
+ });
68436
+ var ClaimTokenValidator2 = z2.object({
68437
+ token: z2.string(),
68438
+ contactMethodId: z2.string(),
68439
+ createdAt: z2.string(),
68440
+ expiresAt: z2.string(),
68441
+ used: z2.boolean()
68442
+ });
68163
68443
  var streamIdToCeramicURI = /* @__PURE__ */ __name3((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
68164
68444
  var CeramicURIValidator = z2.string().refine(
68165
68445
  (string22) => string22.split(":").length === 3 && string22.split(":")[0] === "lc",