@learncard/network-plugin 2.4.29 → 2.4.31
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 +53 -36
- 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 +53 -36
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -5154,22 +5154,22 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5154
5154
|
repeatIdBackgroundImage: mod2.boolean().optional()
|
|
5155
5155
|
});
|
|
5156
5156
|
var LCNProfileValidator2 = mod2.object({
|
|
5157
|
-
profileId: mod2.string().min(3).max(40),
|
|
5158
|
-
displayName: mod2.string().default(""),
|
|
5159
|
-
shortBio: mod2.string().default(""),
|
|
5160
|
-
bio: mod2.string().default(""),
|
|
5161
|
-
did: mod2.string(),
|
|
5162
|
-
isPrivate: mod2.boolean().optional(),
|
|
5163
|
-
email: mod2.string().optional(),
|
|
5164
|
-
image: mod2.string().optional(),
|
|
5165
|
-
heroImage: mod2.string().optional(),
|
|
5166
|
-
websiteLink: mod2.string().optional(),
|
|
5167
|
-
isServiceProfile: mod2.boolean().default(false).optional(),
|
|
5168
|
-
type: mod2.string().optional(),
|
|
5169
|
-
notificationsWebhook: mod2.string().url().startsWith("http").optional(),
|
|
5170
|
-
display: LCNProfileDisplayValidator2.optional(),
|
|
5171
|
-
role: mod2.string().default("").optional(),
|
|
5172
|
-
dob: mod2.string().default("").optional()
|
|
5157
|
+
profileId: mod2.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
5158
|
+
displayName: mod2.string().default("").describe("Human-readable display name for the profile."),
|
|
5159
|
+
shortBio: mod2.string().default("").describe("Short bio for the profile."),
|
|
5160
|
+
bio: mod2.string().default("").describe("Longer bio for the profile."),
|
|
5161
|
+
did: mod2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
5162
|
+
isPrivate: mod2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
5163
|
+
email: mod2.string().optional().describe("Contact email address for the profile."),
|
|
5164
|
+
image: mod2.string().optional().describe("Profile image URL for the profile."),
|
|
5165
|
+
heroImage: mod2.string().optional().describe("Hero image URL for the profile."),
|
|
5166
|
+
websiteLink: mod2.string().optional().describe("Website link for the profile."),
|
|
5167
|
+
isServiceProfile: mod2.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
|
|
5168
|
+
type: mod2.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
|
|
5169
|
+
notificationsWebhook: mod2.string().url().startsWith("http").optional().describe("URL to send notifications to."),
|
|
5170
|
+
display: LCNProfileDisplayValidator2.optional().describe("Display settings for the profile."),
|
|
5171
|
+
role: mod2.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
5172
|
+
dob: mod2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
5173
5173
|
});
|
|
5174
5174
|
var LCNProfileQueryValidator2 = mod2.object({
|
|
5175
5175
|
profileId: StringQuery2,
|
|
@@ -5365,7 +5365,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5365
5365
|
createdAt: mod2.string(),
|
|
5366
5366
|
updatedAt: mod2.string(),
|
|
5367
5367
|
expiresAt: mod2.string().optional(),
|
|
5368
|
-
autoBoosts: mod2.string().array().optional()
|
|
5368
|
+
autoBoosts: mod2.string().array().optional(),
|
|
5369
|
+
writers: mod2.array(LCNProfileValidator2).optional()
|
|
5369
5370
|
});
|
|
5370
5371
|
var PaginatedConsentFlowContractsValidator2 = PaginationResponseValidator2.extend({
|
|
5371
5372
|
records: ConsentFlowContractDetailsValidator2.omit({ owner: true }).array()
|
|
@@ -5406,7 +5407,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5406
5407
|
write: mod2.object({
|
|
5407
5408
|
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).default({}) }).default({}),
|
|
5408
5409
|
personal: mod2.record(mod2.boolean()).default({})
|
|
5409
|
-
}).default({})
|
|
5410
|
+
}).default({}),
|
|
5411
|
+
deniedWriters: mod2.array(mod2.string()).optional()
|
|
5410
5412
|
});
|
|
5411
5413
|
var PaginatedConsentFlowTermsValidator2 = PaginationResponseValidator2.extend({
|
|
5412
5414
|
records: mod2.object({
|
|
@@ -9473,22 +9475,22 @@ var LCNProfileDisplayValidator = mod.object({
|
|
|
9473
9475
|
repeatIdBackgroundImage: mod.boolean().optional()
|
|
9474
9476
|
});
|
|
9475
9477
|
var LCNProfileValidator = mod.object({
|
|
9476
|
-
profileId: mod.string().min(3).max(40),
|
|
9477
|
-
displayName: mod.string().default(""),
|
|
9478
|
-
shortBio: mod.string().default(""),
|
|
9479
|
-
bio: mod.string().default(""),
|
|
9480
|
-
did: mod.string(),
|
|
9481
|
-
isPrivate: mod.boolean().optional(),
|
|
9482
|
-
email: mod.string().optional(),
|
|
9483
|
-
image: mod.string().optional(),
|
|
9484
|
-
heroImage: mod.string().optional(),
|
|
9485
|
-
websiteLink: mod.string().optional(),
|
|
9486
|
-
isServiceProfile: mod.boolean().default(false).optional(),
|
|
9487
|
-
type: mod.string().optional(),
|
|
9488
|
-
notificationsWebhook: mod.string().url().startsWith("http").optional(),
|
|
9489
|
-
display: LCNProfileDisplayValidator.optional(),
|
|
9490
|
-
role: mod.string().default("").optional(),
|
|
9491
|
-
dob: mod.string().default("").optional()
|
|
9478
|
+
profileId: mod.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
9479
|
+
displayName: mod.string().default("").describe("Human-readable display name for the profile."),
|
|
9480
|
+
shortBio: mod.string().default("").describe("Short bio for the profile."),
|
|
9481
|
+
bio: mod.string().default("").describe("Longer bio for the profile."),
|
|
9482
|
+
did: mod.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
9483
|
+
isPrivate: mod.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
9484
|
+
email: mod.string().optional().describe("Contact email address for the profile."),
|
|
9485
|
+
image: mod.string().optional().describe("Profile image URL for the profile."),
|
|
9486
|
+
heroImage: mod.string().optional().describe("Hero image URL for the profile."),
|
|
9487
|
+
websiteLink: mod.string().optional().describe("Website link for the profile."),
|
|
9488
|
+
isServiceProfile: mod.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
|
|
9489
|
+
type: mod.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
|
|
9490
|
+
notificationsWebhook: mod.string().url().startsWith("http").optional().describe("URL to send notifications to."),
|
|
9491
|
+
display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
|
|
9492
|
+
role: mod.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
9493
|
+
dob: mod.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
9492
9494
|
});
|
|
9493
9495
|
var LCNProfileQueryValidator = mod.object({
|
|
9494
9496
|
profileId: StringQuery,
|
|
@@ -9684,7 +9686,8 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9684
9686
|
createdAt: mod.string(),
|
|
9685
9687
|
updatedAt: mod.string(),
|
|
9686
9688
|
expiresAt: mod.string().optional(),
|
|
9687
|
-
autoBoosts: mod.string().array().optional()
|
|
9689
|
+
autoBoosts: mod.string().array().optional(),
|
|
9690
|
+
writers: mod.array(LCNProfileValidator).optional()
|
|
9688
9691
|
});
|
|
9689
9692
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
9690
9693
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
@@ -9725,7 +9728,8 @@ var ConsentFlowTermsValidator = mod.object({
|
|
|
9725
9728
|
write: mod.object({
|
|
9726
9729
|
credentials: mod.object({ categories: mod.record(mod.boolean()).default({}) }).default({}),
|
|
9727
9730
|
personal: mod.record(mod.boolean()).default({})
|
|
9728
|
-
}).default({})
|
|
9731
|
+
}).default({}),
|
|
9732
|
+
deniedWriters: mod.array(mod.string()).optional()
|
|
9729
9733
|
});
|
|
9730
9734
|
var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
|
9731
9735
|
records: mod.object({
|
|
@@ -10471,6 +10475,19 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10471
10475
|
throw new Error("Please make an account first!");
|
|
10472
10476
|
return client.contracts.createConsentFlowContract.mutate(contract);
|
|
10473
10477
|
},
|
|
10478
|
+
addAutoBoostsToContract: async (_learnCard, contractUri, autoboosts) => {
|
|
10479
|
+
if (!userData)
|
|
10480
|
+
throw new Error("Please make an account first!");
|
|
10481
|
+
return client.contracts.addAutoBoostsToContract.mutate({ contractUri, autoboosts });
|
|
10482
|
+
},
|
|
10483
|
+
removeAutoBoostsFromContract: async (_learnCard, contractUri, boostUris) => {
|
|
10484
|
+
if (!userData)
|
|
10485
|
+
throw new Error("Please make an account first!");
|
|
10486
|
+
return client.contracts.removeAutoBoostsFromContract.mutate({
|
|
10487
|
+
contractUri,
|
|
10488
|
+
boostUris
|
|
10489
|
+
});
|
|
10490
|
+
},
|
|
10474
10491
|
getContract: async (_learnCard, uri) => {
|
|
10475
10492
|
return client.contracts.getConsentFlowContract.query({ uri });
|
|
10476
10493
|
},
|