@learncard/network-plugin 2.13.13 → 2.13.15
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/lcn-plugin.cjs.development.cjs +45 -1
- package/dist/lcn-plugin.cjs.development.cjs.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.cjs +7 -7
- package/dist/lcn-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/lcn-plugin.esm.js +45 -1
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -15
- package/src/plugin.ts +20 -0
- package/src/test/index.test.ts +132 -14
- package/src/types.ts +6 -0
|
@@ -15627,6 +15627,31 @@ var LCNPublicProfileValidator = LCNProfileValidator.pick({
|
|
|
15627
15627
|
isServiceProfile: true,
|
|
15628
15628
|
display: true
|
|
15629
15629
|
});
|
|
15630
|
+
var LCNConnectionPromptStatusValidator = external_exports.enum(["PENDING", "SKIPPED", "CONNECTED"]);
|
|
15631
|
+
var LCNConnectionPromptSurfaceValidator = external_exports.enum(["POST_CLAIM", "NOTIFICATION"]);
|
|
15632
|
+
var LCNConnectionPromptActionStatusValidator = external_exports.enum([
|
|
15633
|
+
"PENDING",
|
|
15634
|
+
"SKIPPED",
|
|
15635
|
+
"CONNECTED",
|
|
15636
|
+
"STALE"
|
|
15637
|
+
]);
|
|
15638
|
+
var LCNConnectionPromptValidator = external_exports.object({
|
|
15639
|
+
promptId: external_exports.string().uuid(),
|
|
15640
|
+
status: LCNConnectionPromptStatusValidator,
|
|
15641
|
+
surface: LCNConnectionPromptSurfaceValidator,
|
|
15642
|
+
triggerId: external_exports.string(),
|
|
15643
|
+
triggeredAt: external_exports.iso.datetime(),
|
|
15644
|
+
updatedAt: external_exports.iso.datetime(),
|
|
15645
|
+
counterpart: LCNPublicProfileValidator
|
|
15646
|
+
});
|
|
15647
|
+
var LCNConnectionPromptActionResultValidator = external_exports.object({
|
|
15648
|
+
promptId: external_exports.string().uuid(),
|
|
15649
|
+
status: LCNConnectionPromptActionStatusValidator
|
|
15650
|
+
});
|
|
15651
|
+
var LCNConnectionPromptMetadataValidator = external_exports.object({
|
|
15652
|
+
promptId: external_exports.string().uuid(),
|
|
15653
|
+
counterpartProfileId: external_exports.string()
|
|
15654
|
+
});
|
|
15630
15655
|
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
15631
15656
|
bio: LCNProfileValidator.shape.bio,
|
|
15632
15657
|
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
@@ -16191,12 +16216,15 @@ var LCNNotificationInboxValidator = external_exports.object({
|
|
|
16191
16216
|
}),
|
|
16192
16217
|
timestamp: external_exports.iso.datetime().optional()
|
|
16193
16218
|
});
|
|
16219
|
+
var LCNNotificationMetadataValidator = external_exports.object({
|
|
16220
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
16221
|
+
}).catchall(external_exports.unknown());
|
|
16194
16222
|
var LCNNotificationDataValidator = external_exports.object({
|
|
16195
16223
|
vcUris: external_exports.array(external_exports.string()).optional(),
|
|
16196
16224
|
vpUris: external_exports.array(external_exports.string()).optional(),
|
|
16197
16225
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
16198
16226
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
16199
|
-
metadata:
|
|
16227
|
+
metadata: LCNNotificationMetadataValidator.optional()
|
|
16200
16228
|
}).loose();
|
|
16201
16229
|
var LCNNotificationValidator = external_exports.object({
|
|
16202
16230
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -17926,6 +17954,22 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
|
|
|
17926
17954
|
await ensureUser();
|
|
17927
17955
|
return client.profile.acceptConnectionRequest.mutate({ profileId });
|
|
17928
17956
|
}, "acceptConnectionRequest"),
|
|
17957
|
+
getPendingConnectionPrompts: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
17958
|
+
await ensureUser();
|
|
17959
|
+
return client.profile.pendingConnectionPrompts.query();
|
|
17960
|
+
}, "getPendingConnectionPrompts"),
|
|
17961
|
+
getConnectionPromptStatus: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17962
|
+
await ensureUser();
|
|
17963
|
+
return client.profile.connectionPromptStatus.query({ promptId });
|
|
17964
|
+
}, "getConnectionPromptStatus"),
|
|
17965
|
+
skipConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17966
|
+
await ensureUser();
|
|
17967
|
+
return client.profile.skipConnectionPrompt.mutate({ promptId });
|
|
17968
|
+
}, "skipConnectionPrompt"),
|
|
17969
|
+
connectWithConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17970
|
+
await ensureUser();
|
|
17971
|
+
return client.profile.connectWithConnectionPrompt.mutate({ promptId });
|
|
17972
|
+
}, "connectWithConnectionPrompt"),
|
|
17929
17973
|
getConnections: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
17930
17974
|
console.warn(
|
|
17931
17975
|
"The getConnections method is deprecated! Please use getPaginatedConnections instead!"
|