@learncard/helpers 1.2.4 → 1.2.7
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/helpers.cjs.development.js +33 -2
- package/dist/helpers.cjs.development.js.map +2 -2
- package/dist/helpers.cjs.production.min.js +5 -5
- package/dist/helpers.cjs.production.min.js.map +3 -3
- package/dist/helpers.d.ts +9 -0
- package/dist/helpers.esm.js +33 -2
- package/dist/helpers.esm.js.map +2 -2
- package/package.json +3 -2
package/dist/helpers.d.ts
CHANGED
|
@@ -652,5 +652,14 @@ export declare const RegExpTransformer: DataTransformer;
|
|
|
652
652
|
export declare const isVC2Format: (credential: UnsignedVC | VC) => boolean;
|
|
653
653
|
/** Unwraps a boost credential from a CertifiedBoostCredential, if it is one */
|
|
654
654
|
export declare const unwrapBoostCredential: (vc?: VC | UnsignedVC) => any;
|
|
655
|
+
/**
|
|
656
|
+
* Checks if a DID is an app-specific did:web
|
|
657
|
+
*
|
|
658
|
+
* App did:webs follow the pattern: did:web:learncard.app:app:<slug>
|
|
659
|
+
*
|
|
660
|
+
* @param did - The DID to check
|
|
661
|
+
* @returns true if the DID is an app did:web, false otherwise
|
|
662
|
+
*/
|
|
663
|
+
export declare const isAppDidWeb: (did?: string) => boolean;
|
|
655
664
|
|
|
656
665
|
export {};
|
package/dist/helpers.esm.js
CHANGED
|
@@ -241,6 +241,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
241
241
|
SkillFrameworkStatusEnum: /* @__PURE__ */ __name(() => SkillFrameworkStatusEnum, "SkillFrameworkStatusEnum"),
|
|
242
242
|
SkillFrameworkValidator: /* @__PURE__ */ __name(() => SkillFrameworkValidator, "SkillFrameworkValidator"),
|
|
243
243
|
SkillQueryValidator: /* @__PURE__ */ __name(() => SkillQueryValidator, "SkillQueryValidator"),
|
|
244
|
+
SkillSemanticSearchInputValidator: /* @__PURE__ */ __name(() => SkillSemanticSearchInputValidator, "SkillSemanticSearchInputValidator"),
|
|
245
|
+
SkillSemanticSearchResultItemValidator: /* @__PURE__ */ __name(() => SkillSemanticSearchResultItemValidator, "SkillSemanticSearchResultItemValidator"),
|
|
246
|
+
SkillSemanticSearchResultValidator: /* @__PURE__ */ __name(() => SkillSemanticSearchResultValidator, "SkillSemanticSearchResultValidator"),
|
|
244
247
|
SkillStatusEnum: /* @__PURE__ */ __name(() => SkillStatusEnum, "SkillStatusEnum"),
|
|
245
248
|
SkillTreeNodeInputValidator: /* @__PURE__ */ __name(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
|
|
246
249
|
SkillTreeNodeValidator: /* @__PURE__ */ __name(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
|
|
@@ -14183,6 +14186,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14183
14186
|
});
|
|
14184
14187
|
var BoostPermissionsValidator = external_exports.object({
|
|
14185
14188
|
role: external_exports.string(),
|
|
14189
|
+
canView: external_exports.boolean().default(true),
|
|
14186
14190
|
canEdit: external_exports.boolean(),
|
|
14187
14191
|
canIssue: external_exports.boolean(),
|
|
14188
14192
|
canRevoke: external_exports.boolean(),
|
|
@@ -14197,6 +14201,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14197
14201
|
});
|
|
14198
14202
|
var BoostPermissionsQueryValidator = external_exports.object({
|
|
14199
14203
|
role: StringQuery,
|
|
14204
|
+
canView: external_exports.boolean(),
|
|
14200
14205
|
canEdit: external_exports.boolean(),
|
|
14201
14206
|
canIssue: external_exports.boolean(),
|
|
14202
14207
|
canRevoke: external_exports.boolean(),
|
|
@@ -14322,7 +14327,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14322
14327
|
var SendBoostTemplateValidator = BoostValidator.partial().omit({ uri: true, claimPermissions: true }).extend({
|
|
14323
14328
|
credential: VCValidator.or(UnsignedVCValidator),
|
|
14324
14329
|
claimPermissions: BoostPermissionsValidator.partial().optional(),
|
|
14325
|
-
skills: external_exports.array(
|
|
14330
|
+
skills: external_exports.array(
|
|
14331
|
+
external_exports.object({
|
|
14332
|
+
frameworkId: external_exports.string(),
|
|
14333
|
+
id: external_exports.string(),
|
|
14334
|
+
proficiencyLevel: external_exports.number().optional()
|
|
14335
|
+
})
|
|
14336
|
+
).min(1).optional()
|
|
14326
14337
|
});
|
|
14327
14338
|
var SendBrandingOptionsValidator = external_exports.object({
|
|
14328
14339
|
issuerName: external_exports.string().optional().describe("Name of the issuing organization"),
|
|
@@ -14564,6 +14575,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14564
14575
|
});
|
|
14565
14576
|
var LCNNotificationTypeEnumValidator = external_exports.enum([
|
|
14566
14577
|
"CONNECTION_REQUEST",
|
|
14578
|
+
"CONNECTION_REQUEST_EXPIRED_INVITE",
|
|
14567
14579
|
"CONNECTION_ACCEPTED",
|
|
14568
14580
|
"CREDENTIAL_RECEIVED",
|
|
14569
14581
|
"CREDENTIAL_ACCEPTED",
|
|
@@ -14822,7 +14834,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14822
14834
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
|
|
14823
14835
|
configuration: external_exports.object({
|
|
14824
14836
|
publishableKey: external_exports.string(),
|
|
14825
|
-
signingAuthorityName: external_exports.string().optional()
|
|
14837
|
+
signingAuthorityName: external_exports.string().optional(),
|
|
14838
|
+
listingId: external_exports.string().optional(),
|
|
14839
|
+
listingSlug: external_exports.string().optional()
|
|
14826
14840
|
}).optional()
|
|
14827
14841
|
});
|
|
14828
14842
|
var LCNDomainOrOriginValidator = external_exports.union([
|
|
@@ -14920,6 +14934,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14920
14934
|
}),
|
|
14921
14935
|
BaseSkillQueryValidator
|
|
14922
14936
|
]);
|
|
14937
|
+
var SkillSemanticSearchInputValidator = external_exports.object({
|
|
14938
|
+
text: external_exports.string().min(1),
|
|
14939
|
+
frameworkId: external_exports.string().optional(),
|
|
14940
|
+
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
14941
|
+
});
|
|
14942
|
+
var SkillSemanticSearchResultItemValidator = SkillValidator.extend({
|
|
14943
|
+
score: external_exports.number()
|
|
14944
|
+
});
|
|
14945
|
+
var SkillSemanticSearchResultValidator = external_exports.object({
|
|
14946
|
+
records: SkillSemanticSearchResultItemValidator.array()
|
|
14947
|
+
});
|
|
14923
14948
|
var SkillFrameworkStatusEnum = external_exports.enum(["active", "archived"]);
|
|
14924
14949
|
var SkillFrameworkValidator = external_exports.object({
|
|
14925
14950
|
id: external_exports.string(),
|
|
@@ -16070,6 +16095,11 @@ var unwrapBoostCredential = /* @__PURE__ */ __name((vc) => {
|
|
|
16070
16095
|
return vc;
|
|
16071
16096
|
}
|
|
16072
16097
|
}, "unwrapBoostCredential");
|
|
16098
|
+
var isAppDidWeb = /* @__PURE__ */ __name((did) => {
|
|
16099
|
+
if (!did) return false;
|
|
16100
|
+
const LCN_APP_DID_WEB_REGEX = /^did:web:.*:app:([^:]+)$/;
|
|
16101
|
+
return LCN_APP_DID_WEB_REGEX.test(did);
|
|
16102
|
+
}, "isAppDidWeb");
|
|
16073
16103
|
export {
|
|
16074
16104
|
DEFAULT_RESOLUTIONS,
|
|
16075
16105
|
ImageResizingValidator,
|
|
@@ -16096,6 +16126,7 @@ export {
|
|
|
16096
16126
|
innerImmerOuterReact,
|
|
16097
16127
|
innerReactOuterImmer,
|
|
16098
16128
|
innerReactOuterReact,
|
|
16129
|
+
isAppDidWeb,
|
|
16099
16130
|
isEncrypted,
|
|
16100
16131
|
isHex,
|
|
16101
16132
|
isNotMaybe,
|