@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
|
@@ -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,
|
|
@@ -11230,7 +11268,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
11230
11268
|
var BoostRecipientValidator2 = mod2.object({
|
|
11231
11269
|
to: LCNProfileValidator2,
|
|
11232
11270
|
from: mod2.string(),
|
|
11233
|
-
received: mod2.string().optional()
|
|
11271
|
+
received: mod2.string().optional(),
|
|
11272
|
+
uri: mod2.string().optional()
|
|
11234
11273
|
});
|
|
11235
11274
|
var PaginatedBoostRecipientsValidator2 = PaginationResponseValidator2.extend({
|
|
11236
11275
|
records: BoostRecipientValidator2.array()
|
|
@@ -14753,6 +14792,8 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
14753
14792
|
});
|
|
14754
14793
|
|
|
14755
14794
|
// ../../learn-card-types/dist/types.esm.js
|
|
14795
|
+
var __defProp4 = Object.defineProperty;
|
|
14796
|
+
var __name4 = /* @__PURE__ */ __name((target, value) => __defProp4(target, "name", { value, configurable: true }), "__name");
|
|
14756
14797
|
var ContextValidator = mod.array(mod.string().or(mod.record(mod.any())));
|
|
14757
14798
|
var AchievementCriteriaValidator = mod.object({
|
|
14758
14799
|
type: mod.string().optional(),
|
|
@@ -15156,6 +15197,35 @@ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
|
|
|
15156
15197
|
var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
|
|
15157
15198
|
records: EncryptedCredentialRecordValidator.array()
|
|
15158
15199
|
});
|
|
15200
|
+
var parseRegexString = /* @__PURE__ */ __name4((regexStr) => {
|
|
15201
|
+
const match = regexStr.match(/^\/(.*)\/([gimsuy]*)$/);
|
|
15202
|
+
if (!match)
|
|
15203
|
+
throw new Error("Invalid RegExp string format");
|
|
15204
|
+
return { pattern: match[1], flags: match[2] };
|
|
15205
|
+
}, "parseRegexString");
|
|
15206
|
+
var RegExpValidator = mod.instanceof(RegExp).or(
|
|
15207
|
+
mod.string().refine(
|
|
15208
|
+
(str) => {
|
|
15209
|
+
try {
|
|
15210
|
+
parseRegexString(str);
|
|
15211
|
+
return true;
|
|
15212
|
+
} catch {
|
|
15213
|
+
return false;
|
|
15214
|
+
}
|
|
15215
|
+
},
|
|
15216
|
+
{
|
|
15217
|
+
message: "Invalid RegExp string format. Must be in format '/pattern/flags'"
|
|
15218
|
+
}
|
|
15219
|
+
).transform((str) => {
|
|
15220
|
+
const { pattern, flags } = parseRegexString(str);
|
|
15221
|
+
try {
|
|
15222
|
+
return new RegExp(pattern, flags);
|
|
15223
|
+
} catch (error) {
|
|
15224
|
+
throw new Error(`Invalid RegExp: ${error.message}`);
|
|
15225
|
+
}
|
|
15226
|
+
})
|
|
15227
|
+
);
|
|
15228
|
+
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
15159
15229
|
var LCNProfileValidator = mod.object({
|
|
15160
15230
|
profileId: mod.string().min(3).max(40),
|
|
15161
15231
|
displayName: mod.string().default(""),
|
|
@@ -15170,6 +15240,16 @@ var LCNProfileValidator = mod.object({
|
|
|
15170
15240
|
type: mod.string().optional(),
|
|
15171
15241
|
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
15172
15242
|
});
|
|
15243
|
+
var LCNProfileQueryValidator = mod.object({
|
|
15244
|
+
profileId: StringQuery,
|
|
15245
|
+
displayName: StringQuery,
|
|
15246
|
+
shortBio: StringQuery,
|
|
15247
|
+
bio: StringQuery,
|
|
15248
|
+
email: StringQuery,
|
|
15249
|
+
websiteLink: StringQuery,
|
|
15250
|
+
isServiceProfile: mod.boolean(),
|
|
15251
|
+
type: StringQuery
|
|
15252
|
+
}).partial();
|
|
15173
15253
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
15174
15254
|
records: LCNProfileValidator.array()
|
|
15175
15255
|
});
|
|
@@ -15210,7 +15290,6 @@ var BoostValidator = mod.object({
|
|
|
15210
15290
|
meta: mod.record(mod.any()).optional(),
|
|
15211
15291
|
claimPermissions: BoostPermissionsValidator.optional()
|
|
15212
15292
|
});
|
|
15213
|
-
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: mod.instanceof(RegExp) }));
|
|
15214
15293
|
var BoostQueryValidator = mod.object({
|
|
15215
15294
|
uri: StringQuery,
|
|
15216
15295
|
name: StringQuery,
|
|
@@ -15226,7 +15305,8 @@ var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
|
15226
15305
|
var BoostRecipientValidator = mod.object({
|
|
15227
15306
|
to: LCNProfileValidator,
|
|
15228
15307
|
from: mod.string(),
|
|
15229
|
-
received: mod.string().optional()
|
|
15308
|
+
received: mod.string().optional(),
|
|
15309
|
+
uri: mod.string().optional()
|
|
15230
15310
|
});
|
|
15231
15311
|
var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
15232
15312
|
records: BoostRecipientValidator.array()
|