@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
|
@@ -5179,22 +5179,22 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5179
5179
|
repeatIdBackgroundImage: mod2.boolean().optional()
|
|
5180
5180
|
});
|
|
5181
5181
|
var LCNProfileValidator2 = mod2.object({
|
|
5182
|
-
profileId: mod2.string().min(3).max(40),
|
|
5183
|
-
displayName: mod2.string().default(""),
|
|
5184
|
-
shortBio: mod2.string().default(""),
|
|
5185
|
-
bio: mod2.string().default(""),
|
|
5186
|
-
did: mod2.string(),
|
|
5187
|
-
isPrivate: mod2.boolean().optional(),
|
|
5188
|
-
email: mod2.string().optional(),
|
|
5189
|
-
image: mod2.string().optional(),
|
|
5190
|
-
heroImage: mod2.string().optional(),
|
|
5191
|
-
websiteLink: mod2.string().optional(),
|
|
5192
|
-
isServiceProfile: mod2.boolean().default(false).optional(),
|
|
5193
|
-
type: mod2.string().optional(),
|
|
5194
|
-
notificationsWebhook: mod2.string().url().startsWith("http").optional(),
|
|
5195
|
-
display: LCNProfileDisplayValidator2.optional(),
|
|
5196
|
-
role: mod2.string().default("").optional(),
|
|
5197
|
-
dob: mod2.string().default("").optional()
|
|
5182
|
+
profileId: mod2.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
5183
|
+
displayName: mod2.string().default("").describe("Human-readable display name for the profile."),
|
|
5184
|
+
shortBio: mod2.string().default("").describe("Short bio for the profile."),
|
|
5185
|
+
bio: mod2.string().default("").describe("Longer bio for the profile."),
|
|
5186
|
+
did: mod2.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
5187
|
+
isPrivate: mod2.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
5188
|
+
email: mod2.string().optional().describe("Contact email address for the profile."),
|
|
5189
|
+
image: mod2.string().optional().describe("Profile image URL for the profile."),
|
|
5190
|
+
heroImage: mod2.string().optional().describe("Hero image URL for the profile."),
|
|
5191
|
+
websiteLink: mod2.string().optional().describe("Website link for the profile."),
|
|
5192
|
+
isServiceProfile: mod2.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
|
|
5193
|
+
type: mod2.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
|
|
5194
|
+
notificationsWebhook: mod2.string().url().startsWith("http").optional().describe("URL to send notifications to."),
|
|
5195
|
+
display: LCNProfileDisplayValidator2.optional().describe("Display settings for the profile."),
|
|
5196
|
+
role: mod2.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
5197
|
+
dob: mod2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
5198
5198
|
});
|
|
5199
5199
|
var LCNProfileQueryValidator2 = mod2.object({
|
|
5200
5200
|
profileId: StringQuery2,
|
|
@@ -5390,7 +5390,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5390
5390
|
createdAt: mod2.string(),
|
|
5391
5391
|
updatedAt: mod2.string(),
|
|
5392
5392
|
expiresAt: mod2.string().optional(),
|
|
5393
|
-
autoBoosts: mod2.string().array().optional()
|
|
5393
|
+
autoBoosts: mod2.string().array().optional(),
|
|
5394
|
+
writers: mod2.array(LCNProfileValidator2).optional()
|
|
5394
5395
|
});
|
|
5395
5396
|
var PaginatedConsentFlowContractsValidator2 = PaginationResponseValidator2.extend({
|
|
5396
5397
|
records: ConsentFlowContractDetailsValidator2.omit({ owner: true }).array()
|
|
@@ -5431,7 +5432,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5431
5432
|
write: mod2.object({
|
|
5432
5433
|
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).default({}) }).default({}),
|
|
5433
5434
|
personal: mod2.record(mod2.boolean()).default({})
|
|
5434
|
-
}).default({})
|
|
5435
|
+
}).default({}),
|
|
5436
|
+
deniedWriters: mod2.array(mod2.string()).optional()
|
|
5435
5437
|
});
|
|
5436
5438
|
var PaginatedConsentFlowTermsValidator2 = PaginationResponseValidator2.extend({
|
|
5437
5439
|
records: mod2.object({
|
|
@@ -9498,22 +9500,22 @@ var LCNProfileDisplayValidator = mod.object({
|
|
|
9498
9500
|
repeatIdBackgroundImage: mod.boolean().optional()
|
|
9499
9501
|
});
|
|
9500
9502
|
var LCNProfileValidator = mod.object({
|
|
9501
|
-
profileId: mod.string().min(3).max(40),
|
|
9502
|
-
displayName: mod.string().default(""),
|
|
9503
|
-
shortBio: mod.string().default(""),
|
|
9504
|
-
bio: mod.string().default(""),
|
|
9505
|
-
did: mod.string(),
|
|
9506
|
-
isPrivate: mod.boolean().optional(),
|
|
9507
|
-
email: mod.string().optional(),
|
|
9508
|
-
image: mod.string().optional(),
|
|
9509
|
-
heroImage: mod.string().optional(),
|
|
9510
|
-
websiteLink: mod.string().optional(),
|
|
9511
|
-
isServiceProfile: mod.boolean().default(false).optional(),
|
|
9512
|
-
type: mod.string().optional(),
|
|
9513
|
-
notificationsWebhook: mod.string().url().startsWith("http").optional(),
|
|
9514
|
-
display: LCNProfileDisplayValidator.optional(),
|
|
9515
|
-
role: mod.string().default("").optional(),
|
|
9516
|
-
dob: mod.string().default("").optional()
|
|
9503
|
+
profileId: mod.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
9504
|
+
displayName: mod.string().default("").describe("Human-readable display name for the profile."),
|
|
9505
|
+
shortBio: mod.string().default("").describe("Short bio for the profile."),
|
|
9506
|
+
bio: mod.string().default("").describe("Longer bio for the profile."),
|
|
9507
|
+
did: mod.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
9508
|
+
isPrivate: mod.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
9509
|
+
email: mod.string().optional().describe("Contact email address for the profile."),
|
|
9510
|
+
image: mod.string().optional().describe("Profile image URL for the profile."),
|
|
9511
|
+
heroImage: mod.string().optional().describe("Hero image URL for the profile."),
|
|
9512
|
+
websiteLink: mod.string().optional().describe("Website link for the profile."),
|
|
9513
|
+
isServiceProfile: mod.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
|
|
9514
|
+
type: mod.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
|
|
9515
|
+
notificationsWebhook: mod.string().url().startsWith("http").optional().describe("URL to send notifications to."),
|
|
9516
|
+
display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
|
|
9517
|
+
role: mod.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
9518
|
+
dob: mod.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
9517
9519
|
});
|
|
9518
9520
|
var LCNProfileQueryValidator = mod.object({
|
|
9519
9521
|
profileId: StringQuery,
|
|
@@ -9709,7 +9711,8 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9709
9711
|
createdAt: mod.string(),
|
|
9710
9712
|
updatedAt: mod.string(),
|
|
9711
9713
|
expiresAt: mod.string().optional(),
|
|
9712
|
-
autoBoosts: mod.string().array().optional()
|
|
9714
|
+
autoBoosts: mod.string().array().optional(),
|
|
9715
|
+
writers: mod.array(LCNProfileValidator).optional()
|
|
9713
9716
|
});
|
|
9714
9717
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
9715
9718
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
@@ -9750,7 +9753,8 @@ var ConsentFlowTermsValidator = mod.object({
|
|
|
9750
9753
|
write: mod.object({
|
|
9751
9754
|
credentials: mod.object({ categories: mod.record(mod.boolean()).default({}) }).default({}),
|
|
9752
9755
|
personal: mod.record(mod.boolean()).default({})
|
|
9753
|
-
}).default({})
|
|
9756
|
+
}).default({}),
|
|
9757
|
+
deniedWriters: mod.array(mod.string()).optional()
|
|
9754
9758
|
});
|
|
9755
9759
|
var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
|
|
9756
9760
|
records: mod.object({
|
|
@@ -10496,6 +10500,19 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10496
10500
|
throw new Error("Please make an account first!");
|
|
10497
10501
|
return client.contracts.createConsentFlowContract.mutate(contract);
|
|
10498
10502
|
},
|
|
10503
|
+
addAutoBoostsToContract: async (_learnCard, contractUri, autoboosts) => {
|
|
10504
|
+
if (!userData)
|
|
10505
|
+
throw new Error("Please make an account first!");
|
|
10506
|
+
return client.contracts.addAutoBoostsToContract.mutate({ contractUri, autoboosts });
|
|
10507
|
+
},
|
|
10508
|
+
removeAutoBoostsFromContract: async (_learnCard, contractUri, boostUris) => {
|
|
10509
|
+
if (!userData)
|
|
10510
|
+
throw new Error("Please make an account first!");
|
|
10511
|
+
return client.contracts.removeAutoBoostsFromContract.mutate({
|
|
10512
|
+
contractUri,
|
|
10513
|
+
boostUris
|
|
10514
|
+
});
|
|
10515
|
+
},
|
|
10499
10516
|
getContract: async (_learnCard, uri) => {
|
|
10500
10517
|
return client.contracts.getConsentFlowContract.query({ uri });
|
|
10501
10518
|
},
|