@learncard/network-plugin 2.13.2 → 2.13.4
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.cjs +19 -18
- package/dist/lcn-plugin.cjs.development.cjs.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.cjs +7 -7
- package/dist/lcn-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/lcn-plugin.esm.js +19 -18
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -13655,6 +13655,13 @@ var parseRegexString = /* @__PURE__ */ __name2((regexStr) => {
|
|
|
13655
13655
|
if (!match) throw new Error("Invalid RegExp string format");
|
|
13656
13656
|
return { pattern: match[1], flags: match[2] };
|
|
13657
13657
|
}, "parseRegexString");
|
|
13658
|
+
var withStringOverride = /* @__PURE__ */ __name2((schema) => {
|
|
13659
|
+
const metaSchema = schema;
|
|
13660
|
+
if (typeof metaSchema.meta === "function") {
|
|
13661
|
+
return metaSchema.meta({ override: { type: "string" } });
|
|
13662
|
+
}
|
|
13663
|
+
return schema;
|
|
13664
|
+
}, "withStringOverride");
|
|
13658
13665
|
var RegExpStringValidator = external_exports.string().refine(
|
|
13659
13666
|
(str) => {
|
|
13660
13667
|
try {
|
|
@@ -13674,9 +13681,9 @@ var RegExpStringValidator = external_exports.string().refine(
|
|
|
13674
13681
|
} catch (error46) {
|
|
13675
13682
|
throw new Error(`Invalid RegExp: ${error46.message}`);
|
|
13676
13683
|
}
|
|
13677
|
-
})
|
|
13678
|
-
var RegExpValidator = external_exports.instanceof(RegExp).
|
|
13679
|
-
var BaseStringQuery = external_exports.string().or(external_exports.object({ $in: external_exports.string().array() })).or(external_exports.object({ $regex: RegExpValidator
|
|
13684
|
+
});
|
|
13685
|
+
var RegExpValidator = withStringOverride(external_exports.instanceof(RegExp).or(RegExpStringValidator));
|
|
13686
|
+
var BaseStringQuery = external_exports.string().or(external_exports.object({ $in: external_exports.string().array() })).or(external_exports.object({ $regex: RegExpValidator }));
|
|
13680
13687
|
var StringQuery = external_exports.union([
|
|
13681
13688
|
BaseStringQuery,
|
|
13682
13689
|
external_exports.object({
|
|
@@ -16354,27 +16361,21 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
|
|
|
16354
16361
|
}, "allocateCredentialStatus"),
|
|
16355
16362
|
revokeBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16356
16363
|
await ensureUser();
|
|
16357
|
-
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
credentialUri
|
|
16361
|
-
});
|
|
16364
|
+
const input = { boostUri, recipientProfileId };
|
|
16365
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16366
|
+
return client.boost.revokeBoostRecipient.mutate(input);
|
|
16362
16367
|
}, "revokeBoostRecipient"),
|
|
16363
16368
|
suspendBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16364
16369
|
await ensureUser();
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
credentialUri
|
|
16369
|
-
});
|
|
16370
|
+
const input = { boostUri, recipientProfileId };
|
|
16371
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16372
|
+
return client.boost.suspendBoostRecipient.mutate(input);
|
|
16370
16373
|
}, "suspendBoostRecipient"),
|
|
16371
16374
|
unsuspendBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16372
16375
|
await ensureUser();
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
|
|
16376
|
-
credentialUri
|
|
16377
|
-
});
|
|
16376
|
+
const input = { boostUri, recipientProfileId };
|
|
16377
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16378
|
+
return client.boost.unsuspendBoostRecipient.mutate(input);
|
|
16378
16379
|
}, "unsuspendBoostRecipient"),
|
|
16379
16380
|
deleteBoost: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
16380
16381
|
await ensureUser();
|