@learncard/didkey-plugin 1.0.17 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/didkey-plugin.cjs.development.js +46 -4
- package/dist/didkey-plugin.cjs.development.js.map +2 -2
- package/dist/didkey-plugin.cjs.production.min.js +1 -1
- package/dist/didkey-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkey-plugin.esm.js +46 -4
- package/dist/didkey-plugin.esm.js.map +2 -2
- package/package.json +4 -4
@@ -115,6 +115,7 @@ var require_types_cjs_development = __commonJS({
|
|
115
115
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator,
|
116
116
|
LCNNotificationValidator: () => LCNNotificationValidator,
|
117
117
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum,
|
118
|
+
LCNProfileQueryValidator: () => LCNProfileQueryValidator,
|
118
119
|
LCNProfileValidator: () => LCNProfileValidator,
|
119
120
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator,
|
120
121
|
LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator,
|
@@ -3905,6 +3906,35 @@ var require_types_cjs_development = __commonJS({
|
|
3905
3906
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
3906
3907
|
records: EncryptedCredentialRecordValidator.array()
|
3907
3908
|
});
|
3909
|
+
var parseRegexString = /* @__PURE__ */ __name22((regexStr) => {
|
3910
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
3911
|
+
if (!match)
|
3912
|
+
throw new Error("Invalid RegExp string format");
|
3913
|
+
return { pattern: match[1], flags: match[2] };
|
3914
|
+
}, "parseRegexString");
|
3915
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
3916
|
+
mod.string().refine(
|
3917
|
+
(str) => {
|
3918
|
+
try {
|
3919
|
+
parseRegexString(str);
|
3920
|
+
return true;
|
3921
|
+
} catch (e) {
|
3922
|
+
return false;
|
3923
|
+
}
|
3924
|
+
},
|
3925
|
+
{
|
3926
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
3927
|
+
}
|
3928
|
+
).transform((str) => {
|
3929
|
+
const { pattern, flags } = parseRegexString(str);
|
3930
|
+
try {
|
3931
|
+
return new RegExp(pattern, flags);
|
3932
|
+
} catch (error) {
|
3933
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
3934
|
+
}
|
3935
|
+
})
|
3936
|
+
);
|
3937
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
3908
3938
|
var LCNProfileValidator = mod.object({
|
3909
3939
|
profileId: mod.string().min(3).max(40),
|
3910
3940
|
displayName: mod.string().default(""),
|
@@ -3919,6 +3949,16 @@ var require_types_cjs_development = __commonJS({
|
|
3919
3949
|
type: mod.string().optional(),
|
3920
3950
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
3921
3951
|
});
|
3952
|
+
var LCNProfileQueryValidator = mod.object({
|
3953
|
+
profileId: StringQuery,
|
3954
|
+
displayName: StringQuery,
|
3955
|
+
shortBio: StringQuery,
|
3956
|
+
bio: StringQuery,
|
3957
|
+
email: StringQuery,
|
3958
|
+
websiteLink: StringQuery,
|
3959
|
+
isServiceProfile: mod.boolean(),
|
3960
|
+
type: StringQuery
|
3961
|
+
}).partial();
|
3922
3962
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
3923
3963
|
records: LCNProfileValidator.array()
|
3924
3964
|
});
|
@@ -3956,13 +3996,15 @@ var require_types_cjs_development = __commonJS({
|
|
3956
3996
|
category: mod.string().optional(),
|
3957
3997
|
status: LCNBoostStatus.optional(),
|
3958
3998
|
autoConnectRecipients: mod.boolean().optional(),
|
3999
|
+
meta: mod.record(mod.any()).optional(),
|
3959
4000
|
claimPermissions: BoostPermissionsValidator.optional()
|
3960
4001
|
});
|
3961
4002
|
var BoostQueryValidator = mod.object({
|
3962
|
-
uri:
|
3963
|
-
name:
|
3964
|
-
type:
|
3965
|
-
category:
|
4003
|
+
uri: StringQuery,
|
4004
|
+
name: StringQuery,
|
4005
|
+
type: StringQuery,
|
4006
|
+
category: StringQuery,
|
4007
|
+
meta: mod.record(StringQuery),
|
3966
4008
|
status: LCNBoostStatus.or(mod.object({ $in: LCNBoostStatus.array() })),
|
3967
4009
|
autoConnectRecipients: mod.boolean()
|
3968
4010
|
}).partial();
|