@learncard/learn-card-plugin 1.1.19 → 1.1.21
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/learn-card-plugin.cjs.development.js +47 -4
- package/dist/learn-card-plugin.cjs.development.js.map +3 -3
- package/dist/learn-card-plugin.cjs.production.min.js +1 -1
- package/dist/learn-card-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-card-plugin.esm.js +47 -4
- package/dist/learn-card-plugin.esm.js.map +3 -3
- package/package.json +4 -4
|
@@ -3324,6 +3324,8 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
3324
3324
|
});
|
|
3325
3325
|
|
|
3326
3326
|
// ../../learn-card-types/dist/types.esm.js
|
|
3327
|
+
var __defProp2 = Object.defineProperty;
|
|
3328
|
+
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
|
|
3327
3329
|
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
|
3328
3330
|
var AchievementCriteriaValidator = mod.object({
|
|
3329
3331
|
type: mod.string().optional(),
|
|
@@ -3727,6 +3729,35 @@ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
|
|
3727
3729
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
|
3728
3730
|
records: EncryptedCredentialRecordValidator.array()
|
|
3729
3731
|
});
|
|
3732
|
+
var parseRegexString = /* @__PURE__ */ __name2((regexStr) => {
|
|
3733
|
+
const match2 = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
3734
|
+
if (!match2)
|
|
3735
|
+
throw new Error("Invalid RegExp string format");
|
|
3736
|
+
return { pattern: match2[1], flags: match2[2] };
|
|
3737
|
+
}, "parseRegexString");
|
|
3738
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
|
3739
|
+
mod.string().refine(
|
|
3740
|
+
(str) => {
|
|
3741
|
+
try {
|
|
3742
|
+
parseRegexString(str);
|
|
3743
|
+
return true;
|
|
3744
|
+
} catch {
|
|
3745
|
+
return false;
|
|
3746
|
+
}
|
|
3747
|
+
},
|
|
3748
|
+
{
|
|
3749
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
3750
|
+
}
|
|
3751
|
+
).transform((str) => {
|
|
3752
|
+
const { pattern, flags } = parseRegexString(str);
|
|
3753
|
+
try {
|
|
3754
|
+
return new RegExp(pattern, flags);
|
|
3755
|
+
} catch (error) {
|
|
3756
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
3757
|
+
}
|
|
3758
|
+
})
|
|
3759
|
+
);
|
|
3760
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
3730
3761
|
var LCNProfileValidator = mod.object({
|
|
3731
3762
|
profileId: mod.string().min(3).max(40),
|
|
3732
3763
|
displayName: mod.string().default(""),
|
|
@@ -3741,6 +3772,16 @@ var LCNProfileValidator = mod.object({
|
|
|
3741
3772
|
type: mod.string().optional(),
|
|
3742
3773
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
3743
3774
|
});
|
|
3775
|
+
var LCNProfileQueryValidator = mod.object({
|
|
3776
|
+
profileId: StringQuery,
|
|
3777
|
+
displayName: StringQuery,
|
|
3778
|
+
shortBio: StringQuery,
|
|
3779
|
+
bio: StringQuery,
|
|
3780
|
+
email: StringQuery,
|
|
3781
|
+
websiteLink: StringQuery,
|
|
3782
|
+
isServiceProfile: mod.boolean(),
|
|
3783
|
+
type: StringQuery
|
|
3784
|
+
}).partial();
|
|
3744
3785
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
3745
3786
|
records: LCNProfileValidator.array()
|
|
3746
3787
|
});
|
|
@@ -3778,13 +3819,15 @@ var BoostValidator = mod.object({
|
|
|
3778
3819
|
category: mod.string().optional(),
|
|
3779
3820
|
status: LCNBoostStatus.optional(),
|
|
3780
3821
|
autoConnectRecipients: mod.boolean().optional(),
|
|
3822
|
+
meta: mod.record(mod.any()).optional(),
|
|
3781
3823
|
claimPermissions: BoostPermissionsValidator.optional()
|
|
3782
3824
|
});
|
|
3783
3825
|
var BoostQueryValidator = mod.object({
|
|
3784
|
-
uri:
|
|
3785
|
-
name:
|
|
3786
|
-
type:
|
|
3787
|
-
category:
|
|
3826
|
+
uri: StringQuery,
|
|
3827
|
+
name: StringQuery,
|
|
3828
|
+
type: StringQuery,
|
|
3829
|
+
category: StringQuery,
|
|
3830
|
+
meta: mod.record(StringQuery),
|
|
3788
3831
|
status: LCNBoostStatus.or(mod.object({ $in: LCNBoostStatus.array() })),
|
|
3789
3832
|
autoConnectRecipients: mod.boolean()
|
|
3790
3833
|
}).partial();
|