@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
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;
|
|
@@ -13565,6 +13565,8 @@ var LCNProfileDisplayValidator = external_exports.object({
|
|
|
13565
13565
|
idBackgroundColor: external_exports.string().optional(),
|
|
13566
13566
|
repeatIdBackgroundImage: external_exports.boolean().optional()
|
|
13567
13567
|
});
|
|
13568
|
+
var ProfileVisibilityEnum = external_exports.enum(["public", "connections_only", "private"]);
|
|
13569
|
+
var AllowConnectionRequestsEnum = external_exports.enum(["anyone", "invite_only"]);
|
|
13568
13570
|
var LCNProfileValidator = external_exports.object({
|
|
13569
13571
|
profileId: external_exports.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
|
|
13570
13572
|
displayName: external_exports.string().default("").describe("Human-readable display name for the profile."),
|
|
@@ -13572,6 +13574,9 @@ var LCNProfileValidator = external_exports.object({
|
|
|
13572
13574
|
bio: external_exports.string().default("").describe("Longer bio for the profile."),
|
|
13573
13575
|
did: external_exports.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
|
|
13574
13576
|
isPrivate: external_exports.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
|
|
13577
|
+
profileVisibility: ProfileVisibilityEnum.default("public").optional().describe("Profile visibility: 'public', 'connections_only', or 'private'."),
|
|
13578
|
+
showEmail: external_exports.boolean().default(false).optional().describe("Whether to show email to connections."),
|
|
13579
|
+
allowConnectionRequests: AllowConnectionRequestsEnum.default("anyone").optional().describe("Who can send connection requests: 'anyone' or 'invite_only'."),
|
|
13575
13580
|
email: external_exports.string().optional().describe("Contact email address for the profile. (deprecated)"),
|
|
13576
13581
|
image: external_exports.string().optional().describe("Profile image URL for the profile."),
|
|
13577
13582
|
heroImage: external_exports.string().optional().describe("Hero image URL for the profile."),
|
|
@@ -13586,6 +13591,32 @@ var LCNProfileValidator = external_exports.object({
|
|
|
13586
13591
|
country: external_exports.string().optional().describe("Country for the profile."),
|
|
13587
13592
|
approved: external_exports.boolean().optional().describe("Approval status for the profile.")
|
|
13588
13593
|
});
|
|
13594
|
+
var LCNPublicProfileValidator = LCNProfileValidator.pick({
|
|
13595
|
+
profileId: true,
|
|
13596
|
+
displayName: true,
|
|
13597
|
+
shortBio: true,
|
|
13598
|
+
image: true,
|
|
13599
|
+
heroImage: true,
|
|
13600
|
+
type: true,
|
|
13601
|
+
isServiceProfile: true,
|
|
13602
|
+
display: true
|
|
13603
|
+
});
|
|
13604
|
+
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
13605
|
+
bio: LCNProfileValidator.shape.bio,
|
|
13606
|
+
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
13607
|
+
role: LCNProfileValidator.shape.role,
|
|
13608
|
+
highlightedCredentials: LCNProfileValidator.shape.highlightedCredentials,
|
|
13609
|
+
did: LCNProfileValidator.shape.did
|
|
13610
|
+
});
|
|
13611
|
+
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
13612
|
+
email: LCNProfileValidator.shape.email
|
|
13613
|
+
});
|
|
13614
|
+
var LCNVisibleProfileValidator = external_exports.union([
|
|
13615
|
+
LCNConnectionProfileValidator.strict(),
|
|
13616
|
+
LCNAuthedProfileValidator.strict(),
|
|
13617
|
+
LCNPublicProfileValidator.strict(),
|
|
13618
|
+
LCNProfileValidator
|
|
13619
|
+
]);
|
|
13589
13620
|
var LCNProfileQueryValidator = external_exports.object({
|
|
13590
13621
|
profileId: StringQuery,
|
|
13591
13622
|
displayName: StringQuery,
|
|
@@ -13599,6 +13630,9 @@ var LCNProfileQueryValidator = external_exports.object({
|
|
|
13599
13630
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
13600
13631
|
records: LCNProfileValidator.array()
|
|
13601
13632
|
});
|
|
13633
|
+
var PaginatedVisibleLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
13634
|
+
records: LCNVisibleProfileValidator.array()
|
|
13635
|
+
});
|
|
13602
13636
|
var LCNProfileConnectionStatusEnum = external_exports.enum([
|
|
13603
13637
|
"CONNECTED",
|
|
13604
13638
|
"PENDING_REQUEST_SENT",
|
|
@@ -13732,7 +13766,7 @@ var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
|
13732
13766
|
records: BoostValidator.array()
|
|
13733
13767
|
});
|
|
13734
13768
|
var BoostRecipientValidator = external_exports.object({
|
|
13735
|
-
to:
|
|
13769
|
+
to: LCNVisibleProfileValidator,
|
|
13736
13770
|
from: external_exports.string(),
|
|
13737
13771
|
received: external_exports.string().optional(),
|
|
13738
13772
|
uri: external_exports.string().optional()
|
|
@@ -13741,7 +13775,7 @@ var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
|
13741
13775
|
records: BoostRecipientValidator.array()
|
|
13742
13776
|
});
|
|
13743
13777
|
var BoostRecipientWithChildrenValidator = external_exports.object({
|
|
13744
|
-
to:
|
|
13778
|
+
to: LCNVisibleProfileValidator,
|
|
13745
13779
|
from: external_exports.string(),
|
|
13746
13780
|
received: external_exports.string().optional(),
|
|
13747
13781
|
boostUris: external_exports.array(external_exports.string()),
|
|
@@ -13885,6 +13919,16 @@ var ConsentFlowContractDetailsValidator = external_exports.object({
|
|
|
13885
13919
|
autoBoosts: external_exports.string().array().optional(),
|
|
13886
13920
|
writers: external_exports.array(LCNProfileValidator).optional()
|
|
13887
13921
|
});
|
|
13922
|
+
var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
|
|
13923
|
+
var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
|
|
13924
|
+
var ConsentFlowContractRequestForProfileValidator = external_exports.object({
|
|
13925
|
+
profile: LCNProfileValidator,
|
|
13926
|
+
status: ConsentFlowContractRequestStatusValidator,
|
|
13927
|
+
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
13928
|
+
});
|
|
13929
|
+
var ConsentFlowContractRequestForProfileListValidator = external_exports.array(
|
|
13930
|
+
ConsentFlowContractRequestForProfileValidator
|
|
13931
|
+
);
|
|
13888
13932
|
var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
|
|
13889
13933
|
records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
|
|
13890
13934
|
});
|
|
@@ -14045,7 +14089,9 @@ var LCNNotificationTypeEnumValidator = external_exports.enum([
|
|
|
14045
14089
|
"PROFILE_PARENT_APPROVED",
|
|
14046
14090
|
"APP_LISTING_SUBMITTED",
|
|
14047
14091
|
"APP_LISTING_APPROVED",
|
|
14048
|
-
"APP_LISTING_REJECTED"
|
|
14092
|
+
"APP_LISTING_REJECTED",
|
|
14093
|
+
"APP_LISTING_WITHDRAWN",
|
|
14094
|
+
"DEVICE_LINK_REQUEST"
|
|
14049
14095
|
]);
|
|
14050
14096
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
14051
14097
|
title: external_exports.string().optional(),
|
|
@@ -14184,6 +14230,7 @@ var InboxCredentialValidator = external_exports.object({
|
|
|
14184
14230
|
webhookUrl: external_exports.string().optional(),
|
|
14185
14231
|
boostUri: external_exports.string().optional(),
|
|
14186
14232
|
activityId: external_exports.string().optional(),
|
|
14233
|
+
integrationId: external_exports.string().optional(),
|
|
14187
14234
|
signingAuthority: external_exports.object({
|
|
14188
14235
|
endpoint: external_exports.string().optional(),
|
|
14189
14236
|
name: external_exports.string().optional()
|
|
@@ -14285,8 +14332,9 @@ var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
|
14285
14332
|
claimUrl: external_exports.string().url().optional(),
|
|
14286
14333
|
recipientDid: external_exports.string().optional()
|
|
14287
14334
|
});
|
|
14335
|
+
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
14288
14336
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
14289
|
-
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
|
|
14337
|
+
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
14290
14338
|
configuration: external_exports.object({
|
|
14291
14339
|
publishableKey: external_exports.string(),
|
|
14292
14340
|
signingAuthorityName: external_exports.string().optional(),
|
|
@@ -14570,6 +14618,11 @@ var PromotionLevelValidator = external_exports.enum([
|
|
|
14570
14618
|
"DEMOTED"
|
|
14571
14619
|
]);
|
|
14572
14620
|
var AgeRatingValidator = external_exports.enum(["4+", "9+", "12+", "17+"]);
|
|
14621
|
+
var AppStoreListingSubmitterValidator = external_exports.object({
|
|
14622
|
+
profileId: external_exports.string(),
|
|
14623
|
+
displayName: external_exports.string(),
|
|
14624
|
+
email: external_exports.string().optional()
|
|
14625
|
+
});
|
|
14573
14626
|
var AppStoreListingValidator = external_exports.object({
|
|
14574
14627
|
listing_id: external_exports.string(),
|
|
14575
14628
|
slug: external_exports.string().optional(),
|
|
@@ -14591,7 +14644,10 @@ var AppStoreListingValidator = external_exports.object({
|
|
|
14591
14644
|
screenshots: external_exports.array(external_exports.string()).optional(),
|
|
14592
14645
|
hero_background_color: external_exports.string().optional(),
|
|
14593
14646
|
min_age: external_exports.number().int().min(0).max(18).optional(),
|
|
14594
|
-
age_rating: AgeRatingValidator.optional()
|
|
14647
|
+
age_rating: AgeRatingValidator.optional(),
|
|
14648
|
+
submitted_at: external_exports.string().optional(),
|
|
14649
|
+
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
14650
|
+
contact_email: external_exports.string().email().optional()
|
|
14595
14651
|
});
|
|
14596
14652
|
var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
|
|
14597
14653
|
listing_id: true,
|
|
@@ -14619,9 +14675,39 @@ var AppBoostValidator = external_exports.object({
|
|
|
14619
14675
|
var SendCredentialEventValidator = external_exports.object({
|
|
14620
14676
|
type: external_exports.literal("send-credential"),
|
|
14621
14677
|
templateAlias: external_exports.string(),
|
|
14622
|
-
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
14678
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14679
|
+
preventDuplicateClaim: external_exports.boolean().optional()
|
|
14680
|
+
});
|
|
14681
|
+
var CheckCredentialEventValidator = external_exports.object({
|
|
14682
|
+
type: external_exports.literal("check-credential"),
|
|
14683
|
+
templateAlias: external_exports.string().optional(),
|
|
14684
|
+
boostUri: external_exports.string().optional()
|
|
14685
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14686
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14687
|
+
});
|
|
14688
|
+
var CheckIssuanceStatusEventValidator = external_exports.object({
|
|
14689
|
+
type: external_exports.literal("check-issuance-status"),
|
|
14690
|
+
templateAlias: external_exports.string().optional(),
|
|
14691
|
+
boostUri: external_exports.string().optional(),
|
|
14692
|
+
recipient: external_exports.string()
|
|
14693
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14694
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14623
14695
|
});
|
|
14624
|
-
var
|
|
14696
|
+
var GetTemplateRecipientsEventValidator = external_exports.object({
|
|
14697
|
+
type: external_exports.literal("get-template-recipients"),
|
|
14698
|
+
templateAlias: external_exports.string().optional(),
|
|
14699
|
+
boostUri: external_exports.string().optional(),
|
|
14700
|
+
limit: external_exports.number().optional(),
|
|
14701
|
+
cursor: external_exports.string().optional()
|
|
14702
|
+
}).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
|
|
14703
|
+
message: "Exactly one of templateAlias or boostUri is required"
|
|
14704
|
+
});
|
|
14705
|
+
var AppEventValidator = external_exports.discriminatedUnion("type", [
|
|
14706
|
+
SendCredentialEventValidator,
|
|
14707
|
+
CheckCredentialEventValidator,
|
|
14708
|
+
CheckIssuanceStatusEventValidator,
|
|
14709
|
+
GetTemplateRecipientsEventValidator
|
|
14710
|
+
]);
|
|
14625
14711
|
var AppEventInputValidator = external_exports.object({
|
|
14626
14712
|
listingId: external_exports.string(),
|
|
14627
14713
|
event: AppEventValidator
|
|
@@ -14684,6 +14770,14 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
14684
14770
|
failed: external_exports.number(),
|
|
14685
14771
|
claimRate: external_exports.number()
|
|
14686
14772
|
});
|
|
14773
|
+
var _a2;
|
|
14774
|
+
var AuthSessionError = (_a2 = class extends Error {
|
|
14775
|
+
constructor(message, reason) {
|
|
14776
|
+
super(message);
|
|
14777
|
+
this.reason = reason;
|
|
14778
|
+
this.name = "AuthSessionError";
|
|
14779
|
+
}
|
|
14780
|
+
}, __name(_a2, "AuthSessionError"), __name2(_a2, "AuthSessionError"), _a2);
|
|
14687
14781
|
|
|
14688
14782
|
// src/plugin.ts
|
|
14689
14783
|
import { isVC2Format } from "@learncard/helpers";
|
|
@@ -15176,7 +15270,12 @@ var renderTemplateJson = /* @__PURE__ */ __name((jsonString, templateData) => {
|
|
|
15176
15270
|
const unescapedTemplate = jsonString.replace(/\{\{([^{}]+)\}\}/g, "{{{$1}}}");
|
|
15177
15271
|
return mustache_default.render(unescapedTemplate, preparedData);
|
|
15178
15272
|
}, "renderTemplateJson");
|
|
15179
|
-
|
|
15273
|
+
var hasDid = /* @__PURE__ */ __name((profile) => {
|
|
15274
|
+
return !!profile && "did" in profile && typeof profile.did === "string" && profile.did.length > 0;
|
|
15275
|
+
}, "hasDid");
|
|
15276
|
+
async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, options) {
|
|
15277
|
+
const apiToken = typeof apiTokenOrOptions === "string" ? apiTokenOrOptions : void 0;
|
|
15278
|
+
const guardianApprovalGetter = (typeof apiTokenOrOptions === "object" ? apiTokenOrOptions?.guardianApprovalGetter : void 0) ?? options?.guardianApprovalGetter;
|
|
15180
15279
|
let did = "";
|
|
15181
15280
|
try {
|
|
15182
15281
|
const idPlane = learnCard?.id;
|
|
@@ -15187,11 +15286,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15187
15286
|
learnCard?.debug?.("LCN: no local DID available at init; will fetch from profile");
|
|
15188
15287
|
}
|
|
15189
15288
|
learnCard?.debug?.("Adding LearnCardNetwork Plugin");
|
|
15190
|
-
const client = apiToken ? await getApiTokenClient(url2, apiToken) : await getClient(
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15289
|
+
const client = apiToken ? await getApiTokenClient(url2, apiToken, guardianApprovalGetter) : await getClient(
|
|
15290
|
+
url2,
|
|
15291
|
+
async (challenge) => {
|
|
15292
|
+
const jwt2 = await learnCard.invoke.getDidAuthVp({
|
|
15293
|
+
proofFormat: "jwt",
|
|
15294
|
+
challenge
|
|
15295
|
+
});
|
|
15296
|
+
if (typeof jwt2 !== "string") throw new Error("Error getting DID-Auth-JWT!");
|
|
15297
|
+
return jwt2;
|
|
15298
|
+
},
|
|
15299
|
+
guardianApprovalGetter
|
|
15300
|
+
);
|
|
15195
15301
|
let userData;
|
|
15196
15302
|
learnCard?.debug?.("LCN: initial getProfile query starting", { apiToken: !!apiToken });
|
|
15197
15303
|
const initialQuery = client.profile.getProfile.query().then((result) => {
|
|
@@ -15337,16 +15443,16 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15337
15443
|
const newDid = await client.profile.createManagedServiceProfile.mutate(profile);
|
|
15338
15444
|
return newDid;
|
|
15339
15445
|
}, "createManagedServiceProfile"),
|
|
15340
|
-
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15446
|
+
getAvailableProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15341
15447
|
await ensureUser();
|
|
15342
|
-
return client.profile.getAvailableProfiles.query(
|
|
15448
|
+
return client.profile.getAvailableProfiles.query(options2);
|
|
15343
15449
|
}, "getAvailableProfiles"),
|
|
15344
|
-
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15345
|
-
return client.profileManager.getManagedProfiles.query(
|
|
15450
|
+
getManagedProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15451
|
+
return client.profileManager.getManagedProfiles.query(options2);
|
|
15346
15452
|
}, "getManagedProfiles"),
|
|
15347
|
-
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard,
|
|
15453
|
+
getManagedServiceProfiles: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
15348
15454
|
await ensureUser();
|
|
15349
|
-
return client.profile.getManagedServiceProfiles.query(
|
|
15455
|
+
return client.profile.getManagedServiceProfiles.query(options2);
|
|
15350
15456
|
}, "getManagedServiceProfiles"),
|
|
15351
15457
|
updateProfile: /* @__PURE__ */ __name(async (_learnCard, profile) => {
|
|
15352
15458
|
await ensureUser();
|
|
@@ -15426,9 +15532,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15426
15532
|
await ensureUser();
|
|
15427
15533
|
return client.profile.connections.query();
|
|
15428
15534
|
}, "getConnections"),
|
|
15429
|
-
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15535
|
+
getPaginatedConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15430
15536
|
await ensureUser();
|
|
15431
|
-
return client.profile.paginatedConnections.query(
|
|
15537
|
+
return client.profile.paginatedConnections.query(options2);
|
|
15432
15538
|
}, "getPaginatedConnections"),
|
|
15433
15539
|
getPendingConnections: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15434
15540
|
console.warn(
|
|
@@ -15437,9 +15543,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15437
15543
|
await ensureUser();
|
|
15438
15544
|
return client.profile.pendingConnections.query();
|
|
15439
15545
|
}, "getPendingConnections"),
|
|
15440
|
-
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard,
|
|
15546
|
+
getPaginatedPendingConnections: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15441
15547
|
await ensureUser();
|
|
15442
|
-
return client.profile.paginatedPendingConnections.query(
|
|
15548
|
+
return client.profile.paginatedPendingConnections.query(options2);
|
|
15443
15549
|
}, "getPaginatedPendingConnections"),
|
|
15444
15550
|
getConnectionRequests: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
15445
15551
|
console.warn(
|
|
@@ -15448,9 +15554,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15448
15554
|
await ensureUser();
|
|
15449
15555
|
return client.profile.connectionRequests.query();
|
|
15450
15556
|
}, "getConnectionRequests"),
|
|
15451
|
-
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard,
|
|
15557
|
+
getPaginatedConnectionRequests: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15452
15558
|
await ensureUser();
|
|
15453
|
-
return client.profile.paginatedConnectionRequests.query(
|
|
15559
|
+
return client.profile.paginatedConnectionRequests.query(options2);
|
|
15454
15560
|
}, "getPaginatedConnectionRequests"),
|
|
15455
15561
|
generateInvite: /* @__PURE__ */ __name(async (_learnCard, challenge, expiration, maxUses) => {
|
|
15456
15562
|
await ensureUser();
|
|
@@ -15497,6 +15603,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15497
15603
|
}
|
|
15498
15604
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
15499
15605
|
if (!target) throw new Error("Could not find target account");
|
|
15606
|
+
if (!hasDid(target)) throw new Error("Could not find target DID");
|
|
15500
15607
|
const credential = await _learnCard.invoke.createDagJwe(vc, [
|
|
15501
15608
|
_learnCard.id.did(),
|
|
15502
15609
|
target.did
|
|
@@ -15507,9 +15614,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15507
15614
|
metadata
|
|
15508
15615
|
});
|
|
15509
15616
|
}, "sendCredential"),
|
|
15510
|
-
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15617
|
+
acceptCredential: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15511
15618
|
await ensureUser();
|
|
15512
|
-
return client.credential.acceptCredential.mutate({ uri, options });
|
|
15619
|
+
return client.credential.acceptCredential.mutate({ uri, options: options2 });
|
|
15513
15620
|
}, "acceptCredential"),
|
|
15514
15621
|
getReceivedCredentials: /* @__PURE__ */ __name(async (_learnCard, from) => {
|
|
15515
15622
|
await ensureUser();
|
|
@@ -15541,6 +15648,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15541
15648
|
}
|
|
15542
15649
|
const target = await _learnCard.invoke.getProfile(profileId);
|
|
15543
15650
|
if (!target) throw new Error("Could not find target account");
|
|
15651
|
+
if (!hasDid(target)) throw new Error("Could not find target DID");
|
|
15544
15652
|
const presentation = await _learnCard.invoke.createDagJwe(vp, [
|
|
15545
15653
|
_learnCard.id.did(),
|
|
15546
15654
|
target.did
|
|
@@ -15589,18 +15697,18 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15589
15697
|
await ensureUser();
|
|
15590
15698
|
return client.boost.getBoostSkills.query({ uri });
|
|
15591
15699
|
}, "getBoostSkills"),
|
|
15592
|
-
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15700
|
+
getBoostFrameworks: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15593
15701
|
if (!userData) throw new Error("Please make an account first!");
|
|
15594
|
-
const { limit, cursor, query } =
|
|
15702
|
+
const { limit, cursor, query } = options2 ?? {};
|
|
15595
15703
|
return client.boost.getBoostFrameworks.query({ uri, limit, cursor, query });
|
|
15596
15704
|
}, "getBoostFrameworks"),
|
|
15597
15705
|
getSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15598
15706
|
if (!userData) throw new Error("Please make an account first!");
|
|
15599
15707
|
return client.boost.getSkillsAvailableForBoost.query({ uri });
|
|
15600
15708
|
}, "getSkillsAvailableForBoost"),
|
|
15601
|
-
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query,
|
|
15709
|
+
searchSkillsAvailableForBoost: /* @__PURE__ */ __name(async (_learnCard, uri, query, options2 = {}) => {
|
|
15602
15710
|
if (!userData) throw new Error("Please make an account first!");
|
|
15603
|
-
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...
|
|
15711
|
+
return client.boost.searchSkillsAvailableForBoost.query({ uri, query, ...options2 });
|
|
15604
15712
|
}, "searchSkillsAvailableForBoost"),
|
|
15605
15713
|
getBoosts: /* @__PURE__ */ __name(async (_learnCard, query) => {
|
|
15606
15714
|
console.warn(
|
|
@@ -15613,41 +15721,41 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15613
15721
|
await ensureUser();
|
|
15614
15722
|
return client.boost.countBoosts.query({ query });
|
|
15615
15723
|
}, "countBoosts"),
|
|
15616
|
-
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard,
|
|
15724
|
+
getPaginatedBoosts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15617
15725
|
await ensureUser();
|
|
15618
|
-
return client.boost.getPaginatedBoosts.query(
|
|
15726
|
+
return client.boost.getPaginatedBoosts.query(options2);
|
|
15619
15727
|
}, "getPaginatedBoosts"),
|
|
15620
|
-
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15728
|
+
getBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15621
15729
|
await ensureUser();
|
|
15622
|
-
return client.boost.getBoostChildren.query({ uri, ...
|
|
15730
|
+
return client.boost.getBoostChildren.query({ uri, ...options2 });
|
|
15623
15731
|
}, "getBoostChildren"),
|
|
15624
|
-
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15732
|
+
countBoostChildren: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15625
15733
|
await ensureUser();
|
|
15626
|
-
return client.boost.countBoostChildren.query({ uri, ...
|
|
15734
|
+
return client.boost.countBoostChildren.query({ uri, ...options2 });
|
|
15627
15735
|
}, "countBoostChildren"),
|
|
15628
|
-
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15736
|
+
getBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15629
15737
|
await ensureUser();
|
|
15630
|
-
return client.boost.getBoostSiblings.query({ uri, ...
|
|
15738
|
+
return client.boost.getBoostSiblings.query({ uri, ...options2 });
|
|
15631
15739
|
}, "getBoostSiblings"),
|
|
15632
|
-
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15740
|
+
countBoostSiblings: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15633
15741
|
await ensureUser();
|
|
15634
|
-
return client.boost.countBoostSiblings.query({ uri, ...
|
|
15742
|
+
return client.boost.countBoostSiblings.query({ uri, ...options2 });
|
|
15635
15743
|
}, "countBoostSiblings"),
|
|
15636
|
-
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15744
|
+
getFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15637
15745
|
await ensureUser();
|
|
15638
|
-
return client.boost.getFamilialBoosts.query({ uri, ...
|
|
15746
|
+
return client.boost.getFamilialBoosts.query({ uri, ...options2 });
|
|
15639
15747
|
}, "getFamilialBoosts"),
|
|
15640
|
-
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15748
|
+
countFamilialBoosts: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15641
15749
|
await ensureUser();
|
|
15642
|
-
return client.boost.countFamilialBoosts.query({ uri, ...
|
|
15750
|
+
return client.boost.countFamilialBoosts.query({ uri, ...options2 });
|
|
15643
15751
|
}, "countFamilialBoosts"),
|
|
15644
|
-
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15752
|
+
getBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15645
15753
|
await ensureUser();
|
|
15646
|
-
return client.boost.getBoostParents.query({ uri, ...
|
|
15754
|
+
return client.boost.getBoostParents.query({ uri, ...options2 });
|
|
15647
15755
|
}, "getBoostParents"),
|
|
15648
|
-
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15756
|
+
countBoostParents: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15649
15757
|
await ensureUser();
|
|
15650
|
-
return client.boost.countBoostParents.query({ uri, ...
|
|
15758
|
+
return client.boost.countBoostParents.query({ uri, ...options2 });
|
|
15651
15759
|
}, "countBoostParents"),
|
|
15652
15760
|
makeBoostParent: /* @__PURE__ */ __name(async (_learnCard, uris) => {
|
|
15653
15761
|
await ensureUser();
|
|
@@ -15722,9 +15830,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15722
15830
|
includeUnacceptedBoosts
|
|
15723
15831
|
});
|
|
15724
15832
|
}, "countConnectedBoostRecipients"),
|
|
15725
|
-
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15833
|
+
getBoostChildrenProfileManagers: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
15726
15834
|
await ensureUser();
|
|
15727
|
-
return client.boost.getChildrenProfileManagers.query({ uri, ...
|
|
15835
|
+
return client.boost.getChildrenProfileManagers.query({ uri, ...options2 });
|
|
15728
15836
|
}, "getBoostChildrenProfileManagers"),
|
|
15729
15837
|
updateBoost: /* @__PURE__ */ __name(async (_learnCard, uri, updates, credential) => {
|
|
15730
15838
|
await ensureUser();
|
|
@@ -15733,7 +15841,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15733
15841
|
uri,
|
|
15734
15842
|
updates: { ...credential && { credential }, ...restUpdates }
|
|
15735
15843
|
};
|
|
15736
|
-
if (Array.isArray(skills)
|
|
15844
|
+
if (Array.isArray(skills)) payload.skills = skills;
|
|
15737
15845
|
return client.boost.updateBoost.mutate(payload);
|
|
15738
15846
|
}, "updateBoost"),
|
|
15739
15847
|
attachFrameworkToBoost: /* @__PURE__ */ __name(async (_learnCard, boostUri, frameworkId) => {
|
|
@@ -15748,9 +15856,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15748
15856
|
if (!userData) throw new Error("Please make an account first!");
|
|
15749
15857
|
return client.boost.alignBoostSkills.mutate({ boostUri, skills });
|
|
15750
15858
|
}, "alignBoostSkills"),
|
|
15751
|
-
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
15859
|
+
getBoostAdmins: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15752
15860
|
await ensureUser();
|
|
15753
|
-
return client.boost.getBoostAdmins.query({ uri, ...
|
|
15861
|
+
return client.boost.getBoostAdmins.query({ uri, ...options2 });
|
|
15754
15862
|
}, "getBoostAdmins"),
|
|
15755
15863
|
getBoostPermissions: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
15756
15864
|
await ensureUser();
|
|
@@ -15788,13 +15896,14 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15788
15896
|
await ensureUser();
|
|
15789
15897
|
return client.boost.deleteBoost.mutate({ uri });
|
|
15790
15898
|
}, "deleteBoost"),
|
|
15791
|
-
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri,
|
|
15899
|
+
sendBoost: /* @__PURE__ */ __name(async (_learnCard, profileId, boostUri, options2 = { encrypt: true, skipNotification: false, templateData: {} }) => {
|
|
15792
15900
|
await ensureUser();
|
|
15793
15901
|
const result = await getBoostTemplateForIssuance(_learnCard, boostUri);
|
|
15794
15902
|
const data = await UnsignedVCValidator.spa(result);
|
|
15795
15903
|
if (!data.success) throw new Error("Did not get a valid boost from URI");
|
|
15796
15904
|
const targetProfile = await _learnCard.invoke.getProfile(profileId);
|
|
15797
15905
|
if (!targetProfile) throw new Error("Target profile not found");
|
|
15906
|
+
if (!hasDid(targetProfile)) throw new Error("Target profile has no DID");
|
|
15798
15907
|
let boost = data.data;
|
|
15799
15908
|
if (isVC2Format(boost)) {
|
|
15800
15909
|
boost.validFrom = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -15811,10 +15920,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15811
15920
|
boost.credentialSubject.id = targetProfile.did;
|
|
15812
15921
|
}
|
|
15813
15922
|
if (boost?.type?.includes("BoostCredential")) boost.boostId = boostUri;
|
|
15814
|
-
if (typeof
|
|
15923
|
+
if (typeof options2 === "object" && options2.templateData && Object.keys(options2.templateData).length > 0) {
|
|
15815
15924
|
try {
|
|
15816
15925
|
const boostString = JSON.stringify(boost);
|
|
15817
|
-
const rendered = renderTemplateJson(boostString,
|
|
15926
|
+
const rendered = renderTemplateJson(boostString, options2.templateData);
|
|
15818
15927
|
boost = JSON.parse(rendered);
|
|
15819
15928
|
} catch (error46) {
|
|
15820
15929
|
throw new Error(
|
|
@@ -15822,17 +15931,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15822
15931
|
);
|
|
15823
15932
|
}
|
|
15824
15933
|
}
|
|
15825
|
-
if (typeof
|
|
15826
|
-
boost =
|
|
15934
|
+
if (typeof options2 === "object" && options2.overideFn) {
|
|
15935
|
+
boost = options2.overideFn(boost);
|
|
15827
15936
|
}
|
|
15828
15937
|
const vc = await _learnCard.invoke.issueCredential(boost);
|
|
15829
|
-
if (typeof
|
|
15938
|
+
if (typeof options2 === "object" && !options2.encrypt || !options2) {
|
|
15830
15939
|
return client.boost.sendBoost.mutate({
|
|
15831
15940
|
profileId,
|
|
15832
15941
|
uri: boostUri,
|
|
15833
15942
|
credential: vc,
|
|
15834
15943
|
options: {
|
|
15835
|
-
skipNotification: typeof
|
|
15944
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15836
15945
|
}
|
|
15837
15946
|
});
|
|
15838
15947
|
}
|
|
@@ -15847,7 +15956,7 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15847
15956
|
uri: boostUri,
|
|
15848
15957
|
credential,
|
|
15849
15958
|
options: {
|
|
15850
|
-
skipNotification: typeof
|
|
15959
|
+
skipNotification: typeof options2 === "object" && options2.skipNotification
|
|
15851
15960
|
}
|
|
15852
15961
|
});
|
|
15853
15962
|
}, "sendBoost"),
|
|
@@ -15875,12 +15984,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15875
15984
|
await ensureUser();
|
|
15876
15985
|
return client.profile.primarySigningAuthority.query();
|
|
15877
15986
|
}, "getPrimaryRegisteredSigningAuthority"),
|
|
15878
|
-
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA,
|
|
15987
|
+
generateClaimLink: /* @__PURE__ */ __name(async (_learnCard, boostUri, claimLinkSA, options2, challenge) => {
|
|
15879
15988
|
await ensureUser();
|
|
15880
15989
|
return client.boost.generateClaimLink.mutate({
|
|
15881
15990
|
boostUri,
|
|
15882
15991
|
claimLinkSA,
|
|
15883
|
-
options,
|
|
15992
|
+
options: options2,
|
|
15884
15993
|
challenge
|
|
15885
15994
|
});
|
|
15886
15995
|
}, "generateClaimLink"),
|
|
@@ -15909,7 +16018,8 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15909
16018
|
targetDid = recipient;
|
|
15910
16019
|
} else {
|
|
15911
16020
|
const targetProfile = await _learnCard.invoke.getProfile(recipient);
|
|
15912
|
-
if (!targetProfile)
|
|
16021
|
+
if (!hasDid(targetProfile))
|
|
16022
|
+
return client.boost.send.mutate(input);
|
|
15913
16023
|
targetDid = targetProfile.did;
|
|
15914
16024
|
}
|
|
15915
16025
|
let boost = data.data;
|
|
@@ -15974,25 +16084,25 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
15974
16084
|
getContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15975
16085
|
return client.contracts.getConsentFlowContract.query({ uri });
|
|
15976
16086
|
}, "getContract"),
|
|
15977
|
-
getContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16087
|
+
getContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
15978
16088
|
await ensureUser();
|
|
15979
|
-
return client.contracts.getConsentFlowContracts.query(
|
|
16089
|
+
return client.contracts.getConsentFlowContracts.query(options2);
|
|
15980
16090
|
}, "getContracts"),
|
|
15981
16091
|
deleteContract: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
15982
16092
|
await ensureUser();
|
|
15983
16093
|
return client.contracts.deleteConsentFlowContract.mutate({ uri });
|
|
15984
16094
|
}, "deleteContract"),
|
|
15985
|
-
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16095
|
+
getConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, uri, options2 = {}) => {
|
|
15986
16096
|
await ensureUser();
|
|
15987
|
-
return client.contracts.getConsentedDataForContract.query({ uri, ...
|
|
16097
|
+
return client.contracts.getConsentedDataForContract.query({ uri, ...options2 });
|
|
15988
16098
|
}, "getConsentFlowData"),
|
|
15989
|
-
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2,
|
|
16099
|
+
getConsentFlowDataForDid: /* @__PURE__ */ __name(async (_learnCard, did2, options2 = {}) => {
|
|
15990
16100
|
await ensureUser();
|
|
15991
|
-
return client.contracts.getConsentedDataForDid.query({ did: did2, ...
|
|
16101
|
+
return client.contracts.getConsentedDataForDid.query({ did: did2, ...options2 });
|
|
15992
16102
|
}, "getConsentFlowDataForDid"),
|
|
15993
|
-
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {},
|
|
16103
|
+
getAllConsentFlowData: /* @__PURE__ */ __name(async (_learnCard, query = {}, options2 = {}) => {
|
|
15994
16104
|
await ensureUser();
|
|
15995
|
-
return client.contracts.getConsentedData.query({ query, ...
|
|
16105
|
+
return client.contracts.getConsentedData.query({ query, ...options2 });
|
|
15996
16106
|
}, "getAllConsentFlowData"),
|
|
15997
16107
|
writeCredentialToContract: /* @__PURE__ */ __name(async (_learnCard, did2, contractUri, credential, boostUri) => {
|
|
15998
16108
|
await ensureUser();
|
|
@@ -16014,9 +16124,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16014
16124
|
// for SmartResume
|
|
16015
16125
|
});
|
|
16016
16126
|
}, "consentToContract"),
|
|
16017
|
-
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard,
|
|
16127
|
+
getConsentedContracts: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16018
16128
|
await ensureUser();
|
|
16019
|
-
return client.contracts.getConsentedContracts.query(
|
|
16129
|
+
return client.contracts.getConsentedContracts.query(options2);
|
|
16020
16130
|
}, "getConsentedContracts"),
|
|
16021
16131
|
updateContractTerms: /* @__PURE__ */ __name(async (_learnCard, uri, { terms, expiresAt, oneTime }) => {
|
|
16022
16132
|
await ensureUser();
|
|
@@ -16031,17 +16141,17 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16031
16141
|
await ensureUser();
|
|
16032
16142
|
return client.contracts.withdrawConsent.mutate({ uri });
|
|
16033
16143
|
}, "withdrawConsent"),
|
|
16034
|
-
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri,
|
|
16144
|
+
getConsentFlowTransactions: /* @__PURE__ */ __name(async (_learnCard, uri, options2) => {
|
|
16035
16145
|
await ensureUser();
|
|
16036
|
-
return client.contracts.getTermsTransactionHistory.query({ uri, ...
|
|
16146
|
+
return client.contracts.getTermsTransactionHistory.query({ uri, ...options2 });
|
|
16037
16147
|
}, "getConsentFlowTransactions"),
|
|
16038
|
-
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri,
|
|
16148
|
+
getCredentialsForContract: /* @__PURE__ */ __name(async (_learnCard, termsUri, options2 = {}) => {
|
|
16039
16149
|
await ensureUser();
|
|
16040
|
-
return client.contracts.getCredentialsForContract.query({ termsUri, ...
|
|
16150
|
+
return client.contracts.getCredentialsForContract.query({ termsUri, ...options2 });
|
|
16041
16151
|
}, "getCredentialsForContract"),
|
|
16042
|
-
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16152
|
+
getConsentFlowCredentials: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16043
16153
|
await ensureUser();
|
|
16044
|
-
return client.contracts.getAllCredentialsForTerms.query(
|
|
16154
|
+
return client.contracts.getAllCredentialsForTerms.query(options2);
|
|
16045
16155
|
}, "getConsentFlowCredentials"),
|
|
16046
16156
|
verifyConsent: /* @__PURE__ */ __name(async (_learnCard, uri, profileId) => {
|
|
16047
16157
|
await ensureUser();
|
|
@@ -16090,6 +16200,12 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16090
16200
|
targetProfileId
|
|
16091
16201
|
});
|
|
16092
16202
|
}, "getAllContractRequestsForProfile"),
|
|
16203
|
+
getSharedInsightsRequestsForProfile: /* @__PURE__ */ __name(async (_learnCard, targetProfileId) => {
|
|
16204
|
+
await ensureUser();
|
|
16205
|
+
return client.contracts.getSharedInsightsRequestsForProfile.query({
|
|
16206
|
+
targetProfileId
|
|
16207
|
+
});
|
|
16208
|
+
}, "getSharedInsightsRequestsForProfile"),
|
|
16093
16209
|
forwardContractRequestToProfile: /* @__PURE__ */ __name(async (_learnCard, parentProfileId, targetProfileId, contractUri) => {
|
|
16094
16210
|
await ensureUser();
|
|
16095
16211
|
return client.contracts.forwardContractRequestToProfile.mutate({
|
|
@@ -16142,9 +16258,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16142
16258
|
await ensureUser();
|
|
16143
16259
|
return client.claimHook.createClaimHook.mutate({ hook });
|
|
16144
16260
|
}, "createClaimHook"),
|
|
16145
|
-
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard,
|
|
16261
|
+
getClaimHooksForBoost: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16146
16262
|
await ensureUser();
|
|
16147
|
-
return client.claimHook.getClaimHooksForBoost.query(
|
|
16263
|
+
return client.claimHook.getClaimHooksForBoost.query(options2);
|
|
16148
16264
|
}, "getClaimHooksForBoost"),
|
|
16149
16265
|
deleteClaimHook: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16150
16266
|
await ensureUser();
|
|
@@ -16170,9 +16286,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16170
16286
|
await ensureUser();
|
|
16171
16287
|
return client.authGrants.getAuthGrant.query({ id });
|
|
16172
16288
|
}, "getAuthGrant"),
|
|
16173
|
-
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard,
|
|
16289
|
+
getAuthGrants: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16174
16290
|
await ensureUser();
|
|
16175
|
-
return client.authGrants.getAuthGrants.query(
|
|
16291
|
+
return client.authGrants.getAuthGrants.query(options2);
|
|
16176
16292
|
}, "getAuthGrants"),
|
|
16177
16293
|
getAPITokenForAuthGrant: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16178
16294
|
await ensureUser();
|
|
@@ -16194,9 +16310,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16194
16310
|
await ensureUser();
|
|
16195
16311
|
return client.inbox.issue.mutate(issueInboxCredential);
|
|
16196
16312
|
}, "sendCredentialViaInbox"),
|
|
16197
|
-
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard,
|
|
16313
|
+
getMySentInboxCredentials: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16198
16314
|
await ensureUser();
|
|
16199
|
-
return client.inbox.getMyIssuedCredentials.query(
|
|
16315
|
+
return client.inbox.getMyIssuedCredentials.query(options2);
|
|
16200
16316
|
}, "getMySentInboxCredentials"),
|
|
16201
16317
|
getInboxCredential: /* @__PURE__ */ __name(async (_learnCard, id) => {
|
|
16202
16318
|
await ensureUser();
|
|
@@ -16206,9 +16322,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16206
16322
|
await ensureUser();
|
|
16207
16323
|
return client.inbox.finalize.mutate();
|
|
16208
16324
|
}, "finalizeInboxCredentials"),
|
|
16209
|
-
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard,
|
|
16325
|
+
sendGuardianApprovalEmail: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16210
16326
|
await ensureUser();
|
|
16211
|
-
return client.inbox.sendGuardianApprovalEmail.mutate(
|
|
16327
|
+
return client.inbox.sendGuardianApprovalEmail.mutate(options2);
|
|
16212
16328
|
}, "sendGuardianApprovalEmail"),
|
|
16213
16329
|
approveGuardianRequest: /* @__PURE__ */ __name(async (_learnCard, token) => {
|
|
16214
16330
|
return client.inbox.approveGuardianRequest.mutate({ token });
|
|
@@ -16277,46 +16393,46 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16277
16393
|
if (!userData) throw new Error("Please make an account first!");
|
|
16278
16394
|
return client.skillFrameworks.listMine.query();
|
|
16279
16395
|
}, "listMySkillFrameworks"),
|
|
16280
|
-
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard,
|
|
16396
|
+
getAllAvailableFrameworks: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16281
16397
|
if (!userData) throw new Error("Please make an account first!");
|
|
16282
|
-
return client.skillFrameworks.getAllAvailableFrameworks.query(
|
|
16398
|
+
return client.skillFrameworks.getAllAvailableFrameworks.query(options2);
|
|
16283
16399
|
}, "getAllAvailableFrameworks"),
|
|
16284
|
-
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id,
|
|
16400
|
+
getSkillFrameworkById: /* @__PURE__ */ __name(async (_learnCard, id, options2 = {}) => {
|
|
16285
16401
|
if (!userData) throw new Error("Please make an account first!");
|
|
16286
|
-
return client.skillFrameworks.getById.query({ id, ...
|
|
16402
|
+
return client.skillFrameworks.getById.query({ id, ...options2 });
|
|
16287
16403
|
}, "getSkillFrameworkById"),
|
|
16288
|
-
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16404
|
+
getBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16289
16405
|
if (!userData) throw new Error("Please make an account first!");
|
|
16290
16406
|
return client.skillFrameworks.getBoostsThatUseFramework.query({
|
|
16291
16407
|
id: frameworkId,
|
|
16292
|
-
...
|
|
16408
|
+
...options2
|
|
16293
16409
|
});
|
|
16294
16410
|
}, "getBoostsThatUseFramework"),
|
|
16295
|
-
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16411
|
+
countBoostsThatUseFramework: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16296
16412
|
if (!userData) throw new Error("Please make an account first!");
|
|
16297
16413
|
return client.skillFrameworks.countBoostsThatUseFramework.query({
|
|
16298
16414
|
id: frameworkId,
|
|
16299
|
-
...
|
|
16415
|
+
...options2
|
|
16300
16416
|
});
|
|
16301
16417
|
}, "countBoostsThatUseFramework"),
|
|
16302
|
-
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId,
|
|
16418
|
+
getFrameworkSkillTree: /* @__PURE__ */ __name(async (_learnCard, frameworkId, options2 = {}) => {
|
|
16303
16419
|
if (!userData) throw new Error("Please make an account first!");
|
|
16304
|
-
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...
|
|
16420
|
+
return client.skills.getFrameworkSkillTree.query({ id: frameworkId, ...options2 });
|
|
16305
16421
|
}, "getFrameworkSkillTree"),
|
|
16306
|
-
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId,
|
|
16422
|
+
getSkillChildren: /* @__PURE__ */ __name(async (_learnCard, frameworkId, skillId, options2 = {}) => {
|
|
16307
16423
|
if (!userData) throw new Error("Please make an account first!");
|
|
16308
16424
|
return client.skills.getSkillChildrenTree.query({
|
|
16309
16425
|
frameworkId,
|
|
16310
16426
|
id: skillId,
|
|
16311
|
-
...
|
|
16427
|
+
...options2
|
|
16312
16428
|
});
|
|
16313
16429
|
}, "getSkillChildren"),
|
|
16314
|
-
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query,
|
|
16430
|
+
searchFrameworkSkills: /* @__PURE__ */ __name(async (_learnCard, frameworkId, query, options2 = {}) => {
|
|
16315
16431
|
if (!userData) throw new Error("Please make an account first!");
|
|
16316
16432
|
return client.skills.searchFrameworkSkills.query({
|
|
16317
16433
|
id: frameworkId,
|
|
16318
16434
|
query,
|
|
16319
|
-
...
|
|
16435
|
+
...options2
|
|
16320
16436
|
});
|
|
16321
16437
|
}, "searchFrameworkSkills"),
|
|
16322
16438
|
semanticSearchSkills: /* @__PURE__ */ __name(async (_learnCard, input) => {
|
|
@@ -16391,13 +16507,13 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16391
16507
|
await ensureUser();
|
|
16392
16508
|
return client.integrations.getIntegration.query({ id });
|
|
16393
16509
|
}, "getIntegration"),
|
|
16394
|
-
getIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16510
|
+
getIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16395
16511
|
await ensureUser();
|
|
16396
|
-
return client.integrations.getIntegrations.query(
|
|
16512
|
+
return client.integrations.getIntegrations.query(options2);
|
|
16397
16513
|
}, "getIntegrations"),
|
|
16398
|
-
countIntegrations: /* @__PURE__ */ __name(async (_learnCard,
|
|
16514
|
+
countIntegrations: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16399
16515
|
await ensureUser();
|
|
16400
|
-
return client.integrations.countIntegrations.query(
|
|
16516
|
+
return client.integrations.countIntegrations.query(options2);
|
|
16401
16517
|
}, "countIntegrations"),
|
|
16402
16518
|
updateIntegration: /* @__PURE__ */ __name(async (_learnCard, id, updates) => {
|
|
16403
16519
|
await ensureUser();
|
|
@@ -16442,19 +16558,23 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16442
16558
|
await ensureUser();
|
|
16443
16559
|
return client.appStore.submitForReview.mutate({ listingId });
|
|
16444
16560
|
}, "submitAppStoreListingForReview"),
|
|
16445
|
-
|
|
16561
|
+
unsubmitAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16562
|
+
await ensureUser();
|
|
16563
|
+
return client.appStore.unsubmitForReview.mutate({ listingId });
|
|
16564
|
+
}, "unsubmitAppStoreListing"),
|
|
16565
|
+
getListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId, options2 = {}) => {
|
|
16446
16566
|
await ensureUser();
|
|
16447
16567
|
return client.appStore.getListingsForIntegration.query({
|
|
16448
16568
|
integrationId,
|
|
16449
|
-
...
|
|
16569
|
+
...options2
|
|
16450
16570
|
});
|
|
16451
16571
|
}, "getListingsForIntegration"),
|
|
16452
16572
|
countListingsForIntegration: /* @__PURE__ */ __name(async (_learnCard, integrationId) => {
|
|
16453
16573
|
await ensureUser();
|
|
16454
16574
|
return client.appStore.countListingsForIntegration.query({ integrationId });
|
|
16455
16575
|
}, "countListingsForIntegration"),
|
|
16456
|
-
browseAppStore: /* @__PURE__ */ __name(async (_learnCard,
|
|
16457
|
-
return client.appStore.browseListedApps.query(
|
|
16576
|
+
browseAppStore: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16577
|
+
return client.appStore.browseListedApps.query(options2);
|
|
16458
16578
|
}, "browseAppStore"),
|
|
16459
16579
|
getPublicAppStoreListing: /* @__PURE__ */ __name(async (_learnCard, listingId) => {
|
|
16460
16580
|
return client.appStore.getPublicListing.query({ listingId });
|
|
@@ -16473,9 +16593,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16473
16593
|
await ensureUser();
|
|
16474
16594
|
return client.appStore.uninstallApp.mutate({ listingId });
|
|
16475
16595
|
}, "uninstallApp"),
|
|
16476
|
-
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard,
|
|
16596
|
+
getInstalledApps: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16477
16597
|
await ensureUser();
|
|
16478
|
-
return client.appStore.getInstalledApps.query(
|
|
16598
|
+
return client.appStore.getInstalledApps.query(options2);
|
|
16479
16599
|
}, "getInstalledApps"),
|
|
16480
16600
|
countInstalledApps: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16481
16601
|
await ensureUser();
|
|
@@ -16485,6 +16605,10 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16485
16605
|
await ensureUser();
|
|
16486
16606
|
return client.appStore.isAppInstalled.query({ listingId });
|
|
16487
16607
|
}, "isAppInstalled"),
|
|
16608
|
+
getMyCredentialsFromApp: /* @__PURE__ */ __name(async (_learnCard, listingId, options2 = {}) => {
|
|
16609
|
+
await ensureUser();
|
|
16610
|
+
return client.appStore.getMyCredentialsFromApp.query({ listingId, ...options2 });
|
|
16611
|
+
}, "getMyCredentialsFromApp"),
|
|
16488
16612
|
isAppStoreAdmin: /* @__PURE__ */ __name(async (_learnCard) => {
|
|
16489
16613
|
await ensureUser();
|
|
16490
16614
|
return client.appStore.isAdmin.query();
|
|
@@ -16500,9 +16624,9 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16500
16624
|
promotionLevel
|
|
16501
16625
|
});
|
|
16502
16626
|
}, "adminUpdatePromotionLevel"),
|
|
16503
|
-
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard,
|
|
16627
|
+
adminGetAllListings: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16504
16628
|
await ensureUser();
|
|
16505
|
-
return client.appStore.adminGetAllListings.query(
|
|
16629
|
+
return client.appStore.adminGetAllListings.query(options2);
|
|
16506
16630
|
}, "adminGetAllListings"),
|
|
16507
16631
|
// App Store Boost Management
|
|
16508
16632
|
addBoostToApp: /* @__PURE__ */ __name(async (_learnCard, listingId, boostUri, templateAlias) => {
|
|
@@ -16532,21 +16656,21 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiToken) {
|
|
|
16532
16656
|
}, "resolveFromLCN"),
|
|
16533
16657
|
getLCNClient: /* @__PURE__ */ __name(() => client, "getLCNClient"),
|
|
16534
16658
|
// Activity
|
|
16535
|
-
getMyActivities: /* @__PURE__ */ __name(async (_learnCard,
|
|
16659
|
+
getMyActivities: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16536
16660
|
await ensureUser();
|
|
16537
|
-
return client.activity.getMyActivities.query(
|
|
16661
|
+
return client.activity.getMyActivities.query(options2);
|
|
16538
16662
|
}, "getMyActivities"),
|
|
16539
|
-
getActivityStats: /* @__PURE__ */ __name(async (_learnCard,
|
|
16663
|
+
getActivityStats: /* @__PURE__ */ __name(async (_learnCard, options2 = {}) => {
|
|
16540
16664
|
await ensureUser();
|
|
16541
|
-
return client.activity.getActivityStats.query(
|
|
16665
|
+
return client.activity.getActivityStats.query(options2);
|
|
16542
16666
|
}, "getActivityStats"),
|
|
16543
|
-
getActivity: /* @__PURE__ */ __name(async (_learnCard,
|
|
16667
|
+
getActivity: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16544
16668
|
await ensureUser();
|
|
16545
|
-
return client.activity.getActivity.query(
|
|
16669
|
+
return client.activity.getActivity.query(options2);
|
|
16546
16670
|
}, "getActivity"),
|
|
16547
|
-
getActivityChain: /* @__PURE__ */ __name(async (_learnCard,
|
|
16671
|
+
getActivityChain: /* @__PURE__ */ __name(async (_learnCard, options2) => {
|
|
16548
16672
|
await ensureUser();
|
|
16549
|
-
return client.activity.getActivityChain.query(
|
|
16673
|
+
return client.activity.getActivityChain.query(options2);
|
|
16550
16674
|
}, "getActivityChain")
|
|
16551
16675
|
}
|
|
16552
16676
|
};
|