@sd-jwt/sd-jwt-vc 0.19.0 → 0.19.1-next.1
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/index.d.mts +27 -9
- package/dist/index.d.ts +27 -9
- package/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +7 -7
- package/src/sd-jwt-vc-type-metadata-format.ts +15 -3
package/dist/index.d.mts
CHANGED
|
@@ -517,18 +517,24 @@ declare const ClaimDisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
|
517
517
|
*/
|
|
518
518
|
locale: z.ZodOptional<z.ZodString>;
|
|
519
519
|
/** REQUIRED. Human-readable label for the claim. */
|
|
520
|
-
label: z.ZodString
|
|
520
|
+
label: z.ZodOptional<z.ZodString>;
|
|
521
|
+
/**
|
|
522
|
+
* Human-readable label for the claim.
|
|
523
|
+
* @deprecated - use `label` instead
|
|
524
|
+
*/
|
|
525
|
+
name: z.ZodOptional<z.ZodString>;
|
|
521
526
|
/** OPTIONAL. Description of the claim for end users. */
|
|
522
527
|
description: z.ZodOptional<z.ZodString>;
|
|
523
528
|
}, z.core.$loose>, z.ZodTransform<{
|
|
524
529
|
locale: string | undefined;
|
|
525
|
-
label: string;
|
|
530
|
+
label: string | undefined;
|
|
526
531
|
description?: string | undefined;
|
|
527
532
|
}, {
|
|
528
533
|
[x: string]: unknown;
|
|
529
|
-
label: string;
|
|
530
534
|
lang?: string | undefined;
|
|
531
535
|
locale?: string | undefined;
|
|
536
|
+
label?: string | undefined;
|
|
537
|
+
name?: string | undefined;
|
|
532
538
|
description?: string | undefined;
|
|
533
539
|
}>>;
|
|
534
540
|
type ClaimDisplay = z.infer<typeof ClaimDisplaySchema>;
|
|
@@ -563,18 +569,24 @@ declare const ClaimSchema: z.ZodObject<{
|
|
|
563
569
|
*/
|
|
564
570
|
locale: z.ZodOptional<z.ZodString>;
|
|
565
571
|
/** REQUIRED. Human-readable label for the claim. */
|
|
566
|
-
label: z.ZodString
|
|
572
|
+
label: z.ZodOptional<z.ZodString>;
|
|
573
|
+
/**
|
|
574
|
+
* Human-readable label for the claim.
|
|
575
|
+
* @deprecated - use `label` instead
|
|
576
|
+
*/
|
|
577
|
+
name: z.ZodOptional<z.ZodString>;
|
|
567
578
|
/** OPTIONAL. Description of the claim for end users. */
|
|
568
579
|
description: z.ZodOptional<z.ZodString>;
|
|
569
580
|
}, z.core.$loose>, z.ZodTransform<{
|
|
570
581
|
locale: string | undefined;
|
|
571
|
-
label: string;
|
|
582
|
+
label: string | undefined;
|
|
572
583
|
description?: string | undefined;
|
|
573
584
|
}, {
|
|
574
585
|
[x: string]: unknown;
|
|
575
|
-
label: string;
|
|
576
586
|
lang?: string | undefined;
|
|
577
587
|
locale?: string | undefined;
|
|
588
|
+
label?: string | undefined;
|
|
589
|
+
name?: string | undefined;
|
|
578
590
|
description?: string | undefined;
|
|
579
591
|
}>>>>;
|
|
580
592
|
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
@@ -862,18 +874,24 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
862
874
|
*/
|
|
863
875
|
locale: z.ZodOptional<z.ZodString>;
|
|
864
876
|
/** REQUIRED. Human-readable label for the claim. */
|
|
865
|
-
label: z.ZodString
|
|
877
|
+
label: z.ZodOptional<z.ZodString>;
|
|
878
|
+
/**
|
|
879
|
+
* Human-readable label for the claim.
|
|
880
|
+
* @deprecated - use `label` instead
|
|
881
|
+
*/
|
|
882
|
+
name: z.ZodOptional<z.ZodString>;
|
|
866
883
|
/** OPTIONAL. Description of the claim for end users. */
|
|
867
884
|
description: z.ZodOptional<z.ZodString>;
|
|
868
885
|
}, z.core.$loose>, z.ZodTransform<{
|
|
869
886
|
locale: string | undefined;
|
|
870
|
-
label: string;
|
|
887
|
+
label: string | undefined;
|
|
871
888
|
description?: string | undefined;
|
|
872
889
|
}, {
|
|
873
890
|
[x: string]: unknown;
|
|
874
|
-
label: string;
|
|
875
891
|
lang?: string | undefined;
|
|
876
892
|
locale?: string | undefined;
|
|
893
|
+
label?: string | undefined;
|
|
894
|
+
name?: string | undefined;
|
|
877
895
|
description?: string | undefined;
|
|
878
896
|
}>>>>;
|
|
879
897
|
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
package/dist/index.d.ts
CHANGED
|
@@ -517,18 +517,24 @@ declare const ClaimDisplaySchema: z.ZodPipe<z.ZodObject<{
|
|
|
517
517
|
*/
|
|
518
518
|
locale: z.ZodOptional<z.ZodString>;
|
|
519
519
|
/** REQUIRED. Human-readable label for the claim. */
|
|
520
|
-
label: z.ZodString
|
|
520
|
+
label: z.ZodOptional<z.ZodString>;
|
|
521
|
+
/**
|
|
522
|
+
* Human-readable label for the claim.
|
|
523
|
+
* @deprecated - use `label` instead
|
|
524
|
+
*/
|
|
525
|
+
name: z.ZodOptional<z.ZodString>;
|
|
521
526
|
/** OPTIONAL. Description of the claim for end users. */
|
|
522
527
|
description: z.ZodOptional<z.ZodString>;
|
|
523
528
|
}, z.core.$loose>, z.ZodTransform<{
|
|
524
529
|
locale: string | undefined;
|
|
525
|
-
label: string;
|
|
530
|
+
label: string | undefined;
|
|
526
531
|
description?: string | undefined;
|
|
527
532
|
}, {
|
|
528
533
|
[x: string]: unknown;
|
|
529
|
-
label: string;
|
|
530
534
|
lang?: string | undefined;
|
|
531
535
|
locale?: string | undefined;
|
|
536
|
+
label?: string | undefined;
|
|
537
|
+
name?: string | undefined;
|
|
532
538
|
description?: string | undefined;
|
|
533
539
|
}>>;
|
|
534
540
|
type ClaimDisplay = z.infer<typeof ClaimDisplaySchema>;
|
|
@@ -563,18 +569,24 @@ declare const ClaimSchema: z.ZodObject<{
|
|
|
563
569
|
*/
|
|
564
570
|
locale: z.ZodOptional<z.ZodString>;
|
|
565
571
|
/** REQUIRED. Human-readable label for the claim. */
|
|
566
|
-
label: z.ZodString
|
|
572
|
+
label: z.ZodOptional<z.ZodString>;
|
|
573
|
+
/**
|
|
574
|
+
* Human-readable label for the claim.
|
|
575
|
+
* @deprecated - use `label` instead
|
|
576
|
+
*/
|
|
577
|
+
name: z.ZodOptional<z.ZodString>;
|
|
567
578
|
/** OPTIONAL. Description of the claim for end users. */
|
|
568
579
|
description: z.ZodOptional<z.ZodString>;
|
|
569
580
|
}, z.core.$loose>, z.ZodTransform<{
|
|
570
581
|
locale: string | undefined;
|
|
571
|
-
label: string;
|
|
582
|
+
label: string | undefined;
|
|
572
583
|
description?: string | undefined;
|
|
573
584
|
}, {
|
|
574
585
|
[x: string]: unknown;
|
|
575
|
-
label: string;
|
|
576
586
|
lang?: string | undefined;
|
|
577
587
|
locale?: string | undefined;
|
|
588
|
+
label?: string | undefined;
|
|
589
|
+
name?: string | undefined;
|
|
578
590
|
description?: string | undefined;
|
|
579
591
|
}>>>>;
|
|
580
592
|
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
|
@@ -862,18 +874,24 @@ declare const TypeMetadataFormatSchema: z.ZodObject<{
|
|
|
862
874
|
*/
|
|
863
875
|
locale: z.ZodOptional<z.ZodString>;
|
|
864
876
|
/** REQUIRED. Human-readable label for the claim. */
|
|
865
|
-
label: z.ZodString
|
|
877
|
+
label: z.ZodOptional<z.ZodString>;
|
|
878
|
+
/**
|
|
879
|
+
* Human-readable label for the claim.
|
|
880
|
+
* @deprecated - use `label` instead
|
|
881
|
+
*/
|
|
882
|
+
name: z.ZodOptional<z.ZodString>;
|
|
866
883
|
/** OPTIONAL. Description of the claim for end users. */
|
|
867
884
|
description: z.ZodOptional<z.ZodString>;
|
|
868
885
|
}, z.core.$loose>, z.ZodTransform<{
|
|
869
886
|
locale: string | undefined;
|
|
870
|
-
label: string;
|
|
887
|
+
label: string | undefined;
|
|
871
888
|
description?: string | undefined;
|
|
872
889
|
}, {
|
|
873
890
|
[x: string]: unknown;
|
|
874
|
-
label: string;
|
|
875
891
|
lang?: string | undefined;
|
|
876
892
|
locale?: string | undefined;
|
|
893
|
+
label?: string | undefined;
|
|
894
|
+
name?: string | undefined;
|
|
877
895
|
description?: string | undefined;
|
|
878
896
|
}>>>>;
|
|
879
897
|
/** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */
|
package/dist/index.js
CHANGED
|
@@ -205,16 +205,24 @@ var ClaimDisplaySchema = import_zod.z.looseObject({
|
|
|
205
205
|
*/
|
|
206
206
|
locale: import_zod.z.string().optional(),
|
|
207
207
|
/** REQUIRED. Human-readable label for the claim. */
|
|
208
|
-
label: import_zod.z.string(),
|
|
208
|
+
label: import_zod.z.string().optional(),
|
|
209
|
+
/**
|
|
210
|
+
* Human-readable label for the claim.
|
|
211
|
+
* @deprecated - use `label` instead
|
|
212
|
+
*/
|
|
213
|
+
name: import_zod.z.string().optional(),
|
|
209
214
|
/** OPTIONAL. Description of the claim for end users. */
|
|
210
215
|
description: import_zod.z.string().optional()
|
|
211
216
|
}).transform((_a) => {
|
|
212
|
-
var _b = _a, { lang, locale } = _b, rest = __objRest(_b, ["lang", "locale"]);
|
|
217
|
+
var _b = _a, { lang, name, label, locale } = _b, rest = __objRest(_b, ["lang", "name", "label", "locale"]);
|
|
213
218
|
return __spreadProps(__spreadValues({}, rest), {
|
|
214
|
-
locale: locale != null ? locale : lang
|
|
219
|
+
locale: locale != null ? locale : lang,
|
|
220
|
+
label: label != null ? label : name
|
|
215
221
|
});
|
|
216
222
|
}).refine(({ locale }) => locale !== void 0, {
|
|
217
|
-
message: "Either locale (preferred) or lang (
|
|
223
|
+
message: "Either locale (preferred) or lang (deprecated) MUST be defined on claim display entry."
|
|
224
|
+
}).refine(({ label }) => label !== void 0, {
|
|
225
|
+
message: "Either label (preferred) or name (deprecated) MUST be defined on claim display entry."
|
|
218
226
|
});
|
|
219
227
|
var ClaimSelectiveDisclosureSchema = import_zod.z.enum([
|
|
220
228
|
"always",
|
package/dist/index.mjs
CHANGED
|
@@ -161,16 +161,24 @@ var ClaimDisplaySchema = z.looseObject({
|
|
|
161
161
|
*/
|
|
162
162
|
locale: z.string().optional(),
|
|
163
163
|
/** REQUIRED. Human-readable label for the claim. */
|
|
164
|
-
label: z.string(),
|
|
164
|
+
label: z.string().optional(),
|
|
165
|
+
/**
|
|
166
|
+
* Human-readable label for the claim.
|
|
167
|
+
* @deprecated - use `label` instead
|
|
168
|
+
*/
|
|
169
|
+
name: z.string().optional(),
|
|
165
170
|
/** OPTIONAL. Description of the claim for end users. */
|
|
166
171
|
description: z.string().optional()
|
|
167
172
|
}).transform((_a) => {
|
|
168
|
-
var _b = _a, { lang, locale } = _b, rest = __objRest(_b, ["lang", "locale"]);
|
|
173
|
+
var _b = _a, { lang, name, label, locale } = _b, rest = __objRest(_b, ["lang", "name", "label", "locale"]);
|
|
169
174
|
return __spreadProps(__spreadValues({}, rest), {
|
|
170
|
-
locale: locale != null ? locale : lang
|
|
175
|
+
locale: locale != null ? locale : lang,
|
|
176
|
+
label: label != null ? label : name
|
|
171
177
|
});
|
|
172
178
|
}).refine(({ locale }) => locale !== void 0, {
|
|
173
|
-
message: "Either locale (preferred) or lang (
|
|
179
|
+
message: "Either locale (preferred) or lang (deprecated) MUST be defined on claim display entry."
|
|
180
|
+
}).refine(({ label }) => label !== void 0, {
|
|
181
|
+
message: "Either label (preferred) or name (deprecated) MUST be defined on claim display entry."
|
|
174
182
|
});
|
|
175
183
|
var ClaimSelectiveDisclosureSchema = z.enum([
|
|
176
184
|
"always",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/sd-jwt-vc",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1-next.1+576f172",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sd-jwt/core": "0.19.
|
|
42
|
-
"@sd-jwt/jwt-status-list": "0.19.
|
|
43
|
-
"@sd-jwt/utils": "0.19.
|
|
41
|
+
"@sd-jwt/core": "0.19.1-next.1+576f172",
|
|
42
|
+
"@sd-jwt/jwt-status-list": "0.19.1-next.1+576f172",
|
|
43
|
+
"@sd-jwt/utils": "0.19.1-next.1+576f172",
|
|
44
44
|
"zod": "^4.3.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@sd-jwt/crypto-nodejs": "0.19.
|
|
48
|
-
"@sd-jwt/types": "0.19.
|
|
47
|
+
"@sd-jwt/crypto-nodejs": "0.19.1-next.1+576f172",
|
|
48
|
+
"@sd-jwt/types": "0.19.1-next.1+576f172",
|
|
49
49
|
"jose": "^6.1.2",
|
|
50
50
|
"msw": "^2.12.3"
|
|
51
51
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"esm"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "576f17261cd5459df00b0ba537914f8a7782ace3"
|
|
69
69
|
}
|
|
@@ -158,17 +158,29 @@ export const ClaimDisplaySchema = z
|
|
|
158
158
|
locale: z.string().optional(),
|
|
159
159
|
|
|
160
160
|
/** REQUIRED. Human-readable label for the claim. */
|
|
161
|
-
label: z.string(),
|
|
161
|
+
label: z.string().optional(),
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Human-readable label for the claim.
|
|
165
|
+
* @deprecated - use `label` instead
|
|
166
|
+
*/
|
|
167
|
+
name: z.string().optional(),
|
|
168
|
+
|
|
162
169
|
/** OPTIONAL. Description of the claim for end users. */
|
|
163
170
|
description: z.string().optional(),
|
|
164
171
|
})
|
|
165
|
-
.transform(({ lang, locale, ...rest }) => ({
|
|
172
|
+
.transform(({ lang, name, label, locale, ...rest }) => ({
|
|
166
173
|
...rest,
|
|
167
174
|
locale: locale ?? lang,
|
|
175
|
+
label: label ?? name,
|
|
168
176
|
}))
|
|
169
177
|
.refine(({ locale }) => locale !== undefined, {
|
|
170
178
|
message:
|
|
171
|
-
'Either locale (preferred) or lang (
|
|
179
|
+
'Either locale (preferred) or lang (deprecated) MUST be defined on claim display entry.',
|
|
180
|
+
})
|
|
181
|
+
.refine(({ label }) => label !== undefined, {
|
|
182
|
+
message:
|
|
183
|
+
'Either label (preferred) or name (deprecated) MUST be defined on claim display entry.',
|
|
172
184
|
});
|
|
173
185
|
|
|
174
186
|
export type ClaimDisplay = z.infer<typeof ClaimDisplaySchema>;
|