@learncard/network-plugin 2.10.8 → 2.10.12
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 +231 -148
- package/dist/lcn-plugin.cjs.development.js.map +3 -3
- package/dist/lcn-plugin.cjs.production.min.js +16 -16
- package/dist/lcn-plugin.cjs.production.min.js.map +3 -3
- package/dist/lcn-plugin.esm.js +231 -148
- package/dist/lcn-plugin.esm.js.map +3 -3
- package/dist/plugin.d.ts +7 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -551,10 +551,10 @@ function $constructor(name, initializer3, params) {
|
|
|
551
551
|
let Definition = _Definition;
|
|
552
552
|
Object.defineProperty(Definition, "name", { value: name });
|
|
553
553
|
function _(def) {
|
|
554
|
-
var
|
|
554
|
+
var _a3;
|
|
555
555
|
const inst = params?.Parent ? new Definition() : this;
|
|
556
556
|
init(inst, def);
|
|
557
|
-
(
|
|
557
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
558
558
|
for (const fn of inst._zod.deferred) {
|
|
559
559
|
fn();
|
|
560
560
|
}
|
|
@@ -1180,8 +1180,8 @@ function aborted(x, startIndex = 0) {
|
|
|
1180
1180
|
__name(aborted, "aborted");
|
|
1181
1181
|
function prefixIssues(path, issues) {
|
|
1182
1182
|
return issues.map((iss) => {
|
|
1183
|
-
var
|
|
1184
|
-
(
|
|
1183
|
+
var _a3;
|
|
1184
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1185
1185
|
iss.path.unshift(path);
|
|
1186
1186
|
return iss;
|
|
1187
1187
|
});
|
|
@@ -1362,7 +1362,7 @@ __name(formatError, "formatError");
|
|
|
1362
1362
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
1363
1363
|
const result = { errors: [] };
|
|
1364
1364
|
const processError = /* @__PURE__ */ __name((error47, path = []) => {
|
|
1365
|
-
var
|
|
1365
|
+
var _a3, _b;
|
|
1366
1366
|
for (const issue2 of error47.issues) {
|
|
1367
1367
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1368
1368
|
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
@@ -1383,7 +1383,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1383
1383
|
const terminal = i === fullpath.length - 1;
|
|
1384
1384
|
if (typeof el === "string") {
|
|
1385
1385
|
curr.properties ?? (curr.properties = {});
|
|
1386
|
-
(
|
|
1386
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1387
1387
|
curr = curr.properties[el];
|
|
1388
1388
|
} else {
|
|
1389
1389
|
curr.items ?? (curr.items = []);
|
|
@@ -1686,10 +1686,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1686
1686
|
|
|
1687
1687
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/checks.js
|
|
1688
1688
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1689
|
-
var
|
|
1689
|
+
var _a3;
|
|
1690
1690
|
inst._zod ?? (inst._zod = {});
|
|
1691
1691
|
inst._zod.def = def;
|
|
1692
|
-
(
|
|
1692
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1693
1693
|
});
|
|
1694
1694
|
var numericOriginMap = {
|
|
1695
1695
|
number: "number",
|
|
@@ -1755,8 +1755,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1755
1755
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1756
1756
|
$ZodCheck.init(inst, def);
|
|
1757
1757
|
inst._zod.onattach.push((inst2) => {
|
|
1758
|
-
var
|
|
1759
|
-
(
|
|
1758
|
+
var _a3;
|
|
1759
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1760
1760
|
});
|
|
1761
1761
|
inst._zod.check = (payload) => {
|
|
1762
1762
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1883,9 +1883,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1883
1883
|
};
|
|
1884
1884
|
});
|
|
1885
1885
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1886
|
-
var
|
|
1886
|
+
var _a3;
|
|
1887
1887
|
$ZodCheck.init(inst, def);
|
|
1888
|
-
(
|
|
1888
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1889
1889
|
const val = payload.value;
|
|
1890
1890
|
return !nullish(val) && val.size !== void 0;
|
|
1891
1891
|
});
|
|
@@ -1911,9 +1911,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1911
1911
|
};
|
|
1912
1912
|
});
|
|
1913
1913
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1914
|
-
var
|
|
1914
|
+
var _a3;
|
|
1915
1915
|
$ZodCheck.init(inst, def);
|
|
1916
|
-
(
|
|
1916
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1917
1917
|
const val = payload.value;
|
|
1918
1918
|
return !nullish(val) && val.size !== void 0;
|
|
1919
1919
|
});
|
|
@@ -1939,9 +1939,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1939
1939
|
};
|
|
1940
1940
|
});
|
|
1941
1941
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1942
|
-
var
|
|
1942
|
+
var _a3;
|
|
1943
1943
|
$ZodCheck.init(inst, def);
|
|
1944
|
-
(
|
|
1944
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1945
1945
|
const val = payload.value;
|
|
1946
1946
|
return !nullish(val) && val.size !== void 0;
|
|
1947
1947
|
});
|
|
@@ -1969,9 +1969,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1969
1969
|
};
|
|
1970
1970
|
});
|
|
1971
1971
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1972
|
-
var
|
|
1972
|
+
var _a3;
|
|
1973
1973
|
$ZodCheck.init(inst, def);
|
|
1974
|
-
(
|
|
1974
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1975
1975
|
const val = payload.value;
|
|
1976
1976
|
return !nullish(val) && val.length !== void 0;
|
|
1977
1977
|
});
|
|
@@ -1998,9 +1998,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
1998
1998
|
};
|
|
1999
1999
|
});
|
|
2000
2000
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2001
|
-
var
|
|
2001
|
+
var _a3;
|
|
2002
2002
|
$ZodCheck.init(inst, def);
|
|
2003
|
-
(
|
|
2003
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2004
2004
|
const val = payload.value;
|
|
2005
2005
|
return !nullish(val) && val.length !== void 0;
|
|
2006
2006
|
});
|
|
@@ -2027,9 +2027,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2027
2027
|
};
|
|
2028
2028
|
});
|
|
2029
2029
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2030
|
-
var
|
|
2030
|
+
var _a3;
|
|
2031
2031
|
$ZodCheck.init(inst, def);
|
|
2032
|
-
(
|
|
2032
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2033
2033
|
const val = payload.value;
|
|
2034
2034
|
return !nullish(val) && val.length !== void 0;
|
|
2035
2035
|
});
|
|
@@ -2058,7 +2058,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2058
2058
|
};
|
|
2059
2059
|
});
|
|
2060
2060
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2061
|
-
var
|
|
2061
|
+
var _a3, _b;
|
|
2062
2062
|
$ZodCheck.init(inst, def);
|
|
2063
2063
|
inst._zod.onattach.push((inst2) => {
|
|
2064
2064
|
const bag = inst2._zod.bag;
|
|
@@ -2069,7 +2069,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2069
2069
|
}
|
|
2070
2070
|
});
|
|
2071
2071
|
if (def.pattern)
|
|
2072
|
-
(
|
|
2072
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2073
2073
|
def.pattern.lastIndex = 0;
|
|
2074
2074
|
if (def.pattern.test(payload.value))
|
|
2075
2075
|
return;
|
|
@@ -2274,7 +2274,7 @@ var version = {
|
|
|
2274
2274
|
|
|
2275
2275
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/schemas.js
|
|
2276
2276
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2277
|
-
var
|
|
2277
|
+
var _a3;
|
|
2278
2278
|
inst ?? (inst = {});
|
|
2279
2279
|
inst._zod.def = def;
|
|
2280
2280
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2289,7 +2289,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
2291
2291
|
if (checks.length === 0) {
|
|
2292
|
-
(
|
|
2292
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2293
2293
|
inst._zod.deferred?.push(() => {
|
|
2294
2294
|
inst._zod.run = inst._zod.parse;
|
|
2295
2295
|
});
|
|
@@ -11091,7 +11091,7 @@ var _JSONSchemaGenerator = class _JSONSchemaGenerator {
|
|
|
11091
11091
|
this.seen = /* @__PURE__ */ new Map();
|
|
11092
11092
|
}
|
|
11093
11093
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
11094
|
-
var
|
|
11094
|
+
var _a3;
|
|
11095
11095
|
const def = schema._zod.def;
|
|
11096
11096
|
const formatMap = {
|
|
11097
11097
|
guid: "uuid",
|
|
@@ -11605,7 +11605,7 @@ var _JSONSchemaGenerator = class _JSONSchemaGenerator {
|
|
|
11605
11605
|
delete result.schema.default;
|
|
11606
11606
|
}
|
|
11607
11607
|
if (this.io === "input" && result.schema._prefault)
|
|
11608
|
-
(
|
|
11608
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11609
11609
|
delete result.schema._prefault;
|
|
11610
11610
|
const _result = this.seen.get(schema);
|
|
11611
11611
|
return _result.schema;
|
|
@@ -13885,6 +13885,16 @@ var ConsentFlowContractDetailsValidator = external_exports.object({
|
|
|
13885
13885
|
autoBoosts: external_exports.string().array().optional(),
|
|
13886
13886
|
writers: external_exports.array(LCNProfileValidator).optional()
|
|
13887
13887
|
});
|
|
13888
|
+
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
|
|
13889
|
+
var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
|
|
13890
|
+
var ConsentFlowContractRequestForProfileValidator = external_exports.object({
|
|
13891
|
+
profile: LCNProfileValidator,
|
|
13892
|
+
status: ConsentFlowContractRequestStatusValidator,
|
|
13893
|
+
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
13894
|
+
});
|
|
13895
|
+
var ConsentFlowContractRequestForProfileListValidator = external_exports.array(
|
|
13896
|
+
ConsentFlowContractRequestForProfileValidator
|
|
13897
|
+
);
|
|
13888
13898
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
13889
13899
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
13890
13900
|
});
|
|
@@ -14045,7 +14055,9 @@ var LCNNotificationTypeEnumValidator = external_exports.enum([
|
|
|
14045
14055
|
"PROFILE_PARENT_APPROVED",
|
|
14046
14056
|
"APP_LISTING_SUBMITTED",
|
|
14047
14057
|
"APP_LISTING_APPROVED",
|
|
14048
|
-
"APP_LISTING_REJECTED"
|
|
14058
|
+
"APP_LISTING_REJECTED",
|
|
14059
|
+
"APP_LISTING_WITHDRAWN",
|
|
14060
|
+
"DEVICE_LINK_REQUEST"
|
|
14049
14061
|
]);
|
|
14050
14062
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
14051
14063
|
title: external_exports.string().optional(),
|
|
@@ -14184,6 +14196,7 @@ var InboxCredentialValidator = external_exports.object({
|
|
|
14184
14196
|
webhookUrl: external_exports.string().optional(),
|
|
14185
14197
|
boostUri: external_exports.string().optional(),
|
|
14186
14198
|
activityId: external_exports.string().optional(),
|
|
14199
|
+
integrationId: external_exports.string().optional(),
|
|
14187
14200
|
signingAuthority: external_exports.object({
|
|
14188
14201
|
endpoint: external_exports.string().optional(),
|
|
14189
14202
|
name: external_exports.string().optional()
|
|
@@ -14285,8 +14298,9 @@ var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
|
14285
14298
|
claimUrl: external_exports.string().url().optional(),
|
|
14286
14299
|
recipientDid: external_exports.string().optional()
|
|
14287
14300
|
});
|
|
14301
|
+
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
14288
14302
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
14289
|
-
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
|
|
14303
|
+
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
14290
14304
|
configuration: external_exports.object({
|
|
14291
14305
|
publishableKey: external_exports.string(),
|
|
14292
14306
|
signingAuthorityName: external_exports.string().optional(),
|
|
@@ -14570,6 +14584,11 @@ var PromotionLevelValidator = external_exports.enum([
|
|
|
14570
14584
|
"DEMOTED"
|
|
14571
14585
|
]);
|
|
14572
14586
|
var AgeRatingValidator = external_exports.enum(["4+", "9+", "12+", "17+"]);
|
|
14587
|
+
var AppStoreListingSubmitterValidator = external_exports.object({
|
|
14588
|
+
profileId: external_exports.string(),
|
|
14589
|
+
displayName: external_exports.string(),
|
|
14590
|
+
email: external_exports.string().optional()
|
|
14591
|
+
});
|
|
14573
14592
|
var AppStoreListingValidator = external_exports.object({
|
|
14574
14593
|
listing_id: external_exports.string(),
|
|
14575
14594
|
slug: external_exports.string().optional(),
|
|
@@ -14591,7 +14610,10 @@ var AppStoreListingValidator = external_exports.object({
|
|
|
14591
14610
|
screenshots: external_exports.array(external_exports.string()).optional(),
|
|
14592
14611
|
hero_background_color: external_exports.string().optional(),
|
|
14593
14612
|
min_age: external_exports.number().int().min(0).max(18).optional(),
|
|
14594
|
-
age_rating: AgeRatingValidator.optional()
|
|
14613
|
+
age_rating: AgeRatingValidator.optional(),
|
|
14614
|
+
submitted_at: external_exports.string().optional(),
|
|
14615
|
+
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
14616
|
+
contact_email: external_exports.string().email().optional()
|
|
14595
14617
|
});
|
|
14596
14618
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
14597
14619
|
listing_id: true,
|
|
@@ -14619,9 +14641,39 @@ var AppBoostValidator = external_exports.object({
|
|
|
14619
14641
|
var SendCredentialEventValidator = external_exports.object({
|
|
14620
14642
|
type: external_exports.literal("send-credential"),
|
|
14621
14643
|
templateAlias: external_exports.string(),
|
|
14622
|
-
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
14644
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14645
|
+
preventDuplicateClaim: external_exports.boolean().optional()
|
|
14646
|
+
});
|
|
14647
|
+
var CheckCredentialEventValidator = external_exports.object({
|
|
14648
|
+
type: external_exports.literal("check-credential"),
|
|
14649
|
+
templateAlias: external_exports.string().optional(),
|
|
14650
|
+
boostUri: external_exports.string().optional()
|
|
14651
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14652
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14653
|
+
});
|
|
14654
|
+
var CheckIssuanceStatusEventValidator = external_exports.object({
|
|
14655
|
+
type: external_exports.literal("check-issuance-status"),
|
|
14656
|
+
templateAlias: external_exports.string().optional(),
|
|
14657
|
+
boostUri: external_exports.string().optional(),
|
|
14658
|
+
recipient: external_exports.string()
|
|
14659
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14660
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14623
14661
|
});
|
|
14624
|
-
var
|
|
14662
|
+
var GetTemplateRecipientsEventValidator = external_exports.object({
|
|
14663
|
+
type: external_exports.literal("get-template-recipients"),
|
|
14664
|
+
templateAlias: external_exports.string().optional(),
|
|
14665
|
+
boostUri: external_exports.string().optional(),
|
|
14666
|
+
limit: external_exports.number().optional(),
|
|
14667
|
+
cursor: external_exports.string().optional()
|
|
14668
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14669
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14670
|
+
});
|
|
14671
|
+
var AppEventValidator = external_exports.discriminatedUnion("type", [
|
|
14672
|
+
SendCredentialEventValidator,
|
|
14673
|
+
CheckCredentialEventValidator,
|
|
14674
|
+
CheckIssuanceStatusEventValidator,
|
|
14675
|
+
GetTemplateRecipientsEventValidator
|
|
14676
|
+
]);
|
|
14625
14677
|
var AppEventInputValidator = external_exports.object({
|
|
14626
14678
|
listingId: external_exports.string(),
|
|
14627
14679
|
event: AppEventValidator
|
|
@@ -14684,6 +14736,14 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
14684
14736
|
failed: external_exports.number(),
|
|
14685
14737
|
claimRate: external_exports.number()
|
|
14686
14738
|
});
|
|
14739
|
+
var _a2;
|
|
14740
|
+
var AuthSessionError = (_a2 = class extends Error {
|
|
14741
|
+
constructor(message, reason) {
|
|
14742
|
+
super(message);
|
|
14743
|
+
this.reason = reason;
|
|
14744
|
+
this.name = "AuthSessionError";
|
|
14745
|
+
}
|
|
14746
|
+
}, __name(_a2, "AuthSessionError"), __name2(_a2, "AuthSessionError"), _a2);
|
|
14687
14747
|
|
|
14688
14748
|
// src/plugin.ts
|
|
14689
14749
|
import { isVC2Format } from "@learncard/helpers";
|
|
@@ -15176,7 +15236,9 @@ var renderTemplateJson = /* @__PURE__ */ __name((jsonString, templateData) => {
|
|
|
15176
15236
|
const unescapedTemplate = jsonString.replace(/\{\{([^{}]+)\}\}/g, "{{{$1}}}");
|
|
15177
15237
|
return mustache_default.render(unescapedTemplate, preparedData);
|
|
15178
15238
|
}, "renderTemplateJson");
|
|
15179
|
-
async function getLearnCardNetworkPlugin(learnCard, url2,
|
|
15239
|
+
async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, options) {
|
|
15240
|
+
const apiToken = typeof apiTokenOrOptions === "string" ? apiTokenOrOptions : void 0;
|
|
15241
|
+
const guardianApprovalGetter = (typeof apiTokenOrOptions === "object" ? apiTokenOrOptions?.guardianApprovalGetter : void 0) ?? options?.guardianApprovalGetter;
|
|
15180
15242
|
let did = "";
|
|
15181
15243
|
try {
|
|
15182
15244
|
const idPlane = learnCard?.id;
|
|
@@ -15187,11 +15249,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15187
15249
|
learnCard?.debug?.("LCN: no local DID available at init; will fetch from profile");
|
|
15188
15250
|
}
|
|
15189
15251
|
learnCard?.debug?.("Adding LearnCardNetwork Plugin");
|
|
15190
|
-
const client = apiToken ? await getApiTokenClient(url2, apiToken) : await getClient(
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15252
|
+
const client = apiToken ? await getApiTokenClient(url2, apiToken, guardianApprovalGetter) : await getClient(
|
|
15253
|
+
url2,
|
|
15254
|
+
async (challenge) => {
|
|
15255
|
+
const jwt2 = await learnCard.invoke.getDidAuthVp({
|
|
15256
|
+
proofFormat: "jwt",
|
|
15257
|
+
challenge
|
|
15258
|
+
});
|
|
15259
|
+
if (typeof jwt2 !== "string") throw new Error("Error getting DID-Auth-JWT!");
|
|
15260
|
+
return jwt2;
|
|
15261
|
+
},
|
|
15262
|
+
guardianApprovalGetter
|
|
15263
|
+
);
|
|
15195
15264
|
let userData;
|
|
15196
15265
|
learnCard?.debug?.("LCN: initial getProfile query starting", { apiToken: !!apiToken });
|
|
15197
15266
|
const initialQuery = client.profile.getProfile.query().then((result) => {
|
|
@@ -15337,16 +15406,16 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15337
15406
|
const newDid = await client.profile.createManagedServiceProfile.mutate(profile);
|
|
15338
15407
|
return newDid;
|
|
15339
15408
|
}, "createManagedServiceProfile"),
|
|
15340
|
-
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15409
|
+
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15341
15410
|
await ensureUser();
|
|
15342
|
-
return client.profile.getAvailableProfiles.query(
|
|
15411
|
+
return client.profile.getAvailableProfiles.query(options2);
|
|
15343
15412
|
}, "getAvailableProfiles"),
|
|
15344
|
-
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15345
|
-
return client.profileManager.getManagedProfiles.query(
|
|
15413
|
+
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15414
|
+
return client.profileManager.getManagedProfiles.query(options2);
|
|
15346
15415
|
}, "getManagedProfiles"),
|
|
15347
|
-
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15416
|
+
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15348
15417
|
await ensureUser();
|
|
15349
|
-
return client.profile.getManagedServiceProfiles.query(
|
|
15418
|
+
return client.profile.getManagedServiceProfiles.query(options2);
|
|
15350
15419
|
}, "getManagedServiceProfiles"),
|
|
15351
15420
|
updateProfile: /* @__PURE__ */ __name(async (_learnCard, profile) => {
|
|
15352
15421
|
await ensureUser();
|
|
@@ -15426,9 +15495,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15426
15495
|
await ensureUser();
|
|
15427
15496
|
return client.profile.connections.query();
|
|
15428
15497
|
}, "getConnections"),
|
|
15429
|
-
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15498
|
+
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15430
15499
|
await ensureUser();
|
|
15431
|
-
return client.profile.paginatedConnections.query(
|
|
15500
|
+
return client.profile.paginatedConnections.query(options2);
|
|
15432
15501
|
}, "getPaginatedConnections"),
|
|
15433
15502
|
getPendingConnections: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15434
15503
|
console.warn(
|
|
@@ -15437,9 +15506,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15437
15506
|
await ensureUser();
|
|
15438
15507
|
return client.profile.pendingConnections.query();
|
|
15439
15508
|
}, "getPendingConnections"),
|
|
15440
|
-
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15509
|
+
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15441
15510
|
await ensureUser();
|
|
15442
|
-
return client.profile.paginatedPendingConnections.query(
|
|
15511
|
+
return client.profile.paginatedPendingConnections.query(options2);
|
|
15443
15512
|
}, "getPaginatedPendingConnections"),
|
|
15444
15513
|
getConnectionRequests: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15445
15514
|
console.warn(
|
|
@@ -15448,9 +15517,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15448
15517
|
await ensureUser();
|
|
15449
15518
|
return client.profile.connectionRequests.query();
|
|
15450
15519
|
}, "getConnectionRequests"),
|
|
15451
|
-
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard,
|
|
15520
|
+
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15452
15521
|
await ensureUser();
|
|
15453
|
-
return client.profile.paginatedConnectionRequests.query(
|
|
15522
|
+
return client.profile.paginatedConnectionRequests.query(options2);
|
|
15454
15523
|
}, "getPaginatedConnectionRequests"),
|
|
15455
15524
|
generateInvite: /* @__PURE__ */ __name(async (_learnCard, challenge, expiration, maxUses) => {
|
|
15456
15525
|
await ensureUser();
|
|
@@ -15507,9 +15576,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15507
15576
|
metadata
|
|
15508
15577
|
});
|
|
15509
15578
|
}, "sendCredential"),
|
|
15510
|
-
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15579
|
+
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15511
15580
|
await ensureUser();
|
|
15512
|
-
return client.credential.acceptCredential.mutate({ uri, options });
|
|
15581
|
+
return client.credential.acceptCredential.mutate({ uri, options: options2 });
|
|
15513
15582
|
}, "acceptCredential"),
|
|
15514
15583
|
getReceivedCredentials: /* @__PURE__ */ __name(async (_learnCard, from) => {
|
|
15515
15584
|
await ensureUser();
|
|
@@ -15589,18 +15658,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15589
15658
|
await ensureUser();
|
|
15590
15659
|
return client.boost.getBoostSkills.query({ uri });
|
|
15591
15660
|
}, "getBoostSkills"),
|
|
15592
|
-
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15661
|
+
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15593
15662
|
if (!userData) throw new Error("Please make an account first!");
|
|
15594
|
-
const { limit, cursor, query } =
|
|
15663
|
+
const { limit, cursor, query } = options2 ?? {};
|
|
15595
15664
|
return client.boost.getBoostFrameworks.query({ uri, limit, cursor, query });
|
|
15596
15665
|
}, "getBoostFrameworks"),
|
|
15597
15666
|
getSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15598
15667
|
if (!userData) throw new Error("Please make an account first!");
|
|
15599
15668
|
return client.boost.getSkillsAvailableForBoost.query({ uri });
|
|
15600
15669
|
}, "getSkillsAvailableForBoost"),
|
|
15601
|
-
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query,
|
|
15670
|
+
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query, options2 = {}) => {
|
|
15602
15671
|
if (!userData) throw new Error("Please make an account first!");
|
|
15603
|
-
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...
|
|
15672
|
+
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...options2 });
|
|
15604
15673
|
}, "searchSkillsAvailableForBoost"),
|
|
15605
15674
|
getBoosts: /* @__PURE__ */ __name(async (_learnCard, query) => {
|
|
15606
15675
|
console.warn(
|
|
@@ -15613,41 +15682,41 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15613
15682
|
await ensureUser();
|
|
15614
15683
|
return client.boost.countBoosts.query({ query });
|
|
15615
15684
|
}, "countBoosts"),
|
|
15616
|
-
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard,
|
|
15685
|
+
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15617
15686
|
await ensureUser();
|
|
15618
|
-
return client.boost.getPaginatedBoosts.query(
|
|
15687
|
+
return client.boost.getPaginatedBoosts.query(options2);
|
|
15619
15688
|
}, "getPaginatedBoosts"),
|
|
15620
|
-
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15689
|
+
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15621
15690
|
await ensureUser();
|
|
15622
|
-
return client.boost.getBoostChildren.query({ uri, ...
|
|
15691
|
+
return client.boost.getBoostChildren.query({ uri, ...options2 });
|
|
15623
15692
|
}, "getBoostChildren"),
|
|
15624
|
-
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15693
|
+
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15625
15694
|
await ensureUser();
|
|
15626
|
-
return client.boost.countBoostChildren.query({ uri, ...
|
|
15695
|
+
return client.boost.countBoostChildren.query({ uri, ...options2 });
|
|
15627
15696
|
}, "countBoostChildren"),
|
|
15628
|
-
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15697
|
+
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15629
15698
|
await ensureUser();
|
|
15630
|
-
return client.boost.getBoostSiblings.query({ uri, ...
|
|
15699
|
+
return client.boost.getBoostSiblings.query({ uri, ...options2 });
|
|
15631
15700
|
}, "getBoostSiblings"),
|
|
15632
|
-
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15701
|
+
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15633
15702
|
await ensureUser();
|
|
15634
|
-
return client.boost.countBoostSiblings.query({ uri, ...
|
|
15703
|
+
return client.boost.countBoostSiblings.query({ uri, ...options2 });
|
|
15635
15704
|
}, "countBoostSiblings"),
|
|
15636
|
-
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15705
|
+
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15637
15706
|
await ensureUser();
|
|
15638
|
-
return client.boost.getFamilialBoosts.query({ uri, ...
|
|
15707
|
+
return client.boost.getFamilialBoosts.query({ uri, ...options2 });
|
|
15639
15708
|
}, "getFamilialBoosts"),
|
|
15640
|
-
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15709
|
+
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15641
15710
|
await ensureUser();
|
|
15642
|
-
return client.boost.countFamilialBoosts.query({ uri, ...
|
|
15711
|
+
return client.boost.countFamilialBoosts.query({ uri, ...options2 });
|
|
15643
15712
|
}, "countFamilialBoosts"),
|
|
15644
|
-
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15713
|
+
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15645
15714
|
await ensureUser();
|
|
15646
|
-
return client.boost.getBoostParents.query({ uri, ...
|
|
15715
|
+
return client.boost.getBoostParents.query({ uri, ...options2 });
|
|
15647
15716
|
}, "getBoostParents"),
|
|
15648
|
-
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15717
|
+
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15649
15718
|
await ensureUser();
|
|
15650
|
-
return client.boost.countBoostParents.query({ uri, ...
|
|
15719
|
+
return client.boost.countBoostParents.query({ uri, ...options2 });
|
|
15651
15720
|
}, "countBoostParents"),
|
|
15652
15721
|
makeBoostParent: /* @__PURE__ */ __name(async (_learnCard, uris) => {
|
|
15653
15722
|
await ensureUser();
|
|
@@ -15722,9 +15791,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15722
15791
|
includeUnacceptedBoosts
|
|
15723
15792
|
});
|
|
15724
15793
|
}, "countConnectedBoostRecipients"),
|
|
15725
|
-
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15794
|
+
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15726
15795
|
await ensureUser();
|
|
15727
|
-
return client.boost.getChildrenProfileManagers.query({ uri, ...
|
|
15796
|
+
return client.boost.getChildrenProfileManagers.query({ uri, ...options2 });
|
|
15728
15797
|
}, "getBoostChildrenProfileManagers"),
|
|
15729
15798
|
updateBoost: /* @__PURE__ */ __name(async (_learnCard, uri, updates, credential) => {
|
|
15730
15799
|
await ensureUser();
|
|
@@ -15733,7 +15802,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15733
15802
|
uri,
|
|
15734
15803
|
updates: { ...credential && { credential }, ...restUpdates }
|
|
15735
15804
|
};
|
|
15736
|
-
if (Array.isArray(skills)
|
|
15805
|
+
if (Array.isArray(skills)) payload.skills = skills;
|
|
15737
15806
|
return client.boost.updateBoost.mutate(payload);
|
|
15738
15807
|
}, "updateBoost"),
|
|
15739
15808
|
attachFrameworkToBoost: /* @__PURE__ */ __name(async (_learnCard, boostUri, frameworkId) => {
|
|
@@ -15748,9 +15817,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15748
15817
|
if (!userData) throw new Error("Please make an account first!");
|
|
15749
15818
|
return client.boost.alignBoostSkills.mutate({ boostUri, skills });
|
|
15750
15819
|
}, "alignBoostSkills"),
|
|
15751
|
-
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15820
|
+
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15752
15821
|
await ensureUser();
|
|
15753
|
-
return client.boost.getBoostAdmins.query({ uri, ...
|
|
15822
|
+
return client.boost.getBoostAdmins.query({ uri, ...options2 });
|
|
15754
15823
|
}, "getBoostAdmins"),
|
|
15755
15824
|
getBoostPermissions: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
15756
15825
|
await ensureUser();
|
|
@@ -15788,7 +15857,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15788
15857
|
await ensureUser();
|
|
15789
15858
|
return client.boost.deleteBoost.mutate({ uri });
|
|
15790
15859
|
}, "deleteBoost"),
|
|
15791
|
-
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri,
|
|
15860
|
+
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri, options2 = { encrypt: true, skipNotification: false, templateData: {} }) => {
|
|
15792
15861
|
await ensureUser();
|
|
15793
15862
|
const result = await getBoostTemplateForIssuance(_learnCard, boostUri);
|
|
15794
15863
|
const data = await UnsignedVCValidator.spa(result);
|
|
@@ -15811,10 +15880,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15811
15880
|
boost.credentialSubject.id = targetProfile.did;
|
|
15812
15881
|
}
|
|
15813
15882
|
if (boost?.type?.includes("BoostCredential")) boost.boostId = boostUri;
|
|
15814
|
-
if (typeof
|
|
15883
|
+
if (typeof options2 === "object" && options2.templateData && Object.keys(options2.templateData).length > 0) {
|
|
15815
15884
|
try {
|
|
15816
15885
|
const boostString = JSON.stringify(boost);
|
|
15817
|
-
const rendered = renderTemplateJson(boostString,
|
|
15886
|
+
const rendered = renderTemplateJson(boostString, options2.templateData);
|
|
15818
15887
|
boost = JSON.parse(rendered);
|
|
15819
15888
|
} catch (error46) {
|
|
15820
15889
|
throw new Error(
|
|
@@ -15822,17 +15891,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15822
15891
|
);
|
|
15823
15892
|
}
|
|
15824
15893
|
}
|
|
15825
|
-
if (typeof
|
|
15826
|
-
boost =
|
|
15894
|
+
if (typeof options2 === "object" && options2.overideFn) {
|
|
15895
|
+
boost = options2.overideFn(boost);
|
|
15827
15896
|
}
|
|
15828
15897
|
const vc = await _learnCard.invoke.issueCredential(boost);
|
|
15829
|
-
if (typeof
|
|
15898
|
+
if (typeof options2 === "object" && !options2.encrypt || !options2) {
|
|
15830
15899
|
return client.boost.sendBoost.mutate({
|
|
15831
15900
|
profileId,
|
|
15832
15901
|
uri: boostUri,
|
|
15833
15902
|
credential: vc,
|
|
15834
15903
|
options: {
|
|
15835
|
-
skipNotification: typeof
|
|
15904
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15836
15905
|
}
|
|
15837
15906
|
});
|
|
15838
15907
|
}
|
|
@@ -15847,7 +15916,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15847
15916
|
uri: boostUri,
|
|
15848
15917
|
credential,
|
|
15849
15918
|
options: {
|
|
15850
|
-
skipNotification: typeof
|
|
15919
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15851
15920
|
}
|
|
15852
15921
|
});
|
|
15853
15922
|
}, "sendBoost"),
|
|
@@ -15875,12 +15944,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15875
15944
|
await ensureUser();
|
|
15876
15945
|
return client.profile.primarySigningAuthority.query();
|
|
15877
15946
|
}, "getPrimaryRegisteredSigningAuthority"),
|
|
15878
|
-
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA,
|
|
15947
|
+
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA, options2, challenge) => {
|
|
15879
15948
|
await ensureUser();
|
|
15880
15949
|
return client.boost.generateClaimLink.mutate({
|
|
15881
15950
|
boostUri,
|
|
15882
15951
|
claimLinkSA,
|
|
15883
|
-
options,
|
|
15952
|
+
options: options2,
|
|
15884
15953
|
challenge
|
|
15885
15954
|
});
|
|
15886
15955
|
}, "generateClaimLink"),
|
|
@@ -15974,25 +16043,25 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15974
16043
|
getContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15975
16044
|
return client.contracts.getConsentFlowContract.query({ uri });
|
|
15976
16045
|
}, "getContract"),
|
|
15977
|
-
getContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16046
|
+
getContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15978
16047
|
await ensureUser();
|
|
15979
|
-
return client.contracts.getConsentFlowContracts.query(
|
|
16048
|
+
return client.contracts.getConsentFlowContracts.query(options2);
|
|
15980
16049
|
}, "getContracts"),
|
|
15981
16050
|
deleteContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15982
16051
|
await ensureUser();
|
|
15983
16052
|
return client.contracts.deleteConsentFlowContract.mutate({ uri });
|
|
15984
16053
|
}, "deleteContract"),
|
|
15985
|
-
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16054
|
+
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15986
16055
|
await ensureUser();
|
|
15987
|
-
return client.contracts.getConsentedDataForContract.query({ uri, ...
|
|
16056
|
+
return client.contracts.getConsentedDataForContract.query({ uri, ...options2 });
|
|
15988
16057
|
}, "getConsentFlowData"),
|
|
15989
|
-
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2,
|
|
16058
|
+
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2, options2 = {}) => {
|
|
15990
16059
|
await ensureUser();
|
|
15991
|
-
return client.contracts.getConsentedDataForDid.query({ did: did2, ...
|
|
16060
|
+
return client.contracts.getConsentedDataForDid.query({ did: did2, ...options2 });
|
|
15992
16061
|
}, "getConsentFlowDataForDid"),
|
|
15993
|
-
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {},
|
|
16062
|
+
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {}, options2 = {}) => {
|
|
15994
16063
|
await ensureUser();
|
|
15995
|
-
return client.contracts.getConsentedData.query({ query, ...
|
|
16064
|
+
return client.contracts.getConsentedData.query({ query, ...options2 });
|
|
15996
16065
|
}, "getAllConsentFlowData"),
|
|
15997
16066
|
writeCredentialToContract: /* @__PURE__ */ __name(async (_learnCard, did2, contractUri, credential, boostUri) => {
|
|
15998
16067
|
await ensureUser();
|
|
@@ -16014,9 +16083,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16014
16083
|
// for SmartResume
|
|
16015
16084
|
});
|
|
16016
16085
|
}, "consentToContract"),
|
|
16017
|
-
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16086
|
+
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16018
16087
|
await ensureUser();
|
|
16019
|
-
return client.contracts.getConsentedContracts.query(
|
|
16088
|
+
return client.contracts.getConsentedContracts.query(options2);
|
|
16020
16089
|
}, "getConsentedContracts"),
|
|
16021
16090
|
updateContractTerms: /* @__PURE__ */ __name(async (_learnCard, uri, { terms, expiresAt, oneTime }) => {
|
|
16022
16091
|
await ensureUser();
|
|
@@ -16031,17 +16100,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16031
16100
|
await ensureUser();
|
|
16032
16101
|
return client.contracts.withdrawConsent.mutate({ uri });
|
|
16033
16102
|
}, "withdrawConsent"),
|
|
16034
|
-
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16103
|
+
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
16035
16104
|
await ensureUser();
|
|
16036
|
-
return client.contracts.getTermsTransactionHistory.query({ uri, ...
|
|
16105
|
+
return client.contracts.getTermsTransactionHistory.query({ uri, ...options2 });
|
|
16037
16106
|
}, "getConsentFlowTransactions"),
|
|
16038
|
-
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri,
|
|
16107
|
+
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri, options2 = {}) => {
|
|
16039
16108
|
await ensureUser();
|
|
16040
|
-
return client.contracts.getCredentialsForContract.query({ termsUri, ...
|
|
16109
|
+
return client.contracts.getCredentialsForContract.query({ termsUri, ...options2 });
|
|
16041
16110
|
}, "getCredentialsForContract"),
|
|
16042
|
-
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16111
|
+
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16043
16112
|
await ensureUser();
|
|
16044
|
-
return client.contracts.getAllCredentialsForTerms.query(
|
|
16113
|
+
return client.contracts.getAllCredentialsForTerms.query(options2);
|
|
16045
16114
|
}, "getConsentFlowCredentials"),
|
|
16046
16115
|
verifyConsent: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
16047
16116
|
await ensureUser();
|
|
@@ -16090,6 +16159,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16090
16159
|
targetProfileId
|
|
16091
16160
|
});
|
|
16092
16161
|
}, "getAllContractRequestsForProfile"),
|
|
16162
|
+
getSharedInsightsRequestsForProfile: /* @__PURE__ */ __name(async (_learnCard, targetProfileId) => {
|
|
16163
|
+
await ensureUser();
|
|
16164
|
+
return client.contracts.getSharedInsightsRequestsForProfile.query({
|
|
16165
|
+
targetProfileId
|
|
16166
|
+
});
|
|
16167
|
+
}, "getSharedInsightsRequestsForProfile"),
|
|
16093
16168
|
forwardContractRequestToProfile: /* @__PURE__ */ __name(async (_learnCard, parentProfileId, targetProfileId, contractUri) => {
|
|
16094
16169
|
await ensureUser();
|
|
16095
16170
|
return client.contracts.forwardContractRequestToProfile.mutate({
|
|
@@ -16142,9 +16217,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16142
16217
|
await ensureUser();
|
|
16143
16218
|
return client.claimHook.createClaimHook.mutate({ hook });
|
|
16144
16219
|
}, "createClaimHook"),
|
|
16145
|
-
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard,
|
|
16220
|
+
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16146
16221
|
await ensureUser();
|
|
16147
|
-
return client.claimHook.getClaimHooksForBoost.query(
|
|
16222
|
+
return client.claimHook.getClaimHooksForBoost.query(options2);
|
|
16148
16223
|
}, "getClaimHooksForBoost"),
|
|
16149
16224
|
deleteClaimHook: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16150
16225
|
await ensureUser();
|
|
@@ -16170,9 +16245,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16170
16245
|
await ensureUser();
|
|
16171
16246
|
return client.authGrants.getAuthGrant.query({ id });
|
|
16172
16247
|
}, "getAuthGrant"),
|
|
16173
|
-
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard,
|
|
16248
|
+
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16174
16249
|
await ensureUser();
|
|
16175
|
-
return client.authGrants.getAuthGrants.query(
|
|
16250
|
+
return client.authGrants.getAuthGrants.query(options2);
|
|
16176
16251
|
}, "getAuthGrants"),
|
|
16177
16252
|
getAPITokenForAuthGrant: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16178
16253
|
await ensureUser();
|
|
@@ -16194,9 +16269,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16194
16269
|
await ensureUser();
|
|
16195
16270
|
return client.inbox.issue.mutate(issueInboxCredential);
|
|
16196
16271
|
}, "sendCredentialViaInbox"),
|
|
16197
|
-
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16272
|
+
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16198
16273
|
await ensureUser();
|
|
16199
|
-
return client.inbox.getMyIssuedCredentials.query(
|
|
16274
|
+
return client.inbox.getMyIssuedCredentials.query(options2);
|
|
16200
16275
|
}, "getMySentInboxCredentials"),
|
|
16201
16276
|
getInboxCredential: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16202
16277
|
await ensureUser();
|
|
@@ -16206,9 +16281,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16206
16281
|
await ensureUser();
|
|
16207
16282
|
return client.inbox.finalize.mutate();
|
|
16208
16283
|
}, "finalizeInboxCredentials"),
|
|
16209
|
-
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard,
|
|
16284
|
+
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16210
16285
|
await ensureUser();
|
|
16211
|
-
return client.inbox.sendGuardianApprovalEmail.mutate(
|
|
16286
|
+
return client.inbox.sendGuardianApprovalEmail.mutate(options2);
|
|
16212
16287
|
}, "sendGuardianApprovalEmail"),
|
|
16213
16288
|
approveGuardianRequest: /* @__PURE__ */ __name(async (_learnCard, token) => {
|
|
16214
16289
|
return client.inbox.approveGuardianRequest.mutate({ token });
|
|
@@ -16277,46 +16352,46 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16277
16352
|
if (!userData) throw new Error("Please make an account first!");
|
|
16278
16353
|
return client.skillFrameworks.listMine.query();
|
|
16279
16354
|
}, "listMySkillFrameworks"),
|
|
16280
|
-
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard,
|
|
16355
|
+
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16281
16356
|
if (!userData) throw new Error("Please make an account first!");
|
|
16282
|
-
return client.skillFrameworks.getAllAvailableFrameworks.query(
|
|
16357
|
+
return client.skillFrameworks.getAllAvailableFrameworks.query(options2);
|
|
16283
16358
|
}, "getAllAvailableFrameworks"),
|
|
16284
|
-
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id,
|
|
16359
|
+
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id, options2 = {}) => {
|
|
16285
16360
|
if (!userData) throw new Error("Please make an account first!");
|
|
16286
|
-
return client.skillFrameworks.getById.query({ id, ...
|
|
16361
|
+
return client.skillFrameworks.getById.query({ id, ...options2 });
|
|
16287
16362
|
}, "getSkillFrameworkById"),
|
|
16288
|
-
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16363
|
+
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16289
16364
|
if (!userData) throw new Error("Please make an account first!");
|
|
16290
16365
|
return client.skillFrameworks.getBoostsThatUseFramework.query({
|
|
16291
16366
|
id: frameworkId,
|
|
16292
|
-
...
|
|
16367
|
+
...options2
|
|
16293
16368
|
});
|
|
16294
16369
|
}, "getBoostsThatUseFramework"),
|
|
16295
|
-
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16370
|
+
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16296
16371
|
if (!userData) throw new Error("Please make an account first!");
|
|
16297
16372
|
return client.skillFrameworks.countBoostsThatUseFramework.query({
|
|
16298
16373
|
id: frameworkId,
|
|
16299
|
-
...
|
|
16374
|
+
...options2
|
|
16300
16375
|
});
|
|
16301
16376
|
}, "countBoostsThatUseFramework"),
|
|
16302
|
-
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16377
|
+
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16303
16378
|
if (!userData) throw new Error("Please make an account first!");
|
|
16304
|
-
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...
|
|
16379
|
+
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...options2 });
|
|
16305
16380
|
}, "getFrameworkSkillTree"),
|
|
16306
|
-
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId,
|
|
16381
|
+
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId, options2 = {}) => {
|
|
16307
16382
|
if (!userData) throw new Error("Please make an account first!");
|
|
16308
16383
|
return client.skills.getSkillChildrenTree.query({
|
|
16309
16384
|
frameworkId,
|
|
16310
16385
|
id: skillId,
|
|
16311
|
-
...
|
|
16386
|
+
...options2
|
|
16312
16387
|
});
|
|
16313
16388
|
}, "getSkillChildren"),
|
|
16314
|
-
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query,
|
|
16389
|
+
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query, options2 = {}) => {
|
|
16315
16390
|
if (!userData) throw new Error("Please make an account first!");
|
|
16316
16391
|
return client.skills.searchFrameworkSkills.query({
|
|
16317
16392
|
id: frameworkId,
|
|
16318
16393
|
query,
|
|
16319
|
-
...
|
|
16394
|
+
...options2
|
|
16320
16395
|
});
|
|
16321
16396
|
}, "searchFrameworkSkills"),
|
|
16322
16397
|
semanticSearchSkills: /* @__PURE__ */ __name(async (_learnCard, input) => {
|
|
@@ -16391,13 +16466,13 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16391
16466
|
await ensureUser();
|
|
16392
16467
|
return client.integrations.getIntegration.query({ id });
|
|
16393
16468
|
}, "getIntegration"),
|
|
16394
|
-
getIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16469
|
+
getIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16395
16470
|
await ensureUser();
|
|
16396
|
-
return client.integrations.getIntegrations.query(
|
|
16471
|
+
return client.integrations.getIntegrations.query(options2);
|
|
16397
16472
|
}, "getIntegrations"),
|
|
16398
|
-
countIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16473
|
+
countIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16399
16474
|
await ensureUser();
|
|
16400
|
-
return client.integrations.countIntegrations.query(
|
|
16475
|
+
return client.integrations.countIntegrations.query(options2);
|
|
16401
16476
|
}, "countIntegrations"),
|
|
16402
16477
|
updateIntegration: /* @__PURE__ */ __name(async (_learnCard, id, updates) => {
|
|
16403
16478
|
await ensureUser();
|
|
@@ -16442,19 +16517,23 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16442
16517
|
await ensureUser();
|
|
16443
16518
|
return client.appStore.submitForReview.mutate({ listingId });
|
|
16444
16519
|
}, "submitAppStoreListingForReview"),
|
|
16445
|
-
|
|
16520
|
+
unsubmitAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16521
|
+
await ensureUser();
|
|
16522
|
+
return client.appStore.unsubmitForReview.mutate({ listingId });
|
|
16523
|
+
}, "unsubmitAppStoreListing"),
|
|
16524
|
+
getListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId, options2 = {}) => {
|
|
16446
16525
|
await ensureUser();
|
|
16447
16526
|
return client.appStore.getListingsForIntegration.query({
|
|
16448
16527
|
integrationId,
|
|
16449
|
-
...
|
|
16528
|
+
...options2
|
|
16450
16529
|
});
|
|
16451
16530
|
}, "getListingsForIntegration"),
|
|
16452
16531
|
countListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId) => {
|
|
16453
16532
|
await ensureUser();
|
|
16454
16533
|
return client.appStore.countListingsForIntegration.query({ integrationId });
|
|
16455
16534
|
}, "countListingsForIntegration"),
|
|
16456
|
-
browseAppStore: /* @__PURE__ */ __name(async (_learnCard,
|
|
16457
|
-
return client.appStore.browseListedApps.query(
|
|
16535
|
+
browseAppStore: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16536
|
+
return client.appStore.browseListedApps.query(options2);
|
|
16458
16537
|
}, "browseAppStore"),
|
|
16459
16538
|
getPublicAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16460
16539
|
return client.appStore.getPublicListing.query({ listingId });
|
|
@@ -16473,9 +16552,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16473
16552
|
await ensureUser();
|
|
16474
16553
|
return client.appStore.uninstallApp.mutate({ listingId });
|
|
16475
16554
|
}, "uninstallApp"),
|
|
16476
|
-
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard,
|
|
16555
|
+
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16477
16556
|
await ensureUser();
|
|
16478
|
-
return client.appStore.getInstalledApps.query(
|
|
16557
|
+
return client.appStore.getInstalledApps.query(options2);
|
|
16479
16558
|
}, "getInstalledApps"),
|
|
16480
16559
|
countInstalledApps: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16481
16560
|
await ensureUser();
|
|
@@ -16485,6 +16564,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16485
16564
|
await ensureUser();
|
|
16486
16565
|
return client.appStore.isAppInstalled.query({ listingId });
|
|
16487
16566
|
}, "isAppInstalled"),
|
|
16567
|
+
getMyCredentialsFromApp: /* @__PURE__ */ __name(async (_learnCard, listingId, options2 = {}) => {
|
|
16568
|
+
await ensureUser();
|
|
16569
|
+
return client.appStore.getMyCredentialsFromApp.query({ listingId, ...options2 });
|
|
16570
|
+
}, "getMyCredentialsFromApp"),
|
|
16488
16571
|
isAppStoreAdmin: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16489
16572
|
await ensureUser();
|
|
16490
16573
|
return client.appStore.isAdmin.query();
|
|
@@ -16500,9 +16583,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16500
16583
|
promotionLevel
|
|
16501
16584
|
});
|
|
16502
16585
|
}, "adminUpdatePromotionLevel"),
|
|
16503
|
-
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard,
|
|
16586
|
+
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16504
16587
|
await ensureUser();
|
|
16505
|
-
return client.appStore.adminGetAllListings.query(
|
|
16588
|
+
return client.appStore.adminGetAllListings.query(options2);
|
|
16506
16589
|
}, "adminGetAllListings"),
|
|
16507
16590
|
// App Store Boost Management
|
|
16508
16591
|
addBoostToApp: /* @__PURE__ */ __name(async (_learnCard, listingId, boostUri, templateAlias) => {
|
|
@@ -16532,21 +16615,21 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16532
16615
|
}, "resolveFromLCN"),
|
|
16533
16616
|
getLCNClient: /* @__PURE__ */ __name(() => client, "getLCNClient"),
|
|
16534
16617
|
// Activity
|
|
16535
|
-
getMyActivities: /* @__PURE__ */ __name(async (_learnCard,
|
|
16618
|
+
getMyActivities: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16536
16619
|
await ensureUser();
|
|
16537
|
-
return client.activity.getMyActivities.query(
|
|
16620
|
+
return client.activity.getMyActivities.query(options2);
|
|
16538
16621
|
}, "getMyActivities"),
|
|
16539
|
-
getActivityStats: /* @__PURE__ */ __name(async (_learnCard,
|
|
16622
|
+
getActivityStats: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16540
16623
|
await ensureUser();
|
|
16541
|
-
return client.activity.getActivityStats.query(
|
|
16624
|
+
return client.activity.getActivityStats.query(options2);
|
|
16542
16625
|
}, "getActivityStats"),
|
|
16543
|
-
getActivity: /* @__PURE__ */ __name(async (_learnCard,
|
|
16626
|
+
getActivity: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16544
16627
|
await ensureUser();
|
|
16545
|
-
return client.activity.getActivity.query(
|
|
16628
|
+
return client.activity.getActivity.query(options2);
|
|
16546
16629
|
}, "getActivity"),
|
|
16547
|
-
getActivityChain: /* @__PURE__ */ __name(async (_learnCard,
|
|
16630
|
+
getActivityChain: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16548
16631
|
await ensureUser();
|
|
16549
|
-
return client.activity.getActivityChain.query(
|
|
16632
|
+
return client.activity.getActivityChain.query(options2);
|
|
16550
16633
|
}, "getActivityChain")
|
|
16551
16634
|
}
|
|
16552
16635
|
};
|