@learncard/network-plugin 2.10.9 → 2.10.13
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 +275 -151
- 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 +275 -151
- 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 +39 -12
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -572,10 +572,10 @@ function $constructor(name, initializer3, params) {
|
|
|
572
572
|
let Definition = _Definition;
|
|
573
573
|
Object.defineProperty(Definition, "name", { value: name });
|
|
574
574
|
function _(def) {
|
|
575
|
-
var
|
|
575
|
+
var _a3;
|
|
576
576
|
const inst = params?.Parent ? new Definition() : this;
|
|
577
577
|
init(inst, def);
|
|
578
|
-
(
|
|
578
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
579
579
|
for (const fn of inst._zod.deferred) {
|
|
580
580
|
fn();
|
|
581
581
|
}
|
|
@@ -1201,8 +1201,8 @@ function aborted(x, startIndex = 0) {
|
|
|
1201
1201
|
__name(aborted, "aborted");
|
|
1202
1202
|
function prefixIssues(path, issues) {
|
|
1203
1203
|
return issues.map((iss) => {
|
|
1204
|
-
var
|
|
1205
|
-
(
|
|
1204
|
+
var _a3;
|
|
1205
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1206
1206
|
iss.path.unshift(path);
|
|
1207
1207
|
return iss;
|
|
1208
1208
|
});
|
|
@@ -1383,7 +1383,7 @@ __name(formatError, "formatError");
|
|
|
1383
1383
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
1384
1384
|
const result = { errors: [] };
|
|
1385
1385
|
const processError = /* @__PURE__ */ __name((error47, path = []) => {
|
|
1386
|
-
var
|
|
1386
|
+
var _a3, _b;
|
|
1387
1387
|
for (const issue2 of error47.issues) {
|
|
1388
1388
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1389
1389
|
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
@@ -1404,7 +1404,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1404
1404
|
const terminal = i === fullpath.length - 1;
|
|
1405
1405
|
if (typeof el === "string") {
|
|
1406
1406
|
curr.properties ?? (curr.properties = {});
|
|
1407
|
-
(
|
|
1407
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1408
1408
|
curr = curr.properties[el];
|
|
1409
1409
|
} else {
|
|
1410
1410
|
curr.items ?? (curr.items = []);
|
|
@@ -1707,10 +1707,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1707
1707
|
|
|
1708
1708
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/checks.js
|
|
1709
1709
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1710
|
-
var
|
|
1710
|
+
var _a3;
|
|
1711
1711
|
inst._zod ?? (inst._zod = {});
|
|
1712
1712
|
inst._zod.def = def;
|
|
1713
|
-
(
|
|
1713
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1714
1714
|
});
|
|
1715
1715
|
var numericOriginMap = {
|
|
1716
1716
|
number: "number",
|
|
@@ -1776,8 +1776,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1776
1776
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1777
1777
|
$ZodCheck.init(inst, def);
|
|
1778
1778
|
inst._zod.onattach.push((inst2) => {
|
|
1779
|
-
var
|
|
1780
|
-
(
|
|
1779
|
+
var _a3;
|
|
1780
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1781
1781
|
});
|
|
1782
1782
|
inst._zod.check = (payload) => {
|
|
1783
1783
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1904,9 +1904,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1904
1904
|
};
|
|
1905
1905
|
});
|
|
1906
1906
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1907
|
-
var
|
|
1907
|
+
var _a3;
|
|
1908
1908
|
$ZodCheck.init(inst, def);
|
|
1909
|
-
(
|
|
1909
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1910
1910
|
const val = payload.value;
|
|
1911
1911
|
return !nullish(val) && val.size !== void 0;
|
|
1912
1912
|
});
|
|
@@ -1932,9 +1932,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1932
1932
|
};
|
|
1933
1933
|
});
|
|
1934
1934
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1935
|
-
var
|
|
1935
|
+
var _a3;
|
|
1936
1936
|
$ZodCheck.init(inst, def);
|
|
1937
|
-
(
|
|
1937
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1938
1938
|
const val = payload.value;
|
|
1939
1939
|
return !nullish(val) && val.size !== void 0;
|
|
1940
1940
|
});
|
|
@@ -1960,9 +1960,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1960
1960
|
};
|
|
1961
1961
|
});
|
|
1962
1962
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1963
|
-
var
|
|
1963
|
+
var _a3;
|
|
1964
1964
|
$ZodCheck.init(inst, def);
|
|
1965
|
-
(
|
|
1965
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1966
1966
|
const val = payload.value;
|
|
1967
1967
|
return !nullish(val) && val.size !== void 0;
|
|
1968
1968
|
});
|
|
@@ -1990,9 +1990,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1990
1990
|
};
|
|
1991
1991
|
});
|
|
1992
1992
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1993
|
-
var
|
|
1993
|
+
var _a3;
|
|
1994
1994
|
$ZodCheck.init(inst, def);
|
|
1995
|
-
(
|
|
1995
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1996
1996
|
const val = payload.value;
|
|
1997
1997
|
return !nullish(val) && val.length !== void 0;
|
|
1998
1998
|
});
|
|
@@ -2019,9 +2019,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2019
2019
|
};
|
|
2020
2020
|
});
|
|
2021
2021
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2022
|
-
var
|
|
2022
|
+
var _a3;
|
|
2023
2023
|
$ZodCheck.init(inst, def);
|
|
2024
|
-
(
|
|
2024
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2025
2025
|
const val = payload.value;
|
|
2026
2026
|
return !nullish(val) && val.length !== void 0;
|
|
2027
2027
|
});
|
|
@@ -2048,9 +2048,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2048
2048
|
};
|
|
2049
2049
|
});
|
|
2050
2050
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2051
|
-
var
|
|
2051
|
+
var _a3;
|
|
2052
2052
|
$ZodCheck.init(inst, def);
|
|
2053
|
-
(
|
|
2053
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2054
2054
|
const val = payload.value;
|
|
2055
2055
|
return !nullish(val) && val.length !== void 0;
|
|
2056
2056
|
});
|
|
@@ -2079,7 +2079,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2079
2079
|
};
|
|
2080
2080
|
});
|
|
2081
2081
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2082
|
-
var
|
|
2082
|
+
var _a3, _b;
|
|
2083
2083
|
$ZodCheck.init(inst, def);
|
|
2084
2084
|
inst._zod.onattach.push((inst2) => {
|
|
2085
2085
|
const bag = inst2._zod.bag;
|
|
@@ -2090,7 +2090,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2090
2090
|
}
|
|
2091
2091
|
});
|
|
2092
2092
|
if (def.pattern)
|
|
2093
|
-
(
|
|
2093
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2094
2094
|
def.pattern.lastIndex = 0;
|
|
2095
2095
|
if (def.pattern.test(payload.value))
|
|
2096
2096
|
return;
|
|
@@ -2295,7 +2295,7 @@ var version = {
|
|
|
2295
2295
|
|
|
2296
2296
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/schemas.js
|
|
2297
2297
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2298
|
-
var
|
|
2298
|
+
var _a3;
|
|
2299
2299
|
inst ?? (inst = {});
|
|
2300
2300
|
inst._zod.def = def;
|
|
2301
2301
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2310,7 +2310,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
2312
|
if (checks.length === 0) {
|
|
2313
|
-
(
|
|
2313
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2314
2314
|
inst._zod.deferred?.push(() => {
|
|
2315
2315
|
inst._zod.run = inst._zod.parse;
|
|
2316
2316
|
});
|
|
@@ -11112,7 +11112,7 @@ var _JSONSchemaGenerator = class _JSONSchemaGenerator {
|
|
|
11112
11112
|
this.seen = /* @__PURE__ */ new Map();
|
|
11113
11113
|
}
|
|
11114
11114
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
11115
|
-
var
|
|
11115
|
+
var _a3;
|
|
11116
11116
|
const def = schema._zod.def;
|
|
11117
11117
|
const formatMap = {
|
|
11118
11118
|
guid: "uuid",
|
|
@@ -11626,7 +11626,7 @@ var _JSONSchemaGenerator = class _JSONSchemaGenerator {
|
|
|
11626
11626
|
delete result.schema.default;
|
|
11627
11627
|
}
|
|
11628
11628
|
if (this.io === "input" && result.schema._prefault)
|
|
11629
|
-
(
|
|
11629
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11630
11630
|
delete result.schema._prefault;
|
|
11631
11631
|
const _result = this.seen.get(schema);
|
|
11632
11632
|
return _result.schema;
|
|
@@ -13586,6 +13586,8 @@ var LCNProfileDisplayValidator = external_exports.object({
|
|
|
13586
13586
|
idBackgroundColor: external_exports.string().optional(),
|
|
13587
13587
|
repeatIdBackgroundImage: external_exports.boolean().optional()
|
|
13588
13588
|
});
|
|
13589
|
+
var ProfileVisibilityEnum = external_exports.enum(["public", "connections_only", "private"]);
|
|
13590
|
+
var AllowConnectionRequestsEnum = external_exports.enum(["anyone", "invite_only"]);
|
|
13589
13591
|
var LCNProfileValidator = external_exports.object({
|
|
13590
13592
|
profileId: external_exports.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
13591
13593
|
displayName: external_exports.string().default("").describe("Human-readable display name for the profile."),
|
|
@@ -13593,6 +13595,9 @@ var LCNProfileValidator = external_exports.object({
|
|
|
13593
13595
|
bio: external_exports.string().default("").describe("Longer bio for the profile."),
|
|
13594
13596
|
did: external_exports.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
13595
13597
|
isPrivate: external_exports.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
13598
|
+
profileVisibility: ProfileVisibilityEnum.default("public").optional().describe("Profile visibility: 'public', 'connections_only', or 'private'."),
|
|
13599
|
+
showEmail: external_exports.boolean().default(false).optional().describe("Whether to show email to connections."),
|
|
13600
|
+
allowConnectionRequests: AllowConnectionRequestsEnum.default("anyone").optional().describe("Who can send connection requests: 'anyone' or 'invite_only'."),
|
|
13596
13601
|
email: external_exports.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
13597
13602
|
image: external_exports.string().optional().describe("Profile image URL for the profile."),
|
|
13598
13603
|
heroImage: external_exports.string().optional().describe("Hero image URL for the profile."),
|
|
@@ -13607,6 +13612,32 @@ var LCNProfileValidator = external_exports.object({
|
|
|
13607
13612
|
country: external_exports.string().optional().describe("Country for the profile."),
|
|
13608
13613
|
approved: external_exports.boolean().optional().describe("Approval status for the profile.")
|
|
13609
13614
|
});
|
|
13615
|
+
var LCNPublicProfileValidator = LCNProfileValidator.pick({
|
|
13616
|
+
profileId: true,
|
|
13617
|
+
displayName: true,
|
|
13618
|
+
shortBio: true,
|
|
13619
|
+
image: true,
|
|
13620
|
+
heroImage: true,
|
|
13621
|
+
type: true,
|
|
13622
|
+
isServiceProfile: true,
|
|
13623
|
+
display: true
|
|
13624
|
+
});
|
|
13625
|
+
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
13626
|
+
bio: LCNProfileValidator.shape.bio,
|
|
13627
|
+
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
13628
|
+
role: LCNProfileValidator.shape.role,
|
|
13629
|
+
highlightedCredentials: LCNProfileValidator.shape.highlightedCredentials,
|
|
13630
|
+
did: LCNProfileValidator.shape.did
|
|
13631
|
+
});
|
|
13632
|
+
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
13633
|
+
email: LCNProfileValidator.shape.email
|
|
13634
|
+
});
|
|
13635
|
+
var LCNVisibleProfileValidator = external_exports.union([
|
|
13636
|
+
LCNConnectionProfileValidator.strict(),
|
|
13637
|
+
LCNAuthedProfileValidator.strict(),
|
|
13638
|
+
LCNPublicProfileValidator.strict(),
|
|
13639
|
+
LCNProfileValidator
|
|
13640
|
+
]);
|
|
13610
13641
|
var LCNProfileQueryValidator = external_exports.object({
|
|
13611
13642
|
profileId: StringQuery,
|
|
13612
13643
|
displayName: StringQuery,
|
|
@@ -13620,6 +13651,9 @@ var LCNProfileQueryValidator = external_exports.object({
|
|
|
13620
13651
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
13621
13652
|
records: LCNProfileValidator.array()
|
|
13622
13653
|
});
|
|
13654
|
+
var PaginatedVisibleLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
13655
|
+
records: LCNVisibleProfileValidator.array()
|
|
13656
|
+
});
|
|
13623
13657
|
var LCNProfileConnectionStatusEnum = external_exports.enum([
|
|
13624
13658
|
"CONNECTED",
|
|
13625
13659
|
"PENDING_REQUEST_SENT",
|
|
@@ -13753,7 +13787,7 @@ var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
|
13753
13787
|
records: BoostValidator.array()
|
|
13754
13788
|
});
|
|
13755
13789
|
var BoostRecipientValidator = external_exports.object({
|
|
13756
|
-
to:
|
|
13790
|
+
to: LCNVisibleProfileValidator,
|
|
13757
13791
|
from: external_exports.string(),
|
|
13758
13792
|
received: external_exports.string().optional(),
|
|
13759
13793
|
uri: external_exports.string().optional()
|
|
@@ -13762,7 +13796,7 @@ var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
|
13762
13796
|
records: BoostRecipientValidator.array()
|
|
13763
13797
|
});
|
|
13764
13798
|
var BoostRecipientWithChildrenValidator = external_exports.object({
|
|
13765
|
-
to:
|
|
13799
|
+
to: LCNVisibleProfileValidator,
|
|
13766
13800
|
from: external_exports.string(),
|
|
13767
13801
|
received: external_exports.string().optional(),
|
|
13768
13802
|
boostUris: external_exports.array(external_exports.string()),
|
|
@@ -13906,6 +13940,16 @@ var ConsentFlowContractDetailsValidator = external_exports.object({
|
|
|
13906
13940
|
autoBoosts: external_exports.string().array().optional(),
|
|
13907
13941
|
writers: external_exports.array(LCNProfileValidator).optional()
|
|
13908
13942
|
});
|
|
13943
|
+
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
|
|
13944
|
+
var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
|
|
13945
|
+
var ConsentFlowContractRequestForProfileValidator = external_exports.object({
|
|
13946
|
+
profile: LCNProfileValidator,
|
|
13947
|
+
status: ConsentFlowContractRequestStatusValidator,
|
|
13948
|
+
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
13949
|
+
});
|
|
13950
|
+
var ConsentFlowContractRequestForProfileListValidator = external_exports.array(
|
|
13951
|
+
ConsentFlowContractRequestForProfileValidator
|
|
13952
|
+
);
|
|
13909
13953
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
13910
13954
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
13911
13955
|
});
|
|
@@ -14066,7 +14110,9 @@ var LCNNotificationTypeEnumValidator = external_exports.enum([
|
|
|
14066
14110
|
"PROFILE_PARENT_APPROVED",
|
|
14067
14111
|
"APP_LISTING_SUBMITTED",
|
|
14068
14112
|
"APP_LISTING_APPROVED",
|
|
14069
|
-
"APP_LISTING_REJECTED"
|
|
14113
|
+
"APP_LISTING_REJECTED",
|
|
14114
|
+
"APP_LISTING_WITHDRAWN",
|
|
14115
|
+
"DEVICE_LINK_REQUEST"
|
|
14070
14116
|
]);
|
|
14071
14117
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
14072
14118
|
title: external_exports.string().optional(),
|
|
@@ -14205,6 +14251,7 @@ var InboxCredentialValidator = external_exports.object({
|
|
|
14205
14251
|
webhookUrl: external_exports.string().optional(),
|
|
14206
14252
|
boostUri: external_exports.string().optional(),
|
|
14207
14253
|
activityId: external_exports.string().optional(),
|
|
14254
|
+
integrationId: external_exports.string().optional(),
|
|
14208
14255
|
signingAuthority: external_exports.object({
|
|
14209
14256
|
endpoint: external_exports.string().optional(),
|
|
14210
14257
|
name: external_exports.string().optional()
|
|
@@ -14306,8 +14353,9 @@ var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
|
14306
14353
|
claimUrl: external_exports.string().url().optional(),
|
|
14307
14354
|
recipientDid: external_exports.string().optional()
|
|
14308
14355
|
});
|
|
14356
|
+
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
14309
14357
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
14310
|
-
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
|
|
14358
|
+
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
14311
14359
|
configuration: external_exports.object({
|
|
14312
14360
|
publishableKey: external_exports.string(),
|
|
14313
14361
|
signingAuthorityName: external_exports.string().optional(),
|
|
@@ -14591,6 +14639,11 @@ var PromotionLevelValidator = external_exports.enum([
|
|
|
14591
14639
|
"DEMOTED"
|
|
14592
14640
|
]);
|
|
14593
14641
|
var AgeRatingValidator = external_exports.enum(["4+", "9+", "12+", "17+"]);
|
|
14642
|
+
var AppStoreListingSubmitterValidator = external_exports.object({
|
|
14643
|
+
profileId: external_exports.string(),
|
|
14644
|
+
displayName: external_exports.string(),
|
|
14645
|
+
email: external_exports.string().optional()
|
|
14646
|
+
});
|
|
14594
14647
|
var AppStoreListingValidator = external_exports.object({
|
|
14595
14648
|
listing_id: external_exports.string(),
|
|
14596
14649
|
slug: external_exports.string().optional(),
|
|
@@ -14612,7 +14665,10 @@ var AppStoreListingValidator = external_exports.object({
|
|
|
14612
14665
|
screenshots: external_exports.array(external_exports.string()).optional(),
|
|
14613
14666
|
hero_background_color: external_exports.string().optional(),
|
|
14614
14667
|
min_age: external_exports.number().int().min(0).max(18).optional(),
|
|
14615
|
-
age_rating: AgeRatingValidator.optional()
|
|
14668
|
+
age_rating: AgeRatingValidator.optional(),
|
|
14669
|
+
submitted_at: external_exports.string().optional(),
|
|
14670
|
+
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
14671
|
+
contact_email: external_exports.string().email().optional()
|
|
14616
14672
|
});
|
|
14617
14673
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
14618
14674
|
listing_id: true,
|
|
@@ -14640,9 +14696,39 @@ var AppBoostValidator = external_exports.object({
|
|
|
14640
14696
|
var SendCredentialEventValidator = external_exports.object({
|
|
14641
14697
|
type: external_exports.literal("send-credential"),
|
|
14642
14698
|
templateAlias: external_exports.string(),
|
|
14643
|
-
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
14699
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14700
|
+
preventDuplicateClaim: external_exports.boolean().optional()
|
|
14701
|
+
});
|
|
14702
|
+
var CheckCredentialEventValidator = external_exports.object({
|
|
14703
|
+
type: external_exports.literal("check-credential"),
|
|
14704
|
+
templateAlias: external_exports.string().optional(),
|
|
14705
|
+
boostUri: external_exports.string().optional()
|
|
14706
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14707
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14708
|
+
});
|
|
14709
|
+
var CheckIssuanceStatusEventValidator = external_exports.object({
|
|
14710
|
+
type: external_exports.literal("check-issuance-status"),
|
|
14711
|
+
templateAlias: external_exports.string().optional(),
|
|
14712
|
+
boostUri: external_exports.string().optional(),
|
|
14713
|
+
recipient: external_exports.string()
|
|
14714
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14715
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14644
14716
|
});
|
|
14645
|
-
var
|
|
14717
|
+
var GetTemplateRecipientsEventValidator = external_exports.object({
|
|
14718
|
+
type: external_exports.literal("get-template-recipients"),
|
|
14719
|
+
templateAlias: external_exports.string().optional(),
|
|
14720
|
+
boostUri: external_exports.string().optional(),
|
|
14721
|
+
limit: external_exports.number().optional(),
|
|
14722
|
+
cursor: external_exports.string().optional()
|
|
14723
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14724
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14725
|
+
});
|
|
14726
|
+
var AppEventValidator = external_exports.discriminatedUnion("type", [
|
|
14727
|
+
SendCredentialEventValidator,
|
|
14728
|
+
CheckCredentialEventValidator,
|
|
14729
|
+
CheckIssuanceStatusEventValidator,
|
|
14730
|
+
GetTemplateRecipientsEventValidator
|
|
14731
|
+
]);
|
|
14646
14732
|
var AppEventInputValidator = external_exports.object({
|
|
14647
14733
|
listingId: external_exports.string(),
|
|
14648
14734
|
event: AppEventValidator
|
|
@@ -14705,6 +14791,14 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
14705
14791
|
failed: external_exports.number(),
|
|
14706
14792
|
claimRate: external_exports.number()
|
|
14707
14793
|
});
|
|
14794
|
+
var _a2;
|
|
14795
|
+
var AuthSessionError = (_a2 = class extends Error {
|
|
14796
|
+
constructor(message, reason) {
|
|
14797
|
+
super(message);
|
|
14798
|
+
this.reason = reason;
|
|
14799
|
+
this.name = "AuthSessionError";
|
|
14800
|
+
}
|
|
14801
|
+
}, __name(_a2, "AuthSessionError"), __name2(_a2, "AuthSessionError"), _a2);
|
|
14708
14802
|
|
|
14709
14803
|
// src/plugin.ts
|
|
14710
14804
|
var import_helpers = require("@learncard/helpers");
|
|
@@ -15197,7 +15291,12 @@ var renderTemplateJson = /* @__PURE__ */ __name((jsonString, templateData) => {
|
|
|
15197
15291
|
const unescapedTemplate = jsonString.replace(/\{\{([^{}]+)\}\}/g, "{{{$1}}}");
|
|
15198
15292
|
return mustache_default.render(unescapedTemplate, preparedData);
|
|
15199
15293
|
}, "renderTemplateJson");
|
|
15200
|
-
|
|
15294
|
+
var hasDid = /* @__PURE__ */ __name((profile) => {
|
|
15295
|
+
return !!profile && "did" in profile && typeof profile.did === "string" && profile.did.length > 0;
|
|
15296
|
+
}, "hasDid");
|
|
15297
|
+
async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, options) {
|
|
15298
|
+
const apiToken = typeof apiTokenOrOptions === "string" ? apiTokenOrOptions : void 0;
|
|
15299
|
+
const guardianApprovalGetter = (typeof apiTokenOrOptions === "object" ? apiTokenOrOptions?.guardianApprovalGetter : void 0) ?? options?.guardianApprovalGetter;
|
|
15201
15300
|
let did = "";
|
|
15202
15301
|
try {
|
|
15203
15302
|
const idPlane = learnCard?.id;
|
|
@@ -15208,11 +15307,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15208
15307
|
learnCard?.debug?.("LCN: no local DID available at init; will fetch from profile");
|
|
15209
15308
|
}
|
|
15210
15309
|
learnCard?.debug?.("Adding LearnCardNetwork Plugin");
|
|
15211
|
-
const client = apiToken ? await (0, import_network_brain_client.getApiTokenClient)(url2, apiToken) : await (0, import_network_brain_client.getClient)(
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15310
|
+
const client = apiToken ? await (0, import_network_brain_client.getApiTokenClient)(url2, apiToken, guardianApprovalGetter) : await (0, import_network_brain_client.getClient)(
|
|
15311
|
+
url2,
|
|
15312
|
+
async (challenge) => {
|
|
15313
|
+
const jwt2 = await learnCard.invoke.getDidAuthVp({
|
|
15314
|
+
proofFormat: "jwt",
|
|
15315
|
+
challenge
|
|
15316
|
+
});
|
|
15317
|
+
if (typeof jwt2 !== "string") throw new Error("Error getting DID-Auth-JWT!");
|
|
15318
|
+
return jwt2;
|
|
15319
|
+
},
|
|
15320
|
+
guardianApprovalGetter
|
|
15321
|
+
);
|
|
15216
15322
|
let userData;
|
|
15217
15323
|
learnCard?.debug?.("LCN: initial getProfile query starting", { apiToken: !!apiToken });
|
|
15218
15324
|
const initialQuery = client.profile.getProfile.query().then((result) => {
|
|
@@ -15358,16 +15464,16 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15358
15464
|
const newDid = await client.profile.createManagedServiceProfile.mutate(profile);
|
|
15359
15465
|
return newDid;
|
|
15360
15466
|
}, "createManagedServiceProfile"),
|
|
15361
|
-
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15467
|
+
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15362
15468
|
await ensureUser();
|
|
15363
|
-
return client.profile.getAvailableProfiles.query(
|
|
15469
|
+
return client.profile.getAvailableProfiles.query(options2);
|
|
15364
15470
|
}, "getAvailableProfiles"),
|
|
15365
|
-
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15366
|
-
return client.profileManager.getManagedProfiles.query(
|
|
15471
|
+
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15472
|
+
return client.profileManager.getManagedProfiles.query(options2);
|
|
15367
15473
|
}, "getManagedProfiles"),
|
|
15368
|
-
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15474
|
+
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15369
15475
|
await ensureUser();
|
|
15370
|
-
return client.profile.getManagedServiceProfiles.query(
|
|
15476
|
+
return client.profile.getManagedServiceProfiles.query(options2);
|
|
15371
15477
|
}, "getManagedServiceProfiles"),
|
|
15372
15478
|
updateProfile: /* @__PURE__ */ __name(async (_learnCard, profile) => {
|
|
15373
15479
|
await ensureUser();
|
|
@@ -15447,9 +15553,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15447
15553
|
await ensureUser();
|
|
15448
15554
|
return client.profile.connections.query();
|
|
15449
15555
|
}, "getConnections"),
|
|
15450
|
-
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15556
|
+
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15451
15557
|
await ensureUser();
|
|
15452
|
-
return client.profile.paginatedConnections.query(
|
|
15558
|
+
return client.profile.paginatedConnections.query(options2);
|
|
15453
15559
|
}, "getPaginatedConnections"),
|
|
15454
15560
|
getPendingConnections: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15455
15561
|
console.warn(
|
|
@@ -15458,9 +15564,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15458
15564
|
await ensureUser();
|
|
15459
15565
|
return client.profile.pendingConnections.query();
|
|
15460
15566
|
}, "getPendingConnections"),
|
|
15461
|
-
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15567
|
+
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15462
15568
|
await ensureUser();
|
|
15463
|
-
return client.profile.paginatedPendingConnections.query(
|
|
15569
|
+
return client.profile.paginatedPendingConnections.query(options2);
|
|
15464
15570
|
}, "getPaginatedPendingConnections"),
|
|
15465
15571
|
getConnectionRequests: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15466
15572
|
console.warn(
|
|
@@ -15469,9 +15575,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15469
15575
|
await ensureUser();
|
|
15470
15576
|
return client.profile.connectionRequests.query();
|
|
15471
15577
|
}, "getConnectionRequests"),
|
|
15472
|
-
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard,
|
|
15578
|
+
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15473
15579
|
await ensureUser();
|
|
15474
|
-
return client.profile.paginatedConnectionRequests.query(
|
|
15580
|
+
return client.profile.paginatedConnectionRequests.query(options2);
|
|
15475
15581
|
}, "getPaginatedConnectionRequests"),
|
|
15476
15582
|
generateInvite: /* @__PURE__ */ __name(async (_learnCard, challenge, expiration, maxUses) => {
|
|
15477
15583
|
await ensureUser();
|
|
@@ -15518,6 +15624,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15518
15624
|
}
|
|
15519
15625
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
15520
15626
|
if (!target) throw new Error("Could not find target account");
|
|
15627
|
+
if (!hasDid(target)) throw new Error("Could not find target DID");
|
|
15521
15628
|
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
15522
15629
|
_learnCard.id.did(),
|
|
15523
15630
|
target.did
|
|
@@ -15528,9 +15635,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15528
15635
|
metadata
|
|
15529
15636
|
});
|
|
15530
15637
|
}, "sendCredential"),
|
|
15531
|
-
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15638
|
+
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15532
15639
|
await ensureUser();
|
|
15533
|
-
return client.credential.acceptCredential.mutate({ uri, options });
|
|
15640
|
+
return client.credential.acceptCredential.mutate({ uri, options: options2 });
|
|
15534
15641
|
}, "acceptCredential"),
|
|
15535
15642
|
getReceivedCredentials: /* @__PURE__ */ __name(async (_learnCard, from) => {
|
|
15536
15643
|
await ensureUser();
|
|
@@ -15562,6 +15669,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15562
15669
|
}
|
|
15563
15670
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
15564
15671
|
if (!target) throw new Error("Could not find target account");
|
|
15672
|
+
if (!hasDid(target)) throw new Error("Could not find target DID");
|
|
15565
15673
|
const presentation = await _learnCard.invoke.createDagJwe(vp, [
|
|
15566
15674
|
_learnCard.id.did(),
|
|
15567
15675
|
target.did
|
|
@@ -15610,18 +15718,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15610
15718
|
await ensureUser();
|
|
15611
15719
|
return client.boost.getBoostSkills.query({ uri });
|
|
15612
15720
|
}, "getBoostSkills"),
|
|
15613
|
-
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15721
|
+
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15614
15722
|
if (!userData) throw new Error("Please make an account first!");
|
|
15615
|
-
const { limit, cursor, query } =
|
|
15723
|
+
const { limit, cursor, query } = options2 ?? {};
|
|
15616
15724
|
return client.boost.getBoostFrameworks.query({ uri, limit, cursor, query });
|
|
15617
15725
|
}, "getBoostFrameworks"),
|
|
15618
15726
|
getSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15619
15727
|
if (!userData) throw new Error("Please make an account first!");
|
|
15620
15728
|
return client.boost.getSkillsAvailableForBoost.query({ uri });
|
|
15621
15729
|
}, "getSkillsAvailableForBoost"),
|
|
15622
|
-
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query,
|
|
15730
|
+
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query, options2 = {}) => {
|
|
15623
15731
|
if (!userData) throw new Error("Please make an account first!");
|
|
15624
|
-
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...
|
|
15732
|
+
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...options2 });
|
|
15625
15733
|
}, "searchSkillsAvailableForBoost"),
|
|
15626
15734
|
getBoosts: /* @__PURE__ */ __name(async (_learnCard, query) => {
|
|
15627
15735
|
console.warn(
|
|
@@ -15634,41 +15742,41 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15634
15742
|
await ensureUser();
|
|
15635
15743
|
return client.boost.countBoosts.query({ query });
|
|
15636
15744
|
}, "countBoosts"),
|
|
15637
|
-
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard,
|
|
15745
|
+
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15638
15746
|
await ensureUser();
|
|
15639
|
-
return client.boost.getPaginatedBoosts.query(
|
|
15747
|
+
return client.boost.getPaginatedBoosts.query(options2);
|
|
15640
15748
|
}, "getPaginatedBoosts"),
|
|
15641
|
-
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15749
|
+
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15642
15750
|
await ensureUser();
|
|
15643
|
-
return client.boost.getBoostChildren.query({ uri, ...
|
|
15751
|
+
return client.boost.getBoostChildren.query({ uri, ...options2 });
|
|
15644
15752
|
}, "getBoostChildren"),
|
|
15645
|
-
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15753
|
+
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15646
15754
|
await ensureUser();
|
|
15647
|
-
return client.boost.countBoostChildren.query({ uri, ...
|
|
15755
|
+
return client.boost.countBoostChildren.query({ uri, ...options2 });
|
|
15648
15756
|
}, "countBoostChildren"),
|
|
15649
|
-
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15757
|
+
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15650
15758
|
await ensureUser();
|
|
15651
|
-
return client.boost.getBoostSiblings.query({ uri, ...
|
|
15759
|
+
return client.boost.getBoostSiblings.query({ uri, ...options2 });
|
|
15652
15760
|
}, "getBoostSiblings"),
|
|
15653
|
-
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15761
|
+
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15654
15762
|
await ensureUser();
|
|
15655
|
-
return client.boost.countBoostSiblings.query({ uri, ...
|
|
15763
|
+
return client.boost.countBoostSiblings.query({ uri, ...options2 });
|
|
15656
15764
|
}, "countBoostSiblings"),
|
|
15657
|
-
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15765
|
+
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15658
15766
|
await ensureUser();
|
|
15659
|
-
return client.boost.getFamilialBoosts.query({ uri, ...
|
|
15767
|
+
return client.boost.getFamilialBoosts.query({ uri, ...options2 });
|
|
15660
15768
|
}, "getFamilialBoosts"),
|
|
15661
|
-
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15769
|
+
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15662
15770
|
await ensureUser();
|
|
15663
|
-
return client.boost.countFamilialBoosts.query({ uri, ...
|
|
15771
|
+
return client.boost.countFamilialBoosts.query({ uri, ...options2 });
|
|
15664
15772
|
}, "countFamilialBoosts"),
|
|
15665
|
-
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15773
|
+
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15666
15774
|
await ensureUser();
|
|
15667
|
-
return client.boost.getBoostParents.query({ uri, ...
|
|
15775
|
+
return client.boost.getBoostParents.query({ uri, ...options2 });
|
|
15668
15776
|
}, "getBoostParents"),
|
|
15669
|
-
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15777
|
+
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15670
15778
|
await ensureUser();
|
|
15671
|
-
return client.boost.countBoostParents.query({ uri, ...
|
|
15779
|
+
return client.boost.countBoostParents.query({ uri, ...options2 });
|
|
15672
15780
|
}, "countBoostParents"),
|
|
15673
15781
|
makeBoostParent: /* @__PURE__ */ __name(async (_learnCard, uris) => {
|
|
15674
15782
|
await ensureUser();
|
|
@@ -15743,9 +15851,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15743
15851
|
includeUnacceptedBoosts
|
|
15744
15852
|
});
|
|
15745
15853
|
}, "countConnectedBoostRecipients"),
|
|
15746
|
-
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15854
|
+
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15747
15855
|
await ensureUser();
|
|
15748
|
-
return client.boost.getChildrenProfileManagers.query({ uri, ...
|
|
15856
|
+
return client.boost.getChildrenProfileManagers.query({ uri, ...options2 });
|
|
15749
15857
|
}, "getBoostChildrenProfileManagers"),
|
|
15750
15858
|
updateBoost: /* @__PURE__ */ __name(async (_learnCard, uri, updates, credential) => {
|
|
15751
15859
|
await ensureUser();
|
|
@@ -15754,7 +15862,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15754
15862
|
uri,
|
|
15755
15863
|
updates: { ...credential && { credential }, ...restUpdates }
|
|
15756
15864
|
};
|
|
15757
|
-
if (Array.isArray(skills)
|
|
15865
|
+
if (Array.isArray(skills)) payload.skills = skills;
|
|
15758
15866
|
return client.boost.updateBoost.mutate(payload);
|
|
15759
15867
|
}, "updateBoost"),
|
|
15760
15868
|
attachFrameworkToBoost: /* @__PURE__ */ __name(async (_learnCard, boostUri, frameworkId) => {
|
|
@@ -15769,9 +15877,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15769
15877
|
if (!userData) throw new Error("Please make an account first!");
|
|
15770
15878
|
return client.boost.alignBoostSkills.mutate({ boostUri, skills });
|
|
15771
15879
|
}, "alignBoostSkills"),
|
|
15772
|
-
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15880
|
+
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15773
15881
|
await ensureUser();
|
|
15774
|
-
return client.boost.getBoostAdmins.query({ uri, ...
|
|
15882
|
+
return client.boost.getBoostAdmins.query({ uri, ...options2 });
|
|
15775
15883
|
}, "getBoostAdmins"),
|
|
15776
15884
|
getBoostPermissions: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
15777
15885
|
await ensureUser();
|
|
@@ -15809,13 +15917,14 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15809
15917
|
await ensureUser();
|
|
15810
15918
|
return client.boost.deleteBoost.mutate({ uri });
|
|
15811
15919
|
}, "deleteBoost"),
|
|
15812
|
-
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri,
|
|
15920
|
+
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri, options2 = { encrypt: true, skipNotification: false, templateData: {} }) => {
|
|
15813
15921
|
await ensureUser();
|
|
15814
15922
|
const result = await getBoostTemplateForIssuance(_learnCard, boostUri);
|
|
15815
15923
|
const data = await UnsignedVCValidator.spa(result);
|
|
15816
15924
|
if (!data.success) throw new Error("Did not get a valid boost from URI");
|
|
15817
15925
|
const targetProfile = await _learnCard.invoke.getProfile(profileId);
|
|
15818
15926
|
if (!targetProfile) throw new Error("Target profile not found");
|
|
15927
|
+
if (!hasDid(targetProfile)) throw new Error("Target profile has no DID");
|
|
15819
15928
|
let boost = data.data;
|
|
15820
15929
|
if ((0, import_helpers.isVC2Format)(boost)) {
|
|
15821
15930
|
boost.validFrom = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -15832,10 +15941,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15832
15941
|
boost.credentialSubject.id = targetProfile.did;
|
|
15833
15942
|
}
|
|
15834
15943
|
if (boost?.type?.includes("BoostCredential")) boost.boostId = boostUri;
|
|
15835
|
-
if (typeof
|
|
15944
|
+
if (typeof options2 === "object" && options2.templateData && Object.keys(options2.templateData).length > 0) {
|
|
15836
15945
|
try {
|
|
15837
15946
|
const boostString = JSON.stringify(boost);
|
|
15838
|
-
const rendered = renderTemplateJson(boostString,
|
|
15947
|
+
const rendered = renderTemplateJson(boostString, options2.templateData);
|
|
15839
15948
|
boost = JSON.parse(rendered);
|
|
15840
15949
|
} catch (error46) {
|
|
15841
15950
|
throw new Error(
|
|
@@ -15843,17 +15952,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15843
15952
|
);
|
|
15844
15953
|
}
|
|
15845
15954
|
}
|
|
15846
|
-
if (typeof
|
|
15847
|
-
boost =
|
|
15955
|
+
if (typeof options2 === "object" && options2.overideFn) {
|
|
15956
|
+
boost = options2.overideFn(boost);
|
|
15848
15957
|
}
|
|
15849
15958
|
const vc = await _learnCard.invoke.issueCredential(boost);
|
|
15850
|
-
if (typeof
|
|
15959
|
+
if (typeof options2 === "object" && !options2.encrypt || !options2) {
|
|
15851
15960
|
return client.boost.sendBoost.mutate({
|
|
15852
15961
|
profileId,
|
|
15853
15962
|
uri: boostUri,
|
|
15854
15963
|
credential: vc,
|
|
15855
15964
|
options: {
|
|
15856
|
-
skipNotification: typeof
|
|
15965
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15857
15966
|
}
|
|
15858
15967
|
});
|
|
15859
15968
|
}
|
|
@@ -15868,7 +15977,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15868
15977
|
uri: boostUri,
|
|
15869
15978
|
credential,
|
|
15870
15979
|
options: {
|
|
15871
|
-
skipNotification: typeof
|
|
15980
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15872
15981
|
}
|
|
15873
15982
|
});
|
|
15874
15983
|
}, "sendBoost"),
|
|
@@ -15896,12 +16005,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15896
16005
|
await ensureUser();
|
|
15897
16006
|
return client.profile.primarySigningAuthority.query();
|
|
15898
16007
|
}, "getPrimaryRegisteredSigningAuthority"),
|
|
15899
|
-
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA,
|
|
16008
|
+
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA, options2, challenge) => {
|
|
15900
16009
|
await ensureUser();
|
|
15901
16010
|
return client.boost.generateClaimLink.mutate({
|
|
15902
16011
|
boostUri,
|
|
15903
16012
|
claimLinkSA,
|
|
15904
|
-
options,
|
|
16013
|
+
options: options2,
|
|
15905
16014
|
challenge
|
|
15906
16015
|
});
|
|
15907
16016
|
}, "generateClaimLink"),
|
|
@@ -15930,7 +16039,8 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15930
16039
|
targetDid = recipient;
|
|
15931
16040
|
} else {
|
|
15932
16041
|
const targetProfile = await _learnCard.invoke.getProfile(recipient);
|
|
15933
|
-
if (!targetProfile)
|
|
16042
|
+
if (!hasDid(targetProfile))
|
|
16043
|
+
return client.boost.send.mutate(input);
|
|
15934
16044
|
targetDid = targetProfile.did;
|
|
15935
16045
|
}
|
|
15936
16046
|
let boost = data.data;
|
|
@@ -15995,25 +16105,25 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15995
16105
|
getContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15996
16106
|
return client.contracts.getConsentFlowContract.query({ uri });
|
|
15997
16107
|
}, "getContract"),
|
|
15998
|
-
getContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16108
|
+
getContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15999
16109
|
await ensureUser();
|
|
16000
|
-
return client.contracts.getConsentFlowContracts.query(
|
|
16110
|
+
return client.contracts.getConsentFlowContracts.query(options2);
|
|
16001
16111
|
}, "getContracts"),
|
|
16002
16112
|
deleteContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
16003
16113
|
await ensureUser();
|
|
16004
16114
|
return client.contracts.deleteConsentFlowContract.mutate({ uri });
|
|
16005
16115
|
}, "deleteContract"),
|
|
16006
|
-
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16116
|
+
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
16007
16117
|
await ensureUser();
|
|
16008
|
-
return client.contracts.getConsentedDataForContract.query({ uri, ...
|
|
16118
|
+
return client.contracts.getConsentedDataForContract.query({ uri, ...options2 });
|
|
16009
16119
|
}, "getConsentFlowData"),
|
|
16010
|
-
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2,
|
|
16120
|
+
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2, options2 = {}) => {
|
|
16011
16121
|
await ensureUser();
|
|
16012
|
-
return client.contracts.getConsentedDataForDid.query({ did: did2, ...
|
|
16122
|
+
return client.contracts.getConsentedDataForDid.query({ did: did2, ...options2 });
|
|
16013
16123
|
}, "getConsentFlowDataForDid"),
|
|
16014
|
-
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {},
|
|
16124
|
+
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {}, options2 = {}) => {
|
|
16015
16125
|
await ensureUser();
|
|
16016
|
-
return client.contracts.getConsentedData.query({ query, ...
|
|
16126
|
+
return client.contracts.getConsentedData.query({ query, ...options2 });
|
|
16017
16127
|
}, "getAllConsentFlowData"),
|
|
16018
16128
|
writeCredentialToContract: /* @__PURE__ */ __name(async (_learnCard, did2, contractUri, credential, boostUri) => {
|
|
16019
16129
|
await ensureUser();
|
|
@@ -16035,9 +16145,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16035
16145
|
// for SmartResume
|
|
16036
16146
|
});
|
|
16037
16147
|
}, "consentToContract"),
|
|
16038
|
-
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16148
|
+
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16039
16149
|
await ensureUser();
|
|
16040
|
-
return client.contracts.getConsentedContracts.query(
|
|
16150
|
+
return client.contracts.getConsentedContracts.query(options2);
|
|
16041
16151
|
}, "getConsentedContracts"),
|
|
16042
16152
|
updateContractTerms: /* @__PURE__ */ __name(async (_learnCard, uri, { terms, expiresAt, oneTime }) => {
|
|
16043
16153
|
await ensureUser();
|
|
@@ -16052,17 +16162,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16052
16162
|
await ensureUser();
|
|
16053
16163
|
return client.contracts.withdrawConsent.mutate({ uri });
|
|
16054
16164
|
}, "withdrawConsent"),
|
|
16055
|
-
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16165
|
+
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
16056
16166
|
await ensureUser();
|
|
16057
|
-
return client.contracts.getTermsTransactionHistory.query({ uri, ...
|
|
16167
|
+
return client.contracts.getTermsTransactionHistory.query({ uri, ...options2 });
|
|
16058
16168
|
}, "getConsentFlowTransactions"),
|
|
16059
|
-
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri,
|
|
16169
|
+
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri, options2 = {}) => {
|
|
16060
16170
|
await ensureUser();
|
|
16061
|
-
return client.contracts.getCredentialsForContract.query({ termsUri, ...
|
|
16171
|
+
return client.contracts.getCredentialsForContract.query({ termsUri, ...options2 });
|
|
16062
16172
|
}, "getCredentialsForContract"),
|
|
16063
|
-
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16173
|
+
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16064
16174
|
await ensureUser();
|
|
16065
|
-
return client.contracts.getAllCredentialsForTerms.query(
|
|
16175
|
+
return client.contracts.getAllCredentialsForTerms.query(options2);
|
|
16066
16176
|
}, "getConsentFlowCredentials"),
|
|
16067
16177
|
verifyConsent: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
16068
16178
|
await ensureUser();
|
|
@@ -16111,6 +16221,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16111
16221
|
targetProfileId
|
|
16112
16222
|
});
|
|
16113
16223
|
}, "getAllContractRequestsForProfile"),
|
|
16224
|
+
getSharedInsightsRequestsForProfile: /* @__PURE__ */ __name(async (_learnCard, targetProfileId) => {
|
|
16225
|
+
await ensureUser();
|
|
16226
|
+
return client.contracts.getSharedInsightsRequestsForProfile.query({
|
|
16227
|
+
targetProfileId
|
|
16228
|
+
});
|
|
16229
|
+
}, "getSharedInsightsRequestsForProfile"),
|
|
16114
16230
|
forwardContractRequestToProfile: /* @__PURE__ */ __name(async (_learnCard, parentProfileId, targetProfileId, contractUri) => {
|
|
16115
16231
|
await ensureUser();
|
|
16116
16232
|
return client.contracts.forwardContractRequestToProfile.mutate({
|
|
@@ -16163,9 +16279,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16163
16279
|
await ensureUser();
|
|
16164
16280
|
return client.claimHook.createClaimHook.mutate({ hook });
|
|
16165
16281
|
}, "createClaimHook"),
|
|
16166
|
-
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard,
|
|
16282
|
+
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16167
16283
|
await ensureUser();
|
|
16168
|
-
return client.claimHook.getClaimHooksForBoost.query(
|
|
16284
|
+
return client.claimHook.getClaimHooksForBoost.query(options2);
|
|
16169
16285
|
}, "getClaimHooksForBoost"),
|
|
16170
16286
|
deleteClaimHook: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16171
16287
|
await ensureUser();
|
|
@@ -16191,9 +16307,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16191
16307
|
await ensureUser();
|
|
16192
16308
|
return client.authGrants.getAuthGrant.query({ id });
|
|
16193
16309
|
}, "getAuthGrant"),
|
|
16194
|
-
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard,
|
|
16310
|
+
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16195
16311
|
await ensureUser();
|
|
16196
|
-
return client.authGrants.getAuthGrants.query(
|
|
16312
|
+
return client.authGrants.getAuthGrants.query(options2);
|
|
16197
16313
|
}, "getAuthGrants"),
|
|
16198
16314
|
getAPITokenForAuthGrant: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16199
16315
|
await ensureUser();
|
|
@@ -16215,9 +16331,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16215
16331
|
await ensureUser();
|
|
16216
16332
|
return client.inbox.issue.mutate(issueInboxCredential);
|
|
16217
16333
|
}, "sendCredentialViaInbox"),
|
|
16218
|
-
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16334
|
+
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16219
16335
|
await ensureUser();
|
|
16220
|
-
return client.inbox.getMyIssuedCredentials.query(
|
|
16336
|
+
return client.inbox.getMyIssuedCredentials.query(options2);
|
|
16221
16337
|
}, "getMySentInboxCredentials"),
|
|
16222
16338
|
getInboxCredential: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16223
16339
|
await ensureUser();
|
|
@@ -16227,9 +16343,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16227
16343
|
await ensureUser();
|
|
16228
16344
|
return client.inbox.finalize.mutate();
|
|
16229
16345
|
}, "finalizeInboxCredentials"),
|
|
16230
|
-
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard,
|
|
16346
|
+
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16231
16347
|
await ensureUser();
|
|
16232
|
-
return client.inbox.sendGuardianApprovalEmail.mutate(
|
|
16348
|
+
return client.inbox.sendGuardianApprovalEmail.mutate(options2);
|
|
16233
16349
|
}, "sendGuardianApprovalEmail"),
|
|
16234
16350
|
approveGuardianRequest: /* @__PURE__ */ __name(async (_learnCard, token) => {
|
|
16235
16351
|
return client.inbox.approveGuardianRequest.mutate({ token });
|
|
@@ -16298,46 +16414,46 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16298
16414
|
if (!userData) throw new Error("Please make an account first!");
|
|
16299
16415
|
return client.skillFrameworks.listMine.query();
|
|
16300
16416
|
}, "listMySkillFrameworks"),
|
|
16301
|
-
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard,
|
|
16417
|
+
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16302
16418
|
if (!userData) throw new Error("Please make an account first!");
|
|
16303
|
-
return client.skillFrameworks.getAllAvailableFrameworks.query(
|
|
16419
|
+
return client.skillFrameworks.getAllAvailableFrameworks.query(options2);
|
|
16304
16420
|
}, "getAllAvailableFrameworks"),
|
|
16305
|
-
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id,
|
|
16421
|
+
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id, options2 = {}) => {
|
|
16306
16422
|
if (!userData) throw new Error("Please make an account first!");
|
|
16307
|
-
return client.skillFrameworks.getById.query({ id, ...
|
|
16423
|
+
return client.skillFrameworks.getById.query({ id, ...options2 });
|
|
16308
16424
|
}, "getSkillFrameworkById"),
|
|
16309
|
-
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16425
|
+
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16310
16426
|
if (!userData) throw new Error("Please make an account first!");
|
|
16311
16427
|
return client.skillFrameworks.getBoostsThatUseFramework.query({
|
|
16312
16428
|
id: frameworkId,
|
|
16313
|
-
...
|
|
16429
|
+
...options2
|
|
16314
16430
|
});
|
|
16315
16431
|
}, "getBoostsThatUseFramework"),
|
|
16316
|
-
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16432
|
+
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16317
16433
|
if (!userData) throw new Error("Please make an account first!");
|
|
16318
16434
|
return client.skillFrameworks.countBoostsThatUseFramework.query({
|
|
16319
16435
|
id: frameworkId,
|
|
16320
|
-
...
|
|
16436
|
+
...options2
|
|
16321
16437
|
});
|
|
16322
16438
|
}, "countBoostsThatUseFramework"),
|
|
16323
|
-
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16439
|
+
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16324
16440
|
if (!userData) throw new Error("Please make an account first!");
|
|
16325
|
-
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...
|
|
16441
|
+
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...options2 });
|
|
16326
16442
|
}, "getFrameworkSkillTree"),
|
|
16327
|
-
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId,
|
|
16443
|
+
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId, options2 = {}) => {
|
|
16328
16444
|
if (!userData) throw new Error("Please make an account first!");
|
|
16329
16445
|
return client.skills.getSkillChildrenTree.query({
|
|
16330
16446
|
frameworkId,
|
|
16331
16447
|
id: skillId,
|
|
16332
|
-
...
|
|
16448
|
+
...options2
|
|
16333
16449
|
});
|
|
16334
16450
|
}, "getSkillChildren"),
|
|
16335
|
-
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query,
|
|
16451
|
+
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query, options2 = {}) => {
|
|
16336
16452
|
if (!userData) throw new Error("Please make an account first!");
|
|
16337
16453
|
return client.skills.searchFrameworkSkills.query({
|
|
16338
16454
|
id: frameworkId,
|
|
16339
16455
|
query,
|
|
16340
|
-
...
|
|
16456
|
+
...options2
|
|
16341
16457
|
});
|
|
16342
16458
|
}, "searchFrameworkSkills"),
|
|
16343
16459
|
semanticSearchSkills: /* @__PURE__ */ __name(async (_learnCard, input) => {
|
|
@@ -16412,13 +16528,13 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16412
16528
|
await ensureUser();
|
|
16413
16529
|
return client.integrations.getIntegration.query({ id });
|
|
16414
16530
|
}, "getIntegration"),
|
|
16415
|
-
getIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16531
|
+
getIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16416
16532
|
await ensureUser();
|
|
16417
|
-
return client.integrations.getIntegrations.query(
|
|
16533
|
+
return client.integrations.getIntegrations.query(options2);
|
|
16418
16534
|
}, "getIntegrations"),
|
|
16419
|
-
countIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16535
|
+
countIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16420
16536
|
await ensureUser();
|
|
16421
|
-
return client.integrations.countIntegrations.query(
|
|
16537
|
+
return client.integrations.countIntegrations.query(options2);
|
|
16422
16538
|
}, "countIntegrations"),
|
|
16423
16539
|
updateIntegration: /* @__PURE__ */ __name(async (_learnCard, id, updates) => {
|
|
16424
16540
|
await ensureUser();
|
|
@@ -16463,19 +16579,23 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16463
16579
|
await ensureUser();
|
|
16464
16580
|
return client.appStore.submitForReview.mutate({ listingId });
|
|
16465
16581
|
}, "submitAppStoreListingForReview"),
|
|
16466
|
-
|
|
16582
|
+
unsubmitAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16583
|
+
await ensureUser();
|
|
16584
|
+
return client.appStore.unsubmitForReview.mutate({ listingId });
|
|
16585
|
+
}, "unsubmitAppStoreListing"),
|
|
16586
|
+
getListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId, options2 = {}) => {
|
|
16467
16587
|
await ensureUser();
|
|
16468
16588
|
return client.appStore.getListingsForIntegration.query({
|
|
16469
16589
|
integrationId,
|
|
16470
|
-
...
|
|
16590
|
+
...options2
|
|
16471
16591
|
});
|
|
16472
16592
|
}, "getListingsForIntegration"),
|
|
16473
16593
|
countListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId) => {
|
|
16474
16594
|
await ensureUser();
|
|
16475
16595
|
return client.appStore.countListingsForIntegration.query({ integrationId });
|
|
16476
16596
|
}, "countListingsForIntegration"),
|
|
16477
|
-
browseAppStore: /* @__PURE__ */ __name(async (_learnCard,
|
|
16478
|
-
return client.appStore.browseListedApps.query(
|
|
16597
|
+
browseAppStore: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16598
|
+
return client.appStore.browseListedApps.query(options2);
|
|
16479
16599
|
}, "browseAppStore"),
|
|
16480
16600
|
getPublicAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16481
16601
|
return client.appStore.getPublicListing.query({ listingId });
|
|
@@ -16494,9 +16614,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16494
16614
|
await ensureUser();
|
|
16495
16615
|
return client.appStore.uninstallApp.mutate({ listingId });
|
|
16496
16616
|
}, "uninstallApp"),
|
|
16497
|
-
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard,
|
|
16617
|
+
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16498
16618
|
await ensureUser();
|
|
16499
|
-
return client.appStore.getInstalledApps.query(
|
|
16619
|
+
return client.appStore.getInstalledApps.query(options2);
|
|
16500
16620
|
}, "getInstalledApps"),
|
|
16501
16621
|
countInstalledApps: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16502
16622
|
await ensureUser();
|
|
@@ -16506,6 +16626,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16506
16626
|
await ensureUser();
|
|
16507
16627
|
return client.appStore.isAppInstalled.query({ listingId });
|
|
16508
16628
|
}, "isAppInstalled"),
|
|
16629
|
+
getMyCredentialsFromApp: /* @__PURE__ */ __name(async (_learnCard, listingId, options2 = {}) => {
|
|
16630
|
+
await ensureUser();
|
|
16631
|
+
return client.appStore.getMyCredentialsFromApp.query({ listingId, ...options2 });
|
|
16632
|
+
}, "getMyCredentialsFromApp"),
|
|
16509
16633
|
isAppStoreAdmin: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16510
16634
|
await ensureUser();
|
|
16511
16635
|
return client.appStore.isAdmin.query();
|
|
@@ -16521,9 +16645,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16521
16645
|
promotionLevel
|
|
16522
16646
|
});
|
|
16523
16647
|
}, "adminUpdatePromotionLevel"),
|
|
16524
|
-
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard,
|
|
16648
|
+
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16525
16649
|
await ensureUser();
|
|
16526
|
-
return client.appStore.adminGetAllListings.query(
|
|
16650
|
+
return client.appStore.adminGetAllListings.query(options2);
|
|
16527
16651
|
}, "adminGetAllListings"),
|
|
16528
16652
|
// App Store Boost Management
|
|
16529
16653
|
addBoostToApp: /* @__PURE__ */ __name(async (_learnCard, listingId, boostUri, templateAlias) => {
|
|
@@ -16553,21 +16677,21 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16553
16677
|
}, "resolveFromLCN"),
|
|
16554
16678
|
getLCNClient: /* @__PURE__ */ __name(() => client, "getLCNClient"),
|
|
16555
16679
|
// Activity
|
|
16556
|
-
getMyActivities: /* @__PURE__ */ __name(async (_learnCard,
|
|
16680
|
+
getMyActivities: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16557
16681
|
await ensureUser();
|
|
16558
|
-
return client.activity.getMyActivities.query(
|
|
16682
|
+
return client.activity.getMyActivities.query(options2);
|
|
16559
16683
|
}, "getMyActivities"),
|
|
16560
|
-
getActivityStats: /* @__PURE__ */ __name(async (_learnCard,
|
|
16684
|
+
getActivityStats: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16561
16685
|
await ensureUser();
|
|
16562
|
-
return client.activity.getActivityStats.query(
|
|
16686
|
+
return client.activity.getActivityStats.query(options2);
|
|
16563
16687
|
}, "getActivityStats"),
|
|
16564
|
-
getActivity: /* @__PURE__ */ __name(async (_learnCard,
|
|
16688
|
+
getActivity: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16565
16689
|
await ensureUser();
|
|
16566
|
-
return client.activity.getActivity.query(
|
|
16690
|
+
return client.activity.getActivity.query(options2);
|
|
16567
16691
|
}, "getActivity"),
|
|
16568
|
-
getActivityChain: /* @__PURE__ */ __name(async (_learnCard,
|
|
16692
|
+
getActivityChain: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16569
16693
|
await ensureUser();
|
|
16570
|
-
return client.activity.getActivityChain.query(
|
|
16694
|
+
return client.activity.getActivityChain.query(options2);
|
|
16571
16695
|
}, "getActivityChain")
|
|
16572
16696
|
}
|
|
16573
16697
|
};
|