@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
|
@@ -11362,6 +11362,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11362
11362
|
reasonForAccessing: mod2.string().optional(),
|
|
11363
11363
|
image: mod2.string().optional(),
|
|
11364
11364
|
uri: mod2.string(),
|
|
11365
|
+
needsGuardianConsent: mod2.boolean().optional(),
|
|
11365
11366
|
createdAt: mod2.string(),
|
|
11366
11367
|
updatedAt: mod2.string(),
|
|
11367
11368
|
expiresAt: mod2.string().optional()
|
|
@@ -15440,6 +15441,7 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
15440
15441
|
reasonForAccessing: mod.string().optional(),
|
|
15441
15442
|
image: mod.string().optional(),
|
|
15442
15443
|
uri: mod.string(),
|
|
15444
|
+
needsGuardianConsent: mod.boolean().optional(),
|
|
15443
15445
|
createdAt: mod.string(),
|
|
15444
15446
|
updatedAt: mod.string(),
|
|
15445
15447
|
expiresAt: mod.string().optional()
|
|
@@ -15693,7 +15695,7 @@ var getLearnCloudClient = /* @__PURE__ */ __name(async (url, learnCard) => {
|
|
|
15693
15695
|
return jwt;
|
|
15694
15696
|
});
|
|
15695
15697
|
}, "getLearnCloudClient");
|
|
15696
|
-
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = []) => {
|
|
15698
|
+
var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, unencryptedFields = [], unencryptedCustomFields = [], automaticallyAssociateDids = true) => {
|
|
15697
15699
|
let learnCard = initialLearnCard;
|
|
15698
15700
|
learnCard.debug?.("Adding LearnCloud Plugin");
|
|
15699
15701
|
let client = await getLearnCloudClient(url, learnCard);
|
|
@@ -15710,7 +15712,7 @@ var getLearnCloudPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url, u
|
|
|
15710
15712
|
const oldDid = learnCard.id.did();
|
|
15711
15713
|
const newDid = _learnCard.id.did();
|
|
15712
15714
|
if (oldDid !== newDid) {
|
|
15713
|
-
if (!dids.includes(newDid)) {
|
|
15715
|
+
if (!dids.includes(newDid) && automaticallyAssociateDids) {
|
|
15714
15716
|
const presentation = await _learnCard.invoke.getDidAuthVp();
|
|
15715
15717
|
await client.user.addDid.mutate({ presentation });
|
|
15716
15718
|
if (newDid.split(":")[1] === "web") {
|