@learncard/helpers 1.1.19 → 1.1.21
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 +12 -5
- package/dist/helpers.cjs.development.js.map +2 -2
- package/dist/helpers.cjs.production.min.js +1 -1
- package/dist/helpers.cjs.production.min.js.map +3 -3
- package/dist/helpers.d.ts +4109 -0
- package/dist/helpers.esm.js +12 -5
- package/dist/helpers.esm.js.map +2 -2
- package/package.json +2 -2
package/dist/helpers.esm.js
CHANGED
@@ -4834,12 +4834,12 @@ var require_types_cjs_development = __commonJS({
|
|
4834
4834
|
var ConsentFlowContractValidator = z.object({
|
4835
4835
|
read: z.object({
|
4836
4836
|
anonymize: z.boolean().optional(),
|
4837
|
-
credentials: z.object({ categories: z.record(z.object({ required: z.boolean() })).default({}) }).default({}),
|
4838
|
-
personal: z.record(z.object({ required: z.boolean() })).default({})
|
4837
|
+
credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
|
4838
|
+
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
4839
4839
|
}).default({}),
|
4840
4840
|
write: z.object({
|
4841
|
-
credentials: z.object({ categories: z.record(z.object({ required: z.boolean() })).default({}) }).default({}),
|
4842
|
-
personal: z.record(z.object({ required: z.boolean() })).default({})
|
4841
|
+
credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
|
4842
|
+
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
4843
4843
|
}).default({})
|
4844
4844
|
});
|
4845
4845
|
var ConsentFlowContractDetailsValidator = z.object({
|
@@ -5228,8 +5228,15 @@ var RegExpTransformer = {
|
|
5228
5228
|
});
|
5229
5229
|
}
|
5230
5230
|
};
|
5231
|
+
var isVC2Format = /* @__PURE__ */ __name((credential) => {
|
5232
|
+
if (!credential["@context"] || !Array.isArray(credential["@context"])) {
|
5233
|
+
return false;
|
5234
|
+
}
|
5235
|
+
return credential["@context"].includes("https://www.w3.org/ns/credentials/v2");
|
5236
|
+
}, "isVC2Format");
|
5231
5237
|
export {
|
5232
5238
|
RegExpTransformer,
|
5233
5239
|
isEncrypted,
|
5234
|
-
isHex
|
5240
|
+
isHex,
|
5241
|
+
isVC2Format
|
5235
5242
|
};
|