@learncard/learn-cloud-plugin 2.0.22 → 2.0.24
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 +85 -5
- 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 +85 -5
- 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,
|
|
@@ -11243,7 +11281,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11243
11281
|
var BoostRecipientValidator2 = mod2.object({
|
|
11244
11282
|
to: LCNProfileValidator2,
|
|
11245
11283
|
from: mod2.string(),
|
|
11246
|
-
received: mod2.string().optional()
|
|
11284
|
+
received: mod2.string().optional(),
|
|
11285
|
+
uri: mod2.string().optional()
|
|
11247
11286
|
});
|
|
11248
11287
|
var PaginatedBoostRecipientsValidator2 = PaginationResponseValidator2.extend({
|
|
11249
11288
|
records: BoostRecipientValidator2.array()
|
|
@@ -14766,6 +14805,8 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
14766
14805
|
});
|
|
14767
14806
|
|
|
14768
14807
|
// ../../learn-card-types/dist/types.esm.js
|
|
14808
|
+
var __defProp4 = Object.defineProperty;
|
|
14809
|
+
var __name4 = /* @__PURE__ */ __name((target, value) => __defProp4(target, "name", { value, configurable: true }), "__name");
|
|
14769
14810
|
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
|
14770
14811
|
var AchievementCriteriaValidator = mod.object({
|
|
14771
14812
|
type: mod.string().optional(),
|
|
@@ -15169,6 +15210,35 @@ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
|
|
15169
15210
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
|
15170
15211
|
records: EncryptedCredentialRecordValidator.array()
|
|
15171
15212
|
});
|
|
15213
|
+
var parseRegexString = /* @__PURE__ */ __name4((regexStr) => {
|
|
15214
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
15215
|
+
if (!match)
|
|
15216
|
+
throw new Error("Invalid RegExp string format");
|
|
15217
|
+
return { pattern: match[1], flags: match[2] };
|
|
15218
|
+
}, "parseRegexString");
|
|
15219
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
|
15220
|
+
mod.string().refine(
|
|
15221
|
+
(str) => {
|
|
15222
|
+
try {
|
|
15223
|
+
parseRegexString(str);
|
|
15224
|
+
return true;
|
|
15225
|
+
} catch {
|
|
15226
|
+
return false;
|
|
15227
|
+
}
|
|
15228
|
+
},
|
|
15229
|
+
{
|
|
15230
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
15231
|
+
}
|
|
15232
|
+
).transform((str) => {
|
|
15233
|
+
const { pattern, flags } = parseRegexString(str);
|
|
15234
|
+
try {
|
|
15235
|
+
return new RegExp(pattern, flags);
|
|
15236
|
+
} catch (error) {
|
|
15237
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
15238
|
+
}
|
|
15239
|
+
})
|
|
15240
|
+
);
|
|
15241
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
15172
15242
|
var LCNProfileValidator = mod.object({
|
|
15173
15243
|
profileId: mod.string().min(3).max(40),
|
|
15174
15244
|
displayName: mod.string().default(""),
|
|
@@ -15183,6 +15253,16 @@ var LCNProfileValidator = mod.object({
|
|
|
15183
15253
|
type: mod.string().optional(),
|
|
15184
15254
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
15185
15255
|
});
|
|
15256
|
+
var LCNProfileQueryValidator = mod.object({
|
|
15257
|
+
profileId: StringQuery,
|
|
15258
|
+
displayName: StringQuery,
|
|
15259
|
+
shortBio: StringQuery,
|
|
15260
|
+
bio: StringQuery,
|
|
15261
|
+
email: StringQuery,
|
|
15262
|
+
websiteLink: StringQuery,
|
|
15263
|
+
isServiceProfile: mod.boolean(),
|
|
15264
|
+
type: StringQuery
|
|
15265
|
+
}).partial();
|
|
15186
15266
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
15187
15267
|
records: LCNProfileValidator.array()
|
|
15188
15268
|
});
|
|
@@ -15223,7 +15303,6 @@ var BoostValidator = mod.object({
|
|
|
15223
15303
|
meta: mod.record(mod.any()).optional(),
|
|
15224
15304
|
claimPermissions: BoostPermissionsValidator.optional()
|
|
15225
15305
|
});
|
|
15226
|
-
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: mod.instanceof(RegExp) }));
|
|
15227
15306
|
var BoostQueryValidator = mod.object({
|
|
15228
15307
|
uri: StringQuery,
|
|
15229
15308
|
name: StringQuery,
|
|
@@ -15239,7 +15318,8 @@ var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
|
15239
15318
|
var BoostRecipientValidator = mod.object({
|
|
15240
15319
|
to: LCNProfileValidator,
|
|
15241
15320
|
from: mod.string(),
|
|
15242
|
-
received: mod.string().optional()
|
|
15321
|
+
received: mod.string().optional(),
|
|
15322
|
+
uri: mod.string().optional()
|
|
15243
15323
|
});
|
|
15244
15324
|
var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
15245
15325
|
records: BoostRecipientValidator.array()
|