@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.
@@ -12041,7 +12041,7 @@ var LCNProfileValidator = z.object({
12041
12041
  bio: z.string().default("").describe("Longer bio for the profile."),
12042
12042
  did: z.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
12043
12043
  isPrivate: z.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
12044
- email: z.string().optional().describe("Contact email address for the profile."),
12044
+ email: z.string().optional().describe("Contact email address for the profile. (deprecated)"),
12045
12045
  image: z.string().optional().describe("Profile image URL for the profile."),
12046
12046
  heroImage: z.string().optional().describe("Hero image URL for the profile."),
12047
12047
  websiteLink: z.string().optional().describe("Website link for the profile."),
@@ -12168,7 +12168,8 @@ var BoostValidator = z.object({
12168
12168
  status: LCNBoostStatus.optional(),
12169
12169
  autoConnectRecipients: z.boolean().optional(),
12170
12170
  meta: z.record(z.any()).optional(),
12171
- claimPermissions: BoostPermissionsValidator.optional()
12171
+ claimPermissions: BoostPermissionsValidator.optional(),
12172
+ allowAnyoneToCreateChildren: z.boolean().optional()
12172
12173
  });
12173
12174
  var BoostQueryValidator = z.object({
12174
12175
  uri: StringQuery,
@@ -12209,7 +12210,8 @@ var LCNSigningAuthorityForUserValidator = z.object({
12209
12210
  name: z.string().max(15).regex(/^[a-z0-9-]+$/, {
12210
12211
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
12211
12212
  }),
12212
- did: z.string()
12213
+ did: z.string(),
12214
+ isPrimary: z.boolean().optional()
12213
12215
  })
12214
12216
  });
12215
12217
  var AutoBoostConfigValidator = z.object({
@@ -12390,16 +12392,33 @@ var LCNNotificationTypeEnumValidator = z.enum([
12390
12392
  "BOOST_ACCEPTED",
12391
12393
  "PRESENTATION_REQUEST",
12392
12394
  "PRESENTATION_RECEIVED",
12393
- "CONSENT_FLOW_TRANSACTION"
12395
+ "CONSENT_FLOW_TRANSACTION",
12396
+ "ISSUANCE_CLAIMED",
12397
+ "ISSUANCE_DELIVERED"
12394
12398
  ]);
12395
12399
  var LCNNotificationMessageValidator = z.object({
12396
12400
  title: z.string().optional(),
12397
12401
  body: z.string().optional()
12398
12402
  });
12403
+ var LCNInboxContactMethodValidator = z.object({
12404
+ type: z.string(),
12405
+ value: z.string()
12406
+ });
12407
+ var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
12408
+ var LCNNotificationInboxValidator = z.object({
12409
+ issuanceId: z.string(),
12410
+ status: LCNInboxStatusEnumValidator,
12411
+ recipient: z.object({
12412
+ contactMethod: LCNInboxContactMethodValidator.optional(),
12413
+ learnCardId: z.string().optional()
12414
+ }),
12415
+ timestamp: z.string().datetime().optional()
12416
+ });
12399
12417
  var LCNNotificationDataValidator = z.object({
12400
12418
  vcUris: z.array(z.string()).optional(),
12401
12419
  vpUris: z.array(z.string()).optional(),
12402
- transaction: ConsentFlowTransactionValidator.optional()
12420
+ transaction: ConsentFlowTransactionValidator.optional(),
12421
+ inbox: LCNNotificationInboxValidator.optional()
12403
12422
  });
12404
12423
  var LCNNotificationValidator = z.object({
12405
12424
  type: LCNNotificationTypeEnumValidator,
@@ -12407,7 +12426,8 @@ var LCNNotificationValidator = z.object({
12407
12426
  from: LCNProfileValidator.partial().and(z.object({ did: z.string() })),
12408
12427
  message: LCNNotificationMessageValidator.optional(),
12409
12428
  data: LCNNotificationDataValidator.optional(),
12410
- sent: z.string().datetime().optional()
12429
+ sent: z.string().datetime().optional(),
12430
+ webhookUrl: z.string().optional()
12411
12431
  });
12412
12432
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
12413
12433
  var AuthGrantValidator = z.object({
@@ -12431,6 +12451,126 @@ var AuthGrantQueryValidator = z.object({
12431
12451
  description: StringQuery,
12432
12452
  status: AuthGrantStatusValidator
12433
12453
  }).partial();
12454
+ var contactMethodBase = z.object({
12455
+ id: z.string(),
12456
+ isVerified: z.boolean(),
12457
+ verifiedAt: z.string().optional(),
12458
+ isPrimary: z.boolean(),
12459
+ createdAt: z.string()
12460
+ });
12461
+ var ContactMethodValidator = z.discriminatedUnion("type", [
12462
+ z.object({
12463
+ type: z.literal("email"),
12464
+ value: z.string().email()
12465
+ }).merge(contactMethodBase),
12466
+ z.object({
12467
+ type: z.literal("phone"),
12468
+ value: z.string()
12469
+ }).merge(contactMethodBase)
12470
+ ]);
12471
+ var createContactMethodBase = z.object({
12472
+ isVerified: z.boolean().optional(),
12473
+ isPrimary: z.boolean().optional()
12474
+ });
12475
+ var ContactMethodCreateValidator = z.discriminatedUnion("type", [
12476
+ z.object({
12477
+ type: z.literal("email"),
12478
+ value: z.string().email()
12479
+ }).merge(createContactMethodBase),
12480
+ z.object({
12481
+ type: z.literal("phone"),
12482
+ value: z.string()
12483
+ }).merge(createContactMethodBase)
12484
+ ]);
12485
+ var ContactMethodQueryValidator = z.discriminatedUnion("type", [
12486
+ z.object({
12487
+ type: z.literal("email"),
12488
+ value: z.string().email()
12489
+ }),
12490
+ z.object({
12491
+ type: z.literal("phone"),
12492
+ value: z.string()
12493
+ })
12494
+ ]);
12495
+ var ContactMethodVerificationRequestValidator = z.object({
12496
+ value: z.string(),
12497
+ type: z.enum(["email", "phone"])
12498
+ });
12499
+ var ContactMethodVerificationValidator = z.object({
12500
+ token: z.string()
12501
+ });
12502
+ var SetPrimaryContactMethodValidator = z.object({
12503
+ contactMethodId: z.string()
12504
+ });
12505
+ var InboxCredentialValidator = z.object({
12506
+ id: z.string(),
12507
+ credential: z.string(),
12508
+ isSigned: z.boolean(),
12509
+ currentStatus: LCNInboxStatusEnumValidator,
12510
+ expiresAt: z.string(),
12511
+ createdAt: z.string(),
12512
+ issuerDid: z.string(),
12513
+ webhookUrl: z.string().optional(),
12514
+ "signingAuthority.endpoint": z.string().optional(),
12515
+ "signingAuthority.name": z.string().optional()
12516
+ });
12517
+ var PaginatedInboxCredentialsValidator = z.object({
12518
+ hasMore: z.boolean(),
12519
+ records: z.array(InboxCredentialValidator),
12520
+ cursor: z.string().optional()
12521
+ });
12522
+ var InboxCredentialQueryValidator = z.object({
12523
+ currentStatus: LCNInboxStatusEnumValidator,
12524
+ id: z.string(),
12525
+ isSigned: z.boolean(),
12526
+ issuerDid: z.string()
12527
+ }).partial();
12528
+ var IssueInboxSigningAuthorityValidator = z.object({
12529
+ endpoint: z.string().url(),
12530
+ name: z.string()
12531
+ });
12532
+ var IssueInboxCredentialValidator = z.object({
12533
+ recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
12534
+ 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."),
12535
+ configuration: z.object({
12536
+ 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."),
12537
+ webhookUrl: z.string().url().optional().describe("The webhook URL to receive credential issuance events."),
12538
+ expiresInDays: z.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
12539
+ delivery: z.object({
12540
+ 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."),
12541
+ template: z.object({
12542
+ 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."),
12543
+ model: z.object({
12544
+ issuer: z.object({
12545
+ name: z.string().optional().describe('The name of the organization (e.g., "State University").'),
12546
+ logoUrl: z.string().url().optional().describe("The URL of the organization's logo.")
12547
+ }).optional(),
12548
+ credential: z.object({
12549
+ name: z.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
12550
+ type: z.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
12551
+ }).optional(),
12552
+ recipient: z.object({
12553
+ name: z.string().optional().describe('The name of the recipient (e.g., "John Doe").')
12554
+ }).optional()
12555
+ }).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.")
12556
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
12557
+ }).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.")
12558
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
12559
+ });
12560
+ var IssueInboxCredentialResponseValidator = z.object({
12561
+ issuanceId: z.string(),
12562
+ status: LCNInboxStatusEnumValidator,
12563
+ recipient: ContactMethodQueryValidator,
12564
+ claimUrl: z.string().url().optional(),
12565
+ recipientDid: z.string().optional()
12566
+ });
12567
+ var ClaimTokenValidator = z.object({
12568
+ token: z.string(),
12569
+ contactMethodId: z.string(),
12570
+ createdAt: z.string(),
12571
+ expiresAt: z.string(),
12572
+ used: z.boolean()
12573
+ });
12434
12574
 
12435
12575
  // ../ceramic/dist/ceramic-plugin.esm.js
12436
12576
  var __create2 = Object.create;
@@ -67764,7 +67904,7 @@ var LCNProfileValidator2 = z2.object({
67764
67904
  bio: z2.string().default("").describe("Longer bio for the profile."),
67765
67905
  did: z2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
67766
67906
  isPrivate: z2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
67767
- email: z2.string().optional().describe("Contact email address for the profile."),
67907
+ email: z2.string().optional().describe("Contact email address for the profile. (deprecated)"),
67768
67908
  image: z2.string().optional().describe("Profile image URL for the profile."),
67769
67909
  heroImage: z2.string().optional().describe("Hero image URL for the profile."),
67770
67910
  websiteLink: z2.string().optional().describe("Website link for the profile."),
@@ -67891,7 +68031,8 @@ var BoostValidator2 = z2.object({
67891
68031
  status: LCNBoostStatus2.optional(),
67892
68032
  autoConnectRecipients: z2.boolean().optional(),
67893
68033
  meta: z2.record(z2.any()).optional(),
67894
- claimPermissions: BoostPermissionsValidator2.optional()
68034
+ claimPermissions: BoostPermissionsValidator2.optional(),
68035
+ allowAnyoneToCreateChildren: z2.boolean().optional()
67895
68036
  });
67896
68037
  var BoostQueryValidator2 = z2.object({
67897
68038
  uri: StringQuery2,
@@ -67932,7 +68073,8 @@ var LCNSigningAuthorityForUserValidator2 = z2.object({
67932
68073
  name: z2.string().max(15).regex(/^[a-z0-9-]+$/, {
67933
68074
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
67934
68075
  }),
67935
- did: z2.string()
68076
+ did: z2.string(),
68077
+ isPrimary: z2.boolean().optional()
67936
68078
  })
67937
68079
  });
67938
68080
  var AutoBoostConfigValidator2 = z2.object({
@@ -68113,16 +68255,33 @@ var LCNNotificationTypeEnumValidator2 = z2.enum([
68113
68255
  "BOOST_ACCEPTED",
68114
68256
  "PRESENTATION_REQUEST",
68115
68257
  "PRESENTATION_RECEIVED",
68116
- "CONSENT_FLOW_TRANSACTION"
68258
+ "CONSENT_FLOW_TRANSACTION",
68259
+ "ISSUANCE_CLAIMED",
68260
+ "ISSUANCE_DELIVERED"
68117
68261
  ]);
68118
68262
  var LCNNotificationMessageValidator2 = z2.object({
68119
68263
  title: z2.string().optional(),
68120
68264
  body: z2.string().optional()
68121
68265
  });
68266
+ var LCNInboxContactMethodValidator2 = z2.object({
68267
+ type: z2.string(),
68268
+ value: z2.string()
68269
+ });
68270
+ var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
68271
+ var LCNNotificationInboxValidator2 = z2.object({
68272
+ issuanceId: z2.string(),
68273
+ status: LCNInboxStatusEnumValidator2,
68274
+ recipient: z2.object({
68275
+ contactMethod: LCNInboxContactMethodValidator2.optional(),
68276
+ learnCardId: z2.string().optional()
68277
+ }),
68278
+ timestamp: z2.string().datetime().optional()
68279
+ });
68122
68280
  var LCNNotificationDataValidator2 = z2.object({
68123
68281
  vcUris: z2.array(z2.string()).optional(),
68124
68282
  vpUris: z2.array(z2.string()).optional(),
68125
- transaction: ConsentFlowTransactionValidator2.optional()
68283
+ transaction: ConsentFlowTransactionValidator2.optional(),
68284
+ inbox: LCNNotificationInboxValidator2.optional()
68126
68285
  });
68127
68286
  var LCNNotificationValidator2 = z2.object({
68128
68287
  type: LCNNotificationTypeEnumValidator2,
@@ -68130,7 +68289,8 @@ var LCNNotificationValidator2 = z2.object({
68130
68289
  from: LCNProfileValidator2.partial().and(z2.object({ did: z2.string() })),
68131
68290
  message: LCNNotificationMessageValidator2.optional(),
68132
68291
  data: LCNNotificationDataValidator2.optional(),
68133
- sent: z2.string().datetime().optional()
68292
+ sent: z2.string().datetime().optional(),
68293
+ webhookUrl: z2.string().optional()
68134
68294
  });
68135
68295
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
68136
68296
  var AuthGrantValidator2 = z2.object({
@@ -68154,6 +68314,126 @@ var AuthGrantQueryValidator2 = z2.object({
68154
68314
  description: StringQuery2,
68155
68315
  status: AuthGrantStatusValidator2
68156
68316
  }).partial();
68317
+ var contactMethodBase2 = z2.object({
68318
+ id: z2.string(),
68319
+ isVerified: z2.boolean(),
68320
+ verifiedAt: z2.string().optional(),
68321
+ isPrimary: z2.boolean(),
68322
+ createdAt: z2.string()
68323
+ });
68324
+ var ContactMethodValidator2 = z2.discriminatedUnion("type", [
68325
+ z2.object({
68326
+ type: z2.literal("email"),
68327
+ value: z2.string().email()
68328
+ }).merge(contactMethodBase2),
68329
+ z2.object({
68330
+ type: z2.literal("phone"),
68331
+ value: z2.string()
68332
+ }).merge(contactMethodBase2)
68333
+ ]);
68334
+ var createContactMethodBase2 = z2.object({
68335
+ isVerified: z2.boolean().optional(),
68336
+ isPrimary: z2.boolean().optional()
68337
+ });
68338
+ var ContactMethodCreateValidator2 = z2.discriminatedUnion("type", [
68339
+ z2.object({
68340
+ type: z2.literal("email"),
68341
+ value: z2.string().email()
68342
+ }).merge(createContactMethodBase2),
68343
+ z2.object({
68344
+ type: z2.literal("phone"),
68345
+ value: z2.string()
68346
+ }).merge(createContactMethodBase2)
68347
+ ]);
68348
+ var ContactMethodQueryValidator2 = z2.discriminatedUnion("type", [
68349
+ z2.object({
68350
+ type: z2.literal("email"),
68351
+ value: z2.string().email()
68352
+ }),
68353
+ z2.object({
68354
+ type: z2.literal("phone"),
68355
+ value: z2.string()
68356
+ })
68357
+ ]);
68358
+ var ContactMethodVerificationRequestValidator2 = z2.object({
68359
+ value: z2.string(),
68360
+ type: z2.enum(["email", "phone"])
68361
+ });
68362
+ var ContactMethodVerificationValidator2 = z2.object({
68363
+ token: z2.string()
68364
+ });
68365
+ var SetPrimaryContactMethodValidator2 = z2.object({
68366
+ contactMethodId: z2.string()
68367
+ });
68368
+ var InboxCredentialValidator2 = z2.object({
68369
+ id: z2.string(),
68370
+ credential: z2.string(),
68371
+ isSigned: z2.boolean(),
68372
+ currentStatus: LCNInboxStatusEnumValidator2,
68373
+ expiresAt: z2.string(),
68374
+ createdAt: z2.string(),
68375
+ issuerDid: z2.string(),
68376
+ webhookUrl: z2.string().optional(),
68377
+ "signingAuthority.endpoint": z2.string().optional(),
68378
+ "signingAuthority.name": z2.string().optional()
68379
+ });
68380
+ var PaginatedInboxCredentialsValidator2 = z2.object({
68381
+ hasMore: z2.boolean(),
68382
+ records: z2.array(InboxCredentialValidator2),
68383
+ cursor: z2.string().optional()
68384
+ });
68385
+ var InboxCredentialQueryValidator2 = z2.object({
68386
+ currentStatus: LCNInboxStatusEnumValidator2,
68387
+ id: z2.string(),
68388
+ isSigned: z2.boolean(),
68389
+ issuerDid: z2.string()
68390
+ }).partial();
68391
+ var IssueInboxSigningAuthorityValidator2 = z2.object({
68392
+ endpoint: z2.string().url(),
68393
+ name: z2.string()
68394
+ });
68395
+ var IssueInboxCredentialValidator2 = z2.object({
68396
+ recipient: ContactMethodQueryValidator2.describe("The recipient of the credential"),
68397
+ 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."),
68398
+ configuration: z2.object({
68399
+ 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."),
68400
+ webhookUrl: z2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
68401
+ expiresInDays: z2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
68402
+ delivery: z2.object({
68403
+ 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."),
68404
+ template: z2.object({
68405
+ 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."),
68406
+ model: z2.object({
68407
+ issuer: z2.object({
68408
+ name: z2.string().optional().describe('The name of the organization (e.g., "State University").'),
68409
+ logoUrl: z2.string().url().optional().describe("The URL of the organization's logo.")
68410
+ }).optional(),
68411
+ credential: z2.object({
68412
+ name: z2.string().optional().describe('The name of the credential (e.g., "Bachelor of Science").'),
68413
+ type: z2.string().optional().describe('The type of the credential (e.g., "degree", "certificate").')
68414
+ }).optional(),
68415
+ recipient: z2.object({
68416
+ name: z2.string().optional().describe('The name of the recipient (e.g., "John Doe").')
68417
+ }).optional()
68418
+ }).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.")
68419
+ }).optional().describe("The template to use for the credential delivery. If not provided, the default template will be used.")
68420
+ }).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.")
68421
+ }).optional().describe("Configuration for the credential issuance. If not provided, the default configuration will be used.")
68422
+ });
68423
+ var IssueInboxCredentialResponseValidator2 = z2.object({
68424
+ issuanceId: z2.string(),
68425
+ status: LCNInboxStatusEnumValidator2,
68426
+ recipient: ContactMethodQueryValidator2,
68427
+ claimUrl: z2.string().url().optional(),
68428
+ recipientDid: z2.string().optional()
68429
+ });
68430
+ var ClaimTokenValidator2 = z2.object({
68431
+ token: z2.string(),
68432
+ contactMethodId: z2.string(),
68433
+ createdAt: z2.string(),
68434
+ expiresAt: z2.string(),
68435
+ used: z2.boolean()
68436
+ });
68157
68437
  var streamIdToCeramicURI = /* @__PURE__ */ __name3((id) => `lc:ceramic:${id}`, "streamIdToCeramicURI");
68158
68438
  var CeramicURIValidator = z2.string().refine(
68159
68439
  (string22) => string22.split(":").length === 3 && string22.split(":")[0] === "lc",