@learncard/network-plugin 2.0.1 → 2.1.0
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.js +65 -0
- package/dist/lcn-plugin.cjs.development.js.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.js +2 -2
- package/dist/lcn-plugin.cjs.production.min.js.map +3 -3
- package/dist/lcn-plugin.esm.js +65 -0
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +28 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -4990,6 +4990,19 @@ var LCNBoostClaimLinkOptionsValidator = mod.object({
|
|
|
4990
4990
|
ttlSeconds: mod.number().optional(),
|
|
4991
4991
|
totalUses: mod.number().optional()
|
|
4992
4992
|
});
|
|
4993
|
+
var BoostPermissionsValidator = mod.object({
|
|
4994
|
+
role: mod.string(),
|
|
4995
|
+
canEdit: mod.boolean(),
|
|
4996
|
+
canIssue: mod.boolean(),
|
|
4997
|
+
canRevoke: mod.boolean(),
|
|
4998
|
+
canManagePermissions: mod.boolean(),
|
|
4999
|
+
canIssueChildren: mod.string(),
|
|
5000
|
+
canCreateChildren: mod.string(),
|
|
5001
|
+
canEditChildren: mod.string(),
|
|
5002
|
+
canRevokeChildren: mod.string(),
|
|
5003
|
+
canManageChildrenPermissions: mod.string(),
|
|
5004
|
+
canViewAnalytics: mod.boolean()
|
|
5005
|
+
});
|
|
4993
5006
|
var LCNSigningAuthorityValidator = mod.object({
|
|
4994
5007
|
endpoint: mod.string()
|
|
4995
5008
|
});
|
|
@@ -5456,6 +5469,14 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
5456
5469
|
throw new Error("Please make an account first!");
|
|
5457
5470
|
return client.boost.createBoost.mutate({ credential, ...metadata });
|
|
5458
5471
|
},
|
|
5472
|
+
createChildBoost: async (_learnCard, parentUri, credential, metadata) => {
|
|
5473
|
+
if (!userData)
|
|
5474
|
+
throw new Error("Please make an account first!");
|
|
5475
|
+
return client.boost.createChildBoost.mutate({
|
|
5476
|
+
parentUri,
|
|
5477
|
+
boost: { credential, ...metadata }
|
|
5478
|
+
});
|
|
5479
|
+
},
|
|
5459
5480
|
getBoost: async (_learnCard, uri) => {
|
|
5460
5481
|
if (!userData)
|
|
5461
5482
|
throw new Error("Please make an account first!");
|
|
@@ -5479,6 +5500,36 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
5479
5500
|
throw new Error("Please make an account first!");
|
|
5480
5501
|
return client.boost.getPaginatedBoosts.query(options);
|
|
5481
5502
|
},
|
|
5503
|
+
getBoostChildren: async (_learnCard, uri, options) => {
|
|
5504
|
+
if (!userData)
|
|
5505
|
+
throw new Error("Please make an account first!");
|
|
5506
|
+
return client.boost.getBoostChildren.query({ uri, ...options });
|
|
5507
|
+
},
|
|
5508
|
+
countBoostChildren: async (_learnCard, uri, options) => {
|
|
5509
|
+
if (!userData)
|
|
5510
|
+
throw new Error("Please make an account first!");
|
|
5511
|
+
return client.boost.countBoostChildren.query({ uri, ...options });
|
|
5512
|
+
},
|
|
5513
|
+
getBoostParents: async (_learnCard, uri, options) => {
|
|
5514
|
+
if (!userData)
|
|
5515
|
+
throw new Error("Please make an account first!");
|
|
5516
|
+
return client.boost.getBoostParents.query({ uri, ...options });
|
|
5517
|
+
},
|
|
5518
|
+
countBoostParents: async (_learnCard, uri, options) => {
|
|
5519
|
+
if (!userData)
|
|
5520
|
+
throw new Error("Please make an account first!");
|
|
5521
|
+
return client.boost.countBoostParents.query({ uri, ...options });
|
|
5522
|
+
},
|
|
5523
|
+
makeBoostParent: async (_learnCard, uris) => {
|
|
5524
|
+
if (!userData)
|
|
5525
|
+
throw new Error("Please make an account first!");
|
|
5526
|
+
return client.boost.makeBoostParent.mutate(uris);
|
|
5527
|
+
},
|
|
5528
|
+
removeBoostParent: async (_learnCard, uris) => {
|
|
5529
|
+
if (!userData)
|
|
5530
|
+
throw new Error("Please make an account first!");
|
|
5531
|
+
return client.boost.removeBoostParent.mutate(uris);
|
|
5532
|
+
},
|
|
5482
5533
|
getBoostRecipients: async (_learnCard, uri, limit = 25, skip = void 0, includeUnacceptedBoosts = true) => {
|
|
5483
5534
|
console.warn(
|
|
5484
5535
|
"The getBoostRecipients method is deprecated! Please use getPaginatedBoostRecipients instead!"
|
|
@@ -5520,6 +5571,20 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
5520
5571
|
throw new Error("Please make an account first!");
|
|
5521
5572
|
return client.boost.getBoostAdmins.query({ uri, ...options });
|
|
5522
5573
|
},
|
|
5574
|
+
getBoostPermissions: async (_learnCard, uri, profileId) => {
|
|
5575
|
+
if (!userData)
|
|
5576
|
+
throw new Error("Please make an account first!");
|
|
5577
|
+
if (!profileId)
|
|
5578
|
+
return client.boost.getBoostPermissions.query({ uri });
|
|
5579
|
+
return client.boost.getOtherBoostPermissions.query({ uri, profileId });
|
|
5580
|
+
},
|
|
5581
|
+
updateBoostPermissions: async (_learnCard, uri, updates, profileId) => {
|
|
5582
|
+
if (!userData)
|
|
5583
|
+
throw new Error("Please make an account first!");
|
|
5584
|
+
if (!profileId)
|
|
5585
|
+
return client.boost.updateBoostPermissions.query({ uri, updates });
|
|
5586
|
+
return client.boost.updateOtherBoostPermissions.query({ uri, profileId, updates });
|
|
5587
|
+
},
|
|
5523
5588
|
addBoostAdmin: async (_learnCard, uri, profileId) => {
|
|
5524
5589
|
if (!userData)
|
|
5525
5590
|
throw new Error("Please make an account first!");
|