@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
@@ -4839,12 +4839,12 @@ var require_types_cjs_development = __commonJS({
|
|
4839
4839
|
var ConsentFlowContractValidator = z.object({
|
4840
4840
|
read: z.object({
|
4841
4841
|
anonymize: z.boolean().optional(),
|
4842
|
-
credentials: z.object({ categories: z.record(z.object({ required: z.boolean() })).default({}) }).default({}),
|
4843
|
-
personal: z.record(z.object({ required: z.boolean() })).default({})
|
4842
|
+
credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
|
4843
|
+
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
4844
4844
|
}).default({}),
|
4845
4845
|
write: z.object({
|
4846
|
-
credentials: z.object({ categories: z.record(z.object({ required: z.boolean() })).default({}) }).default({}),
|
4847
|
-
personal: z.record(z.object({ required: z.boolean() })).default({})
|
4846
|
+
credentials: z.object({ categories: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({}) }).default({}),
|
4847
|
+
personal: z.record(z.object({ required: z.boolean(), defaultEnabled: z.boolean().optional() })).default({})
|
4848
4848
|
}).default({})
|
4849
4849
|
});
|
4850
4850
|
var ConsentFlowContractDetailsValidator = z.object({
|
@@ -5205,7 +5205,8 @@ var src_exports = {};
|
|
5205
5205
|
__export(src_exports, {
|
5206
5206
|
RegExpTransformer: () => RegExpTransformer,
|
5207
5207
|
isEncrypted: () => isEncrypted,
|
5208
|
-
isHex: () => isHex
|
5208
|
+
isHex: () => isHex,
|
5209
|
+
isVC2Format: () => isVC2Format
|
5209
5210
|
});
|
5210
5211
|
module.exports = __toCommonJS(src_exports);
|
5211
5212
|
var import_types = __toESM(require_dist());
|
@@ -5240,3 +5241,9 @@ var RegExpTransformer = {
|
|
5240
5241
|
});
|
5241
5242
|
}
|
5242
5243
|
};
|
5244
|
+
var isVC2Format = /* @__PURE__ */ __name((credential) => {
|
5245
|
+
if (!credential["@context"] || !Array.isArray(credential["@context"])) {
|
5246
|
+
return false;
|
5247
|
+
}
|
5248
|
+
return credential["@context"].includes("https://www.w3.org/ns/credentials/v2");
|
5249
|
+
}, "isVC2Format");
|