@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
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -13634,6 +13634,13 @@ var parseRegexString = /* @__PURE__ */ __name2((regexStr) => {
|
|
|
13634
13634
|
if (!match) throw new Error("Invalid RegExp string format");
|
|
13635
13635
|
return { pattern: match[1], flags: match[2] };
|
|
13636
13636
|
}, "parseRegexString");
|
|
13637
|
+
var withStringOverride = /* @__PURE__ */ __name2((schema) => {
|
|
13638
|
+
const metaSchema = schema;
|
|
13639
|
+
if (typeof metaSchema.meta === "function") {
|
|
13640
|
+
return metaSchema.meta({ override: { type: "string" } });
|
|
13641
|
+
}
|
|
13642
|
+
return schema;
|
|
13643
|
+
}, "withStringOverride");
|
|
13637
13644
|
var RegExpStringValidator = external_exports.string().refine(
|
|
13638
13645
|
(str) => {
|
|
13639
13646
|
try {
|
|
@@ -13653,9 +13660,9 @@ var RegExpStringValidator = external_exports.string().refine(
|
|
|
13653
13660
|
} catch (error46) {
|
|
13654
13661
|
throw new Error(`Invalid RegExp: ${error46.message}`);
|
|
13655
13662
|
}
|
|
13656
|
-
})
|
|
13657
|
-
var RegExpValidator = external_exports.instanceof(RegExp).
|
|
13658
|
-
var BaseStringQuery = external_exports.string().or(external_exports.object({ $in: external_exports.string().array() })).or(external_exports.object({ $regex: RegExpValidator
|
|
13663
|
+
});
|
|
13664
|
+
var RegExpValidator = withStringOverride(external_exports.instanceof(RegExp).or(RegExpStringValidator));
|
|
13665
|
+
var BaseStringQuery = external_exports.string().or(external_exports.object({ $in: external_exports.string().array() })).or(external_exports.object({ $regex: RegExpValidator }));
|
|
13659
13666
|
var StringQuery = external_exports.union([
|
|
13660
13667
|
BaseStringQuery,
|
|
13661
13668
|
external_exports.object({
|
|
@@ -16337,27 +16344,21 @@ async function getLearnCardNetworkPlugin(learnCard, url2, apiTokenOrOptions, opt
|
|
|
16337
16344
|
}, "allocateCredentialStatus"),
|
|
16338
16345
|
revokeBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16339
16346
|
await ensureUser();
|
|
16340
|
-
|
|
16341
|
-
|
|
16342
|
-
|
|
16343
|
-
credentialUri
|
|
16344
|
-
});
|
|
16347
|
+
const input = { boostUri, recipientProfileId };
|
|
16348
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16349
|
+
return client.boost.revokeBoostRecipient.mutate(input);
|
|
16345
16350
|
}, "revokeBoostRecipient"),
|
|
16346
16351
|
suspendBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16347
16352
|
await ensureUser();
|
|
16348
|
-
|
|
16349
|
-
|
|
16350
|
-
|
|
16351
|
-
credentialUri
|
|
16352
|
-
});
|
|
16353
|
+
const input = { boostUri, recipientProfileId };
|
|
16354
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16355
|
+
return client.boost.suspendBoostRecipient.mutate(input);
|
|
16353
16356
|
}, "suspendBoostRecipient"),
|
|
16354
16357
|
unsuspendBoostRecipient: /* @__PURE__ */ __name(async (_learnCard, boostUri, recipientProfileId, credentialUri) => {
|
|
16355
16358
|
await ensureUser();
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
|
|
16359
|
-
credentialUri
|
|
16360
|
-
});
|
|
16359
|
+
const input = { boostUri, recipientProfileId };
|
|
16360
|
+
if (credentialUri !== void 0) Object.assign(input, { credentialUri });
|
|
16361
|
+
return client.boost.unsuspendBoostRecipient.mutate(input);
|
|
16361
16362
|
}, "unsuspendBoostRecipient"),
|
|
16362
16363
|
deleteBoost: /* @__PURE__ */ __name(async (_learnCard, uri) => {
|
|
16363
16364
|
await ensureUser();
|