@learncard/network-plugin 2.13.14 → 2.13.16

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.
@@ -15606,6 +15606,31 @@ var LCNPublicProfileValidator = LCNProfileValidator.pick({
15606
15606
  isServiceProfile: true,
15607
15607
  display: true
15608
15608
  });
15609
+ var LCNConnectionPromptStatusValidator = external_exports.enum(["PENDING", "SKIPPED", "CONNECTED"]);
15610
+ var LCNConnectionPromptSurfaceValidator = external_exports.enum(["POST_CLAIM", "NOTIFICATION"]);
15611
+ var LCNConnectionPromptActionStatusValidator = external_exports.enum([
15612
+ "PENDING",
15613
+ "SKIPPED",
15614
+ "CONNECTED",
15615
+ "STALE"
15616
+ ]);
15617
+ var LCNConnectionPromptValidator = external_exports.object({
15618
+ promptId: external_exports.string().uuid(),
15619
+ status: LCNConnectionPromptStatusValidator,
15620
+ surface: LCNConnectionPromptSurfaceValidator,
15621
+ triggerId: external_exports.string(),
15622
+ triggeredAt: external_exports.iso.datetime(),
15623
+ updatedAt: external_exports.iso.datetime(),
15624
+ counterpart: LCNPublicProfileValidator
15625
+ });
15626
+ var LCNConnectionPromptActionResultValidator = external_exports.object({
15627
+ promptId: external_exports.string().uuid(),
15628
+ status: LCNConnectionPromptActionStatusValidator
15629
+ });
15630
+ var LCNConnectionPromptMetadataValidator = external_exports.object({
15631
+ promptId: external_exports.string().uuid(),
15632
+ counterpartProfileId: external_exports.string()
15633
+ });
15609
15634
  var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
15610
15635
  bio: LCNProfileValidator.shape.bio,
15611
15636
  websiteLink: LCNProfileValidator.shape.websiteLink,
@@ -15614,7 +15639,8 @@ var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
15614
15639
  did: LCNProfileValidator.shape.did
15615
15640
  });
15616
15641
  var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
15617
- email: LCNProfileValidator.shape.email
15642
+ email: LCNProfileValidator.shape.email,
15643
+ connectedAt: external_exports.iso.datetime().optional().describe("When the viewer and this profile became connected.")
15618
15644
  });
15619
15645
  var LCNVisibleProfileValidator = external_exports.union([
15620
15646
  LCNConnectionProfileValidator.strict(),
@@ -16170,12 +16196,15 @@ var LCNNotificationInboxValidator = external_exports.object({
16170
16196
  }),
16171
16197
  timestamp: external_exports.iso.datetime().optional()
16172
16198
  });
16199
+ var LCNNotificationMetadataValidator = external_exports.object({
16200
+ connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
16201
+ }).catchall(external_exports.unknown());
16173
16202
  var LCNNotificationDataValidator = external_exports.object({
16174
16203
  vcUris: external_exports.array(external_exports.string()).optional(),
16175
16204
  vpUris: external_exports.array(external_exports.string()).optional(),
16176
16205
  transaction: ConsentFlowTransactionValidator.optional(),
16177
16206
  inbox: LCNNotificationInboxValidator.optional(),
16178
- metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
16207
+ metadata: LCNNotificationMetadataValidator.optional()
16179
16208
  }).loose();
16180
16209
  var LCNNotificationValidator = external_exports.object({
16181
16210
  type: LCNNotificationTypeEnumValidator,
@@ -17909,6 +17938,22 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
17909
17938
  await ensureUser();
17910
17939
  return client.profile.acceptConnectionRequest.mutate({ profileId });
17911
17940
  }, "acceptConnectionRequest"),
17941
+ getPendingConnectionPrompts: /* @__PURE__ */ __name(async (_learnCard) => {
17942
+ await ensureUser();
17943
+ return client.profile.pendingConnectionPrompts.query();
17944
+ }, "getPendingConnectionPrompts"),
17945
+ getConnectionPromptStatus: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
17946
+ await ensureUser();
17947
+ return client.profile.connectionPromptStatus.query({ promptId });
17948
+ }, "getConnectionPromptStatus"),
17949
+ skipConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
17950
+ await ensureUser();
17951
+ return client.profile.skipConnectionPrompt.mutate({ promptId });
17952
+ }, "skipConnectionPrompt"),
17953
+ connectWithConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
17954
+ await ensureUser();
17955
+ return client.profile.connectWithConnectionPrompt.mutate({ promptId });
17956
+ }, "connectWithConnectionPrompt"),
17912
17957
  getConnections: /* @__PURE__ */ __name(async (_learnCard) => {
17913
17958
  console.warn(
17914
17959
  "The getConnections method is deprecated! Please use getPaginatedConnections instead!"
@@ -19266,7 +19311,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
19266
19311
  }, "getActivityChain"),
19267
19312
  isServiceTrusted: /* @__PURE__ */ __name(async (_learnCard, serviceDid) => {
19268
19313
  const trustedServices = await client.federation.getTrustedServices.query({});
19269
- return trustedServices.some((s) => s.did === serviceDid);
19314
+ return trustedServices.some(
19315
+ (service) => service.did === serviceDid
19316
+ );
19270
19317
  }, "isServiceTrusted"),
19271
19318
  getTrustedServices: /* @__PURE__ */ __name(async () => {
19272
19319
  return client.federation.getTrustedServices.query({});
@@ -19322,9 +19369,7 @@ var getVerifyBoostPlugin = /* @__PURE__ */ __name(async (learnCard, trustedBoost
19322
19369
  const boostCredential = credential?.boostCredential;
19323
19370
  try {
19324
19371
  if (boostCredential) {
19325
- const verifyBoostCredential = await learnCard.invoke.verifyCredential(
19326
- boostCredential
19327
- );
19372
+ const verifyBoostCredential = await learnCard.invoke.verifyCredential(boostCredential);
19328
19373
  const boostCredentialErrors = verifyBoostCredential.errors ?? [];
19329
19374
  if (verifyBoostCredential.status?.length) {
19330
19375
  verificationCheck.status = [