@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
|
@@ -7382,6 +7382,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7382
7382
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator2,
|
|
7383
7383
|
LCNNotificationValidator: () => LCNNotificationValidator2,
|
|
7384
7384
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum2,
|
|
7385
|
+
LCNProfileQueryValidator: () => LCNProfileQueryValidator2,
|
|
7385
7386
|
LCNProfileValidator: () => LCNProfileValidator2,
|
|
7386
7387
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator2,
|
|
7387
7388
|
LCNSigningAuthorityValidator: () => LCNSigningAuthorityValidator2,
|
|
@@ -7407,7 +7408,6 @@ var require_types_cjs_development = __commonJS2({
|
|
|
7407
7408
|
RubricCriterionValidator: () => RubricCriterionValidator2,
|
|
7408
7409
|
SentCredentialInfoValidator: () => SentCredentialInfoValidator2,
|
|
7409
7410
|
ServiceValidator: () => ServiceValidator2,
|
|
7410
|
-
StringQuery: () => StringQuery2,
|
|
7411
7411
|
UnsignedAchievementCredentialValidator: () => UnsignedAchievementCredentialValidator2,
|
|
7412
7412
|
UnsignedVCValidator: () => UnsignedVCValidator2,
|
|
7413
7413
|
UnsignedVPValidator: () => UnsignedVPValidator2,
|
|
@@ -11173,6 +11173,35 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11173
11173
|
var PaginatedEncryptedCredentialRecordsValidator2 = PaginationResponseValidator2.extend({
|
|
11174
11174
|
records: EncryptedCredentialRecordValidator2.array()
|
|
11175
11175
|
});
|
|
11176
|
+
var parseRegexString2 = /* @__PURE__ */ __name22((regexStr) => {
|
|
11177
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
11178
|
+
if (!match)
|
|
11179
|
+
throw new Error("Invalid RegExp string format");
|
|
11180
|
+
return { pattern: match[1], flags: match[2] };
|
|
11181
|
+
}, "parseRegexString");
|
|
11182
|
+
var RegExpValidator2 = mod2.instanceof(RegExp).or(
|
|
11183
|
+
mod2.string().refine(
|
|
11184
|
+
(str) => {
|
|
11185
|
+
try {
|
|
11186
|
+
parseRegexString2(str);
|
|
11187
|
+
return true;
|
|
11188
|
+
} catch (e2) {
|
|
11189
|
+
return false;
|
|
11190
|
+
}
|
|
11191
|
+
},
|
|
11192
|
+
{
|
|
11193
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
11194
|
+
}
|
|
11195
|
+
).transform((str) => {
|
|
11196
|
+
const { pattern, flags } = parseRegexString2(str);
|
|
11197
|
+
try {
|
|
11198
|
+
return new RegExp(pattern, flags);
|
|
11199
|
+
} catch (error) {
|
|
11200
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
11201
|
+
}
|
|
11202
|
+
})
|
|
11203
|
+
);
|
|
11204
|
+
var StringQuery2 = mod2.string().or(mod2.object({ $in: mod2.string().array() })).or(mod2.object({ $regex: RegExpValidator2 }));
|
|
11176
11205
|
var LCNProfileValidator2 = mod2.object({
|
|
11177
11206
|
profileId: mod2.string().min(3).max(40),
|
|
11178
11207
|
displayName: mod2.string().default(""),
|
|
@@ -11187,6 +11216,16 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11187
11216
|
type: mod2.string().optional(),
|
|
11188
11217
|
notificationsWebhook: mod2.string().url().startsWith("http").optional()
|
|
11189
11218
|
});
|
|
11219
|
+
var LCNProfileQueryValidator2 = mod2.object({
|
|
11220
|
+
profileId: StringQuery2,
|
|
11221
|
+
displayName: StringQuery2,
|
|
11222
|
+
shortBio: StringQuery2,
|
|
11223
|
+
bio: StringQuery2,
|
|
11224
|
+
email: StringQuery2,
|
|
11225
|
+
websiteLink: StringQuery2,
|
|
11226
|
+
isServiceProfile: mod2.boolean(),
|
|
11227
|
+
type: StringQuery2
|
|
11228
|
+
}).partial();
|
|
11190
11229
|
var PaginatedLCNProfilesValidator2 = PaginationResponseValidator2.extend({
|
|
11191
11230
|
records: LCNProfileValidator2.array()
|
|
11192
11231
|
});
|
|
@@ -11227,7 +11266,6 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11227
11266
|
meta: mod2.record(mod2.any()).optional(),
|
|
11228
11267
|
claimPermissions: BoostPermissionsValidator2.optional()
|
|
11229
11268
|
});
|
|
11230
|
-
var StringQuery2 = mod2.string().or(mod2.object({ $in: mod2.string().array() })).or(mod2.object({ $regex: mod2.instanceof(RegExp) }));
|
|
11231
11269
|
var BoostQueryValidator2 = mod2.object({
|
|
11232
11270
|
uri: StringQuery2,
|
|
11233
11271
|
name: StringQuery2,
|
|
@@ -14766,6 +14804,8 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
14766
14804
|
});
|
|
14767
14805
|
|
|
14768
14806
|
// ../../learn-card-types/dist/types.esm.js
|
|
14807
|
+
var __defProp4 = Object.defineProperty;
|
|
14808
|
+
var __name4 = /* @__PURE__ */ __name((target, value) => __defProp4(target, "name", { value, configurable: true }), "__name");
|
|
14769
14809
|
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
|
14770
14810
|
var AchievementCriteriaValidator = mod.object({
|
|
14771
14811
|
type: mod.string().optional(),
|
|
@@ -15169,6 +15209,35 @@ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
|
|
15169
15209
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
|
15170
15210
|
records: EncryptedCredentialRecordValidator.array()
|
|
15171
15211
|
});
|
|
15212
|
+
var parseRegexString = /* @__PURE__ */ __name4((regexStr) => {
|
|
15213
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
15214
|
+
if (!match)
|
|
15215
|
+
throw new Error("Invalid RegExp string format");
|
|
15216
|
+
return { pattern: match[1], flags: match[2] };
|
|
15217
|
+
}, "parseRegexString");
|
|
15218
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
|
15219
|
+
mod.string().refine(
|
|
15220
|
+
(str) => {
|
|
15221
|
+
try {
|
|
15222
|
+
parseRegexString(str);
|
|
15223
|
+
return true;
|
|
15224
|
+
} catch {
|
|
15225
|
+
return false;
|
|
15226
|
+
}
|
|
15227
|
+
},
|
|
15228
|
+
{
|
|
15229
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
15230
|
+
}
|
|
15231
|
+
).transform((str) => {
|
|
15232
|
+
const { pattern, flags } = parseRegexString(str);
|
|
15233
|
+
try {
|
|
15234
|
+
return new RegExp(pattern, flags);
|
|
15235
|
+
} catch (error) {
|
|
15236
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
15237
|
+
}
|
|
15238
|
+
})
|
|
15239
|
+
);
|
|
15240
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
15172
15241
|
var LCNProfileValidator = mod.object({
|
|
15173
15242
|
profileId: mod.string().min(3).max(40),
|
|
15174
15243
|
displayName: mod.string().default(""),
|
|
@@ -15183,6 +15252,16 @@ var LCNProfileValidator = mod.object({
|
|
|
15183
15252
|
type: mod.string().optional(),
|
|
15184
15253
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
15185
15254
|
});
|
|
15255
|
+
var LCNProfileQueryValidator = mod.object({
|
|
15256
|
+
profileId: StringQuery,
|
|
15257
|
+
displayName: StringQuery,
|
|
15258
|
+
shortBio: StringQuery,
|
|
15259
|
+
bio: StringQuery,
|
|
15260
|
+
email: StringQuery,
|
|
15261
|
+
websiteLink: StringQuery,
|
|
15262
|
+
isServiceProfile: mod.boolean(),
|
|
15263
|
+
type: StringQuery
|
|
15264
|
+
}).partial();
|
|
15186
15265
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
15187
15266
|
records: LCNProfileValidator.array()
|
|
15188
15267
|
});
|
|
@@ -15223,7 +15302,6 @@ var BoostValidator = mod.object({
|
|
|
15223
15302
|
meta: mod.record(mod.any()).optional(),
|
|
15224
15303
|
claimPermissions: BoostPermissionsValidator.optional()
|
|
15225
15304
|
});
|
|
15226
|
-
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: mod.instanceof(RegExp) }));
|
|
15227
15305
|
var BoostQueryValidator = mod.object({
|
|
15228
15306
|
uri: StringQuery,
|
|
15229
15307
|
name: StringQuery,
|