@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
@@ -139,6 +139,7 @@ var require_types_cjs_development = __commonJS({
|
|
139
139
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator,
|
140
140
|
LCNNotificationValidator: () => LCNNotificationValidator,
|
141
141
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum,
|
142
|
+
LCNProfileQueryValidator: () => LCNProfileQueryValidator,
|
142
143
|
LCNProfileValidator: () => LCNProfileValidator,
|
143
144
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator,
|
144
145
|
LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator,
|
@@ -3929,6 +3930,35 @@ var require_types_cjs_development = __commonJS({
|
|
3929
3930
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
3930
3931
|
records: EncryptedCredentialRecordValidator.array()
|
3931
3932
|
});
|
3933
|
+
var parseRegexString = /* @__PURE__ */ __name22((regexStr) => {
|
3934
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
3935
|
+
if (!match)
|
3936
|
+
throw new Error("Invalid RegExp string format");
|
3937
|
+
return { pattern: match[1], flags: match[2] };
|
3938
|
+
}, "parseRegexString");
|
3939
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
3940
|
+
mod.string().refine(
|
3941
|
+
(str) => {
|
3942
|
+
try {
|
3943
|
+
parseRegexString(str);
|
3944
|
+
return true;
|
3945
|
+
} catch (e) {
|
3946
|
+
return false;
|
3947
|
+
}
|
3948
|
+
},
|
3949
|
+
{
|
3950
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
3951
|
+
}
|
3952
|
+
).transform((str) => {
|
3953
|
+
const { pattern, flags } = parseRegexString(str);
|
3954
|
+
try {
|
3955
|
+
return new RegExp(pattern, flags);
|
3956
|
+
} catch (error) {
|
3957
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
3958
|
+
}
|
3959
|
+
})
|
3960
|
+
);
|
3961
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
3932
3962
|
var LCNProfileValidator = mod.object({
|
3933
3963
|
profileId: mod.string().min(3).max(40),
|
3934
3964
|
displayName: mod.string().default(""),
|
@@ -3943,6 +3973,16 @@ var require_types_cjs_development = __commonJS({
|
|
3943
3973
|
type: mod.string().optional(),
|
3944
3974
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
3945
3975
|
});
|
3976
|
+
var LCNProfileQueryValidator = mod.object({
|
3977
|
+
profileId: StringQuery,
|
3978
|
+
displayName: StringQuery,
|
3979
|
+
shortBio: StringQuery,
|
3980
|
+
bio: StringQuery,
|
3981
|
+
email: StringQuery,
|
3982
|
+
websiteLink: StringQuery,
|
3983
|
+
isServiceProfile: mod.boolean(),
|
3984
|
+
type: StringQuery
|
3985
|
+
}).partial();
|
3946
3986
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
3947
3987
|
records: LCNProfileValidator.array()
|
3948
3988
|
});
|
@@ -3980,13 +4020,15 @@ var require_types_cjs_development = __commonJS({
|
|
3980
4020
|
category: mod.string().optional(),
|
3981
4021
|
status: LCNBoostStatus.optional(),
|
3982
4022
|
autoConnectRecipients: mod.boolean().optional(),
|
4023
|
+
meta: mod.record(mod.any()).optional(),
|
3983
4024
|
claimPermissions: BoostPermissionsValidator.optional()
|
3984
4025
|
});
|
3985
4026
|
var BoostQueryValidator = mod.object({
|
3986
|
-
uri:
|
3987
|
-
name:
|
3988
|
-
type:
|
3989
|
-
category:
|
4027
|
+
uri: StringQuery,
|
4028
|
+
name: StringQuery,
|
4029
|
+
type: StringQuery,
|
4030
|
+
category: StringQuery,
|
4031
|
+
meta: mod.record(StringQuery),
|
3990
4032
|
status: LCNBoostStatus.or(mod.object({ $in: LCNBoostStatus.array() })),
|
3991
4033
|
autoConnectRecipients: mod.boolean()
|
3992
4034
|
}).partial();
|