@learncard/learn-cloud-plugin 2.1.0 → 2.1.2
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/learn-cloud-plugin.cjs.development.js +60 -2
- package/dist/learn-cloud-plugin.cjs.development.js.map +3 -3
- package/dist/learn-cloud-plugin.cjs.production.min.js +17 -17
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-cloud-plugin.esm.js +60 -2
- package/dist/learn-cloud-plugin.esm.js.map +3 -3
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -7370,6 +7370,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7370
7370
|
LCNNotificationValidator: () => LCNNotificationValidator2,
|
|
7371
7371
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum2,
|
|
7372
7372
|
LCNProfileDisplayValidator: () => LCNProfileDisplayValidator2,
|
|
7373
|
+
LCNProfileManagerQueryValidator: () => LCNProfileManagerQueryValidator2,
|
|
7374
|
+
LCNProfileManagerValidator: () => LCNProfileManagerValidator2,
|
|
7373
7375
|
LCNProfileQueryValidator: () => LCNProfileQueryValidator2,
|
|
7374
7376
|
LCNProfileValidator: () => LCNProfileValidator2,
|
|
7375
7377
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator2,
|
|
@@ -7382,6 +7384,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7382
7384
|
PaginatedConsentFlowTransactionsValidator: () => PaginatedConsentFlowTransactionsValidator2,
|
|
7383
7385
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
|
|
7384
7386
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
|
|
7387
|
+
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
|
|
7388
|
+
PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
|
|
7385
7389
|
PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
|
|
7386
7390
|
PaginationOptionsValidator: () => PaginationOptionsValidator2,
|
|
7387
7391
|
PaginationResponseValidator: () => PaginationResponseValidator2,
|
|
@@ -11237,6 +11241,32 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11237
11241
|
"PENDING_REQUEST_RECEIVED",
|
|
11238
11242
|
"NOT_CONNECTED"
|
|
11239
11243
|
]);
|
|
11244
|
+
var LCNProfileManagerValidator2 = mod2.object({
|
|
11245
|
+
id: mod2.string(),
|
|
11246
|
+
created: mod2.string(),
|
|
11247
|
+
displayName: mod2.string().default("").optional(),
|
|
11248
|
+
shortBio: mod2.string().default("").optional(),
|
|
11249
|
+
bio: mod2.string().default("").optional(),
|
|
11250
|
+
email: mod2.string().optional(),
|
|
11251
|
+
image: mod2.string().optional(),
|
|
11252
|
+
heroImage: mod2.string().optional()
|
|
11253
|
+
});
|
|
11254
|
+
var PaginatedLCNProfileManagersValidator2 = PaginationResponseValidator2.extend({
|
|
11255
|
+
records: LCNProfileManagerValidator2.extend({ did: mod2.string() }).array()
|
|
11256
|
+
});
|
|
11257
|
+
var LCNProfileManagerQueryValidator2 = mod2.object({
|
|
11258
|
+
id: StringQuery2,
|
|
11259
|
+
displayName: StringQuery2,
|
|
11260
|
+
shortBio: StringQuery2,
|
|
11261
|
+
bio: StringQuery2,
|
|
11262
|
+
email: StringQuery2
|
|
11263
|
+
}).partial();
|
|
11264
|
+
var PaginatedLCNProfilesAndManagersValidator2 = PaginationResponseValidator2.extend({
|
|
11265
|
+
records: mod2.object({
|
|
11266
|
+
profile: LCNProfileValidator2,
|
|
11267
|
+
manager: LCNProfileManagerValidator2.extend({ did: mod2.string() }).optional()
|
|
11268
|
+
}).array()
|
|
11269
|
+
});
|
|
11240
11270
|
var SentCredentialInfoValidator2 = mod2.object({
|
|
11241
11271
|
uri: mod2.string(),
|
|
11242
11272
|
to: mod2.string(),
|
|
@@ -11255,6 +11285,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11255
11285
|
canEditChildren: mod2.string(),
|
|
11256
11286
|
canRevokeChildren: mod2.string(),
|
|
11257
11287
|
canManageChildrenPermissions: mod2.string(),
|
|
11288
|
+
canManageChildrenProfiles: mod2.boolean().default(false).optional(),
|
|
11258
11289
|
canViewAnalytics: mod2.boolean()
|
|
11259
11290
|
});
|
|
11260
11291
|
var LCNBoostStatus2 = mod2.enum(["DRAFT", "LIVE"]);
|
|
@@ -15288,6 +15319,32 @@ var LCNProfileConnectionStatusEnum = mod.enum([
|
|
|
15288
15319
|
"PENDING_REQUEST_RECEIVED",
|
|
15289
15320
|
"NOT_CONNECTED"
|
|
15290
15321
|
]);
|
|
15322
|
+
var LCNProfileManagerValidator = mod.object({
|
|
15323
|
+
id: mod.string(),
|
|
15324
|
+
created: mod.string(),
|
|
15325
|
+
displayName: mod.string().default("").optional(),
|
|
15326
|
+
shortBio: mod.string().default("").optional(),
|
|
15327
|
+
bio: mod.string().default("").optional(),
|
|
15328
|
+
email: mod.string().optional(),
|
|
15329
|
+
image: mod.string().optional(),
|
|
15330
|
+
heroImage: mod.string().optional()
|
|
15331
|
+
});
|
|
15332
|
+
var PaginatedLCNProfileManagersValidator = PaginationResponseValidator.extend({
|
|
15333
|
+
records: LCNProfileManagerValidator.extend({ did: mod.string() }).array()
|
|
15334
|
+
});
|
|
15335
|
+
var LCNProfileManagerQueryValidator = mod.object({
|
|
15336
|
+
id: StringQuery,
|
|
15337
|
+
displayName: StringQuery,
|
|
15338
|
+
shortBio: StringQuery,
|
|
15339
|
+
bio: StringQuery,
|
|
15340
|
+
email: StringQuery
|
|
15341
|
+
}).partial();
|
|
15342
|
+
var PaginatedLCNProfilesAndManagersValidator = PaginationResponseValidator.extend({
|
|
15343
|
+
records: mod.object({
|
|
15344
|
+
profile: LCNProfileValidator,
|
|
15345
|
+
manager: LCNProfileManagerValidator.extend({ did: mod.string() }).optional()
|
|
15346
|
+
}).array()
|
|
15347
|
+
});
|
|
15291
15348
|
var SentCredentialInfoValidator = mod.object({
|
|
15292
15349
|
uri: mod.string(),
|
|
15293
15350
|
to: mod.string(),
|
|
@@ -15306,6 +15363,7 @@ var BoostPermissionsValidator = mod.object({
|
|
|
15306
15363
|
canEditChildren: mod.string(),
|
|
15307
15364
|
canRevokeChildren: mod.string(),
|
|
15308
15365
|
canManageChildrenPermissions: mod.string(),
|
|
15366
|
+
canManageChildrenProfiles: mod.boolean().default(false).optional(),
|
|
15309
15367
|
canViewAnalytics: mod.boolean()
|
|
15310
15368
|
});
|
|
15311
15369
|
var LCNBoostStatus = mod.enum(["DRAFT", "LIVE"]);
|
|
@@ -15635,7 +15693,7 @@ var getLearnCloudClient = /* @__PURE__ */ __name(async (url, learnCard) => {
|
|
|
15635
15693
|
return jwt;
|
|
15636
15694
|
});
|
|
15637
15695
|
}, "getLearnCloudClient");
|
|
15638
|
-
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = []) => {
|
|
15696
|
+
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = [], automaticallyAssociateDids = true) => {
|
|
15639
15697
|
let learnCard = initialLearnCard;
|
|
15640
15698
|
learnCard.debug?.("Adding LearnCloud Plugin");
|
|
15641
15699
|
let client = await getLearnCloudClient(url, learnCard);
|
|
@@ -15652,7 +15710,7 @@ var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, u
|
|
|
15652
15710
|
const oldDid = learnCard.id.did();
|
|
15653
15711
|
const newDid = _learnCard.id.did();
|
|
15654
15712
|
if (oldDid !== newDid) {
|
|
15655
|
-
if (!dids.includes(newDid)) {
|
|
15713
|
+
if (!dids.includes(newDid) && automaticallyAssociateDids) {
|
|
15656
15714
|
const presentation = await _learnCard.invoke.getDidAuthVp();
|
|
15657
15715
|
await client.user.addDid.mutate({ presentation });
|
|
15658
15716
|
if (newDid.split(":")[1] === "web") {
|