@learncard/learn-cloud-plugin 2.1.1 → 2.1.3
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 +4 -2
- package/dist/learn-cloud-plugin.cjs.development.js.map +2 -2
- package/dist/learn-cloud-plugin.cjs.production.min.js +14 -14
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-cloud-plugin.esm.js +4 -2
- package/dist/learn-cloud-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -11375,6 +11375,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11375
11375
|
reasonForAccessing: mod2.string().optional(),
|
|
11376
11376
|
image: mod2.string().optional(),
|
|
11377
11377
|
uri: mod2.string(),
|
|
11378
|
+
needsGuardianConsent: mod2.boolean().optional(),
|
|
11378
11379
|
createdAt: mod2.string(),
|
|
11379
11380
|
updatedAt: mod2.string(),
|
|
11380
11381
|
expiresAt: mod2.string().optional()
|
|
@@ -15453,6 +15454,7 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
15453
15454
|
reasonForAccessing: mod.string().optional(),
|
|
15454
15455
|
image: mod.string().optional(),
|
|
15455
15456
|
uri: mod.string(),
|
|
15457
|
+
needsGuardianConsent: mod.boolean().optional(),
|
|
15456
15458
|
createdAt: mod.string(),
|
|
15457
15459
|
updatedAt: mod.string(),
|
|
15458
15460
|
expiresAt: mod.string().optional()
|
|
@@ -15706,7 +15708,7 @@ var getLearnCloudClient = /* @__PURE__ */ __name(async (url, learnCard) => {
|
|
|
15706
15708
|
return jwt;
|
|
15707
15709
|
});
|
|
15708
15710
|
}, "getLearnCloudClient");
|
|
15709
|
-
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = []) => {
|
|
15711
|
+
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = [], automaticallyAssociateDids = true) => {
|
|
15710
15712
|
let learnCard = initialLearnCard;
|
|
15711
15713
|
learnCard.debug?.("Adding LearnCloud Plugin");
|
|
15712
15714
|
let client = await getLearnCloudClient(url, learnCard);
|
|
@@ -15723,7 +15725,7 @@ var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, u
|
|
|
15723
15725
|
const oldDid = learnCard.id.did();
|
|
15724
15726
|
const newDid = _learnCard.id.did();
|
|
15725
15727
|
if (oldDid !== newDid) {
|
|
15726
|
-
if (!dids.includes(newDid)) {
|
|
15728
|
+
if (!dids.includes(newDid) && automaticallyAssociateDids) {
|
|
15727
15729
|
const presentation = await _learnCard.invoke.getDidAuthVp();
|
|
15728
15730
|
await client.user.addDid.mutate({ presentation });
|
|
15729
15731
|
if (newDid.split(":")[1] === "web") {
|