@learncard/learn-cloud-plugin 2.0.22 → 2.0.23
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-cloud-plugin.cjs.development.js +81 -3
- package/dist/learn-cloud-plugin.cjs.development.js.map +3 -3
- package/dist/learn-cloud-plugin.cjs.production.min.js +11 -11
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +3 -3
- package/dist/learn-cloud-plugin.esm.js +81 -3
- package/dist/learn-cloud-plugin.esm.js.map +3 -3
- package/package.json +7 -7
|
@@ -7369,6 +7369,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7369
7369
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator2,
|
|
7370
7370
|
LCNNotificationValidator: () => LCNNotificationValidator2,
|
|
7371
7371
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum2,
|
|
7372
|
+
LCNProfileQueryValidator: () => LCNProfileQueryValidator2,
|
|
7372
7373
|
LCNProfileValidator: () => LCNProfileValidator2,
|
|
7373
7374
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator2,
|
|
7374
7375
|
LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator2,
|
|
@@ -7394,7 +7395,6 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7394
7395
|
RubricCriterionValidator: () => RubricCriterionValidator2,
|
|
7395
7396
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator2,
|
|
7396
7397
|
ServiceValidator: () => ServiceValidator2,
|
|
7397
|
-
StringQuery: () => StringQuery2,
|
|
7398
7398
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator2,
|
|
7399
7399
|
UnsignedVCValidator: () => UnsignedVCValidator2,
|
|
7400
7400
|
UnsignedVPValidator: () => UnsignedVPValidator2,
|
|
@@ -11160,6 +11160,35 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11160
11160
|
var PaginatedEncryptedCredentialRecordsValidator2 = PaginationResponseValidator2.extend({
|
|
11161
11161
|
records: EncryptedCredentialRecordValidator2.array()
|
|
11162
11162
|
});
|
|
11163
|
+
var parseRegexString2 = /* @__PURE__ */ __name22((regexStr) => {
|
|
11164
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
11165
|
+
if (!match)
|
|
11166
|
+
throw new Error("Invalid RegExp string format");
|
|
11167
|
+
return { pattern: match[1], flags: match[2] };
|
|
11168
|
+
}, "parseRegexString");
|
|
11169
|
+
var RegExpValidator2 = mod2.instanceof(RegExp).or(
|
|
11170
|
+
mod2.string().refine(
|
|
11171
|
+
(str) => {
|
|
11172
|
+
try {
|
|
11173
|
+
parseRegexString2(str);
|
|
11174
|
+
return true;
|
|
11175
|
+
} catch (e2) {
|
|
11176
|
+
return false;
|
|
11177
|
+
}
|
|
11178
|
+
},
|
|
11179
|
+
{
|
|
11180
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
11181
|
+
}
|
|
11182
|
+
).transform((str) => {
|
|
11183
|
+
const { pattern, flags } = parseRegexString2(str);
|
|
11184
|
+
try {
|
|
11185
|
+
return new RegExp(pattern, flags);
|
|
11186
|
+
} catch (error) {
|
|
11187
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
11188
|
+
}
|
|
11189
|
+
})
|
|
11190
|
+
);
|
|
11191
|
+
var StringQuery2 = mod2.string().or(mod2.object({ $in: mod2.string().array() })).or(mod2.object({ $regex: RegExpValidator2 }));
|
|
11163
11192
|
var LCNProfileValidator2 = mod2.object({
|
|
11164
11193
|
profileId: mod2.string().min(3).max(40),
|
|
11165
11194
|
displayName: mod2.string().default(""),
|
|
@@ -11174,6 +11203,16 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11174
11203
|
type: mod2.string().optional(),
|
|
11175
11204
|
notificationsWebhook: mod2.string().url().startsWith("http").optional()
|
|
11176
11205
|
});
|
|
11206
|
+
var LCNProfileQueryValidator2 = mod2.object({
|
|
11207
|
+
profileId: StringQuery2,
|
|
11208
|
+
displayName: StringQuery2,
|
|
11209
|
+
shortBio: StringQuery2,
|
|
11210
|
+
bio: StringQuery2,
|
|
11211
|
+
email: StringQuery2,
|
|
11212
|
+
websiteLink: StringQuery2,
|
|
11213
|
+
isServiceProfile: mod2.boolean(),
|
|
11214
|
+
type: StringQuery2
|
|
11215
|
+
}).partial();
|
|
11177
11216
|
var PaginatedLCNProfilesValidator2 = PaginationResponseValidator2.extend({
|
|
11178
11217
|
records: LCNProfileValidator2.array()
|
|
11179
11218
|
});
|
|
@@ -11214,7 +11253,6 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11214
11253
|
meta: mod2.record(mod2.any()).optional(),
|
|
11215
11254
|
claimPermissions: BoostPermissionsValidator2.optional()
|
|
11216
11255
|
});
|
|
11217
|
-
var StringQuery2 = mod2.string().or(mod2.object({ $in: mod2.string().array() })).or(mod2.object({ $regex: mod2.instanceof(RegExp) }));
|
|
11218
11256
|
var BoostQueryValidator2 = mod2.object({
|
|
11219
11257
|
uri: StringQuery2,
|
|
11220
11258
|
name: StringQuery2,
|
|
@@ -14753,6 +14791,8 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
14753
14791
|
});
|
|
14754
14792
|
|
|
14755
14793
|
// ../../learn-card-types/dist/types.esm.js
|
|
14794
|
+
var __defProp4 = Object.defineProperty;
|
|
14795
|
+
var __name4 = /* @__PURE__ */ __name((target, value) => __defProp4(target, "name", { value, configurable: true }), "__name");
|
|
14756
14796
|
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
|
14757
14797
|
var AchievementCriteriaValidator = mod.object({
|
|
14758
14798
|
type: mod.string().optional(),
|
|
@@ -15156,6 +15196,35 @@ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
|
|
15156
15196
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
|
15157
15197
|
records: EncryptedCredentialRecordValidator.array()
|
|
15158
15198
|
});
|
|
15199
|
+
var parseRegexString = /* @__PURE__ */ __name4((regexStr) => {
|
|
15200
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
15201
|
+
if (!match)
|
|
15202
|
+
throw new Error("Invalid RegExp string format");
|
|
15203
|
+
return { pattern: match[1], flags: match[2] };
|
|
15204
|
+
}, "parseRegexString");
|
|
15205
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
|
15206
|
+
mod.string().refine(
|
|
15207
|
+
(str) => {
|
|
15208
|
+
try {
|
|
15209
|
+
parseRegexString(str);
|
|
15210
|
+
return true;
|
|
15211
|
+
} catch {
|
|
15212
|
+
return false;
|
|
15213
|
+
}
|
|
15214
|
+
},
|
|
15215
|
+
{
|
|
15216
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
15217
|
+
}
|
|
15218
|
+
).transform((str) => {
|
|
15219
|
+
const { pattern, flags } = parseRegexString(str);
|
|
15220
|
+
try {
|
|
15221
|
+
return new RegExp(pattern, flags);
|
|
15222
|
+
} catch (error) {
|
|
15223
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
15224
|
+
}
|
|
15225
|
+
})
|
|
15226
|
+
);
|
|
15227
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
15159
15228
|
var LCNProfileValidator = mod.object({
|
|
15160
15229
|
profileId: mod.string().min(3).max(40),
|
|
15161
15230
|
displayName: mod.string().default(""),
|
|
@@ -15170,6 +15239,16 @@ var LCNProfileValidator = mod.object({
|
|
|
15170
15239
|
type: mod.string().optional(),
|
|
15171
15240
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
15172
15241
|
});
|
|
15242
|
+
var LCNProfileQueryValidator = mod.object({
|
|
15243
|
+
profileId: StringQuery,
|
|
15244
|
+
displayName: StringQuery,
|
|
15245
|
+
shortBio: StringQuery,
|
|
15246
|
+
bio: StringQuery,
|
|
15247
|
+
email: StringQuery,
|
|
15248
|
+
websiteLink: StringQuery,
|
|
15249
|
+
isServiceProfile: mod.boolean(),
|
|
15250
|
+
type: StringQuery
|
|
15251
|
+
}).partial();
|
|
15173
15252
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
15174
15253
|
records: LCNProfileValidator.array()
|
|
15175
15254
|
});
|
|
@@ -15210,7 +15289,6 @@ var BoostValidator = mod.object({
|
|
|
15210
15289
|
meta: mod.record(mod.any()).optional(),
|
|
15211
15290
|
claimPermissions: BoostPermissionsValidator.optional()
|
|
15212
15291
|
});
|
|
15213
|
-
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: mod.instanceof(RegExp) }));
|
|
15214
15292
|
var BoostQueryValidator = mod.object({
|
|
15215
15293
|
uri: StringQuery,
|
|
15216
15294
|
name: StringQuery,
|