@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
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -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,
|
|
@@ -16170,12 +16195,15 @@ var LCNNotificationInboxValidator = external_exports.object({
|
|
|
16170
16195
|
}),
|
|
16171
16196
|
timestamp: external_exports.iso.datetime().optional()
|
|
16172
16197
|
});
|
|
16198
|
+
var LCNNotificationMetadataValidator = external_exports.object({
|
|
16199
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
16200
|
+
}).catchall(external_exports.unknown());
|
|
16173
16201
|
var LCNNotificationDataValidator = external_exports.object({
|
|
16174
16202
|
vcUris: external_exports.array(external_exports.string()).optional(),
|
|
16175
16203
|
vpUris: external_exports.array(external_exports.string()).optional(),
|
|
16176
16204
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
16177
16205
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
16178
|
-
metadata:
|
|
16206
|
+
metadata: LCNNotificationMetadataValidator.optional()
|
|
16179
16207
|
}).loose();
|
|
16180
16208
|
var LCNNotificationValidator = external_exports.object({
|
|
16181
16209
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -17909,6 +17937,22 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
|
|
|
17909
17937
|
await ensureUser();
|
|
17910
17938
|
return client.profile.acceptConnectionRequest.mutate({ profileId });
|
|
17911
17939
|
}, "acceptConnectionRequest"),
|
|
17940
|
+
getPendingConnectionPrompts: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
17941
|
+
await ensureUser();
|
|
17942
|
+
return client.profile.pendingConnectionPrompts.query();
|
|
17943
|
+
}, "getPendingConnectionPrompts"),
|
|
17944
|
+
getConnectionPromptStatus: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17945
|
+
await ensureUser();
|
|
17946
|
+
return client.profile.connectionPromptStatus.query({ promptId });
|
|
17947
|
+
}, "getConnectionPromptStatus"),
|
|
17948
|
+
skipConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17949
|
+
await ensureUser();
|
|
17950
|
+
return client.profile.skipConnectionPrompt.mutate({ promptId });
|
|
17951
|
+
}, "skipConnectionPrompt"),
|
|
17952
|
+
connectWithConnectionPrompt: /* @__PURE__ */ __name(async (_learnCard, promptId) => {
|
|
17953
|
+
await ensureUser();
|
|
17954
|
+
return client.profile.connectWithConnectionPrompt.mutate({ promptId });
|
|
17955
|
+
}, "connectWithConnectionPrompt"),
|
|
17912
17956
|
getConnections: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
17913
17957
|
console.warn(
|
|
17914
17958
|
"The getConnections method is deprecated! Please use getPaginatedConnections instead!"
|