@learncard/types 5.0.1 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/vc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const ContextValidator: z.ZodArray<z.ZodString, "many">;
2
+ export declare const ContextValidator: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
3
3
  export declare type Context = z.infer<typeof ContextValidator>;
4
4
  export declare const AchievementCriteriaValidator: z.ZodObject<{
5
5
  type: z.ZodOptional<z.ZodString>;
@@ -342,7 +342,7 @@ export declare const RefreshServiceValidator: z.ZodObject<{
342
342
  }>;
343
343
  export declare type RefreshService = z.infer<typeof RefreshServiceValidator>;
344
344
  export declare const UnsignedVCValidator: z.ZodObject<{
345
- '@context': z.ZodArray<z.ZodString, "many">;
345
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
346
346
  id: z.ZodOptional<z.ZodString>;
347
347
  type: z.ZodArray<z.ZodString, "atleastone">;
348
348
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -601,7 +601,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
601
601
  id: string;
602
602
  } | undefined;
603
603
  type: [string, ...string[]];
604
- '@context': string[];
604
+ '@context': (string | Record<string, any>)[];
605
605
  issuer: string | {
606
606
  [x: string]: any;
607
607
  type?: string | [string, ...string[]] | undefined;
@@ -674,7 +674,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
674
674
  id: string;
675
675
  } | undefined;
676
676
  type: [string, ...string[]];
677
- '@context': string[];
677
+ '@context': (string | Record<string, any>)[];
678
678
  issuer: string | {
679
679
  [x: string]: any;
680
680
  type?: string | [string, ...string[]] | undefined;
@@ -763,7 +763,7 @@ export declare const ProofValidator: z.ZodObject<{
763
763
  }>;
764
764
  export declare type Proof = z.infer<typeof ProofValidator>;
765
765
  export declare const VCValidator: z.ZodObject<z.extendShape<{
766
- '@context': z.ZodArray<z.ZodString, "many">;
766
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
767
767
  id: z.ZodOptional<z.ZodString>;
768
768
  type: z.ZodArray<z.ZodString, "atleastone">;
769
769
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -1082,7 +1082,7 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
1082
1082
  id: string;
1083
1083
  } | undefined;
1084
1084
  type: [string, ...string[]];
1085
- '@context': string[];
1085
+ '@context': (string | Record<string, any>)[];
1086
1086
  issuer: string | {
1087
1087
  [x: string]: any;
1088
1088
  type?: string | [string, ...string[]] | undefined;
@@ -1176,7 +1176,7 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
1176
1176
  id: string;
1177
1177
  } | undefined;
1178
1178
  type: [string, ...string[]];
1179
- '@context': string[];
1179
+ '@context': (string | Record<string, any>)[];
1180
1180
  issuer: string | {
1181
1181
  [x: string]: any;
1182
1182
  type?: string | [string, ...string[]] | undefined;
@@ -1255,11 +1255,11 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
1255
1255
  }>;
1256
1256
  export declare type VC = z.infer<typeof VCValidator>;
1257
1257
  export declare const UnsignedVPValidator: z.ZodObject<{
1258
- '@context': z.ZodArray<z.ZodString, "many">;
1258
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1259
1259
  id: z.ZodOptional<z.ZodString>;
1260
1260
  type: z.ZodArray<z.ZodString, "atleastone">;
1261
- verifiableCredential: z.ZodUnion<[z.ZodObject<z.extendShape<{
1262
- '@context': z.ZodArray<z.ZodString, "many">;
1261
+ verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<z.extendShape<{
1262
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1263
1263
  id: z.ZodOptional<z.ZodString>;
1264
1264
  type: z.ZodArray<z.ZodString, "atleastone">;
1265
1265
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -1578,7 +1578,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
1578
1578
  id: string;
1579
1579
  } | undefined;
1580
1580
  type: [string, ...string[]];
1581
- '@context': string[];
1581
+ '@context': (string | Record<string, any>)[];
1582
1582
  issuer: string | {
1583
1583
  [x: string]: any;
1584
1584
  type?: string | [string, ...string[]] | undefined;
@@ -1672,7 +1672,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
1672
1672
  id: string;
1673
1673
  } | undefined;
1674
1674
  type: [string, ...string[]];
1675
- '@context': string[];
1675
+ '@context': (string | Record<string, any>)[];
1676
1676
  issuer: string | {
1677
1677
  [x: string]: any;
1678
1678
  type?: string | [string, ...string[]] | undefined;
@@ -1749,7 +1749,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
1749
1749
  verificationMethod: string;
1750
1750
  }[];
1751
1751
  }>, z.ZodArray<z.ZodObject<z.extendShape<{
1752
- '@context': z.ZodArray<z.ZodString, "many">;
1752
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
1753
1753
  id: z.ZodOptional<z.ZodString>;
1754
1754
  type: z.ZodArray<z.ZodString, "atleastone">;
1755
1755
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -2068,7 +2068,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2068
2068
  id: string;
2069
2069
  } | undefined;
2070
2070
  type: [string, ...string[]];
2071
- '@context': string[];
2071
+ '@context': (string | Record<string, any>)[];
2072
2072
  issuer: string | {
2073
2073
  [x: string]: any;
2074
2074
  type?: string | [string, ...string[]] | undefined;
@@ -2162,7 +2162,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2162
2162
  id: string;
2163
2163
  } | undefined;
2164
2164
  type: [string, ...string[]];
2165
- '@context': string[];
2165
+ '@context': (string | Record<string, any>)[];
2166
2166
  issuer: string | {
2167
2167
  [x: string]: any;
2168
2168
  type?: string | [string, ...string[]] | undefined;
@@ -2238,15 +2238,12 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2238
2238
  proofPurpose: string;
2239
2239
  verificationMethod: string;
2240
2240
  }[];
2241
- }>, "many">]>;
2241
+ }>, "many">]>>;
2242
2242
  holder: z.ZodOptional<z.ZodString>;
2243
2243
  }, "strip", z.ZodAny, {
2244
2244
  [x: string]: any;
2245
2245
  id?: string | undefined;
2246
- holder?: string | undefined;
2247
- type: [string, ...string[]];
2248
- '@context': string[];
2249
- verifiableCredential: {
2246
+ verifiableCredential?: {
2250
2247
  [x: string]: any;
2251
2248
  id?: string | undefined;
2252
2249
  expirationDate?: string | undefined;
@@ -2264,7 +2261,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2264
2261
  id: string;
2265
2262
  } | undefined;
2266
2263
  type: [string, ...string[]];
2267
- '@context': string[];
2264
+ '@context': (string | Record<string, any>)[];
2268
2265
  issuer: string | {
2269
2266
  [x: string]: any;
2270
2267
  type?: string | [string, ...string[]] | undefined;
@@ -2358,7 +2355,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2358
2355
  id: string;
2359
2356
  } | undefined;
2360
2357
  type: [string, ...string[]];
2361
- '@context': string[];
2358
+ '@context': (string | Record<string, any>)[];
2362
2359
  issuer: string | {
2363
2360
  [x: string]: any;
2364
2361
  type?: string | [string, ...string[]] | undefined;
@@ -2434,14 +2431,14 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2434
2431
  proofPurpose: string;
2435
2432
  verificationMethod: string;
2436
2433
  }[];
2437
- }[];
2434
+ }[] | undefined;
2435
+ holder?: string | undefined;
2436
+ type: [string, ...string[]];
2437
+ '@context': (string | Record<string, any>)[];
2438
2438
  }, {
2439
2439
  [x: string]: any;
2440
2440
  id?: string | undefined;
2441
- holder?: string | undefined;
2442
- type: [string, ...string[]];
2443
- '@context': string[];
2444
- verifiableCredential: {
2441
+ verifiableCredential?: {
2445
2442
  [x: string]: any;
2446
2443
  id?: string | undefined;
2447
2444
  expirationDate?: string | undefined;
@@ -2459,7 +2456,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2459
2456
  id: string;
2460
2457
  } | undefined;
2461
2458
  type: [string, ...string[]];
2462
- '@context': string[];
2459
+ '@context': (string | Record<string, any>)[];
2463
2460
  issuer: string | {
2464
2461
  [x: string]: any;
2465
2462
  type?: string | [string, ...string[]] | undefined;
@@ -2553,7 +2550,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2553
2550
  id: string;
2554
2551
  } | undefined;
2555
2552
  type: [string, ...string[]];
2556
- '@context': string[];
2553
+ '@context': (string | Record<string, any>)[];
2557
2554
  issuer: string | {
2558
2555
  [x: string]: any;
2559
2556
  type?: string | [string, ...string[]] | undefined;
@@ -2629,15 +2626,18 @@ export declare const UnsignedVPValidator: z.ZodObject<{
2629
2626
  proofPurpose: string;
2630
2627
  verificationMethod: string;
2631
2628
  }[];
2632
- }[];
2629
+ }[] | undefined;
2630
+ holder?: string | undefined;
2631
+ type: [string, ...string[]];
2632
+ '@context': (string | Record<string, any>)[];
2633
2633
  }>;
2634
2634
  export declare type UnsignedVP = z.infer<typeof UnsignedVPValidator>;
2635
2635
  export declare const VPValidator: z.ZodObject<z.extendShape<{
2636
- '@context': z.ZodArray<z.ZodString, "many">;
2636
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
2637
2637
  id: z.ZodOptional<z.ZodString>;
2638
2638
  type: z.ZodArray<z.ZodString, "atleastone">;
2639
- verifiableCredential: z.ZodUnion<[z.ZodObject<z.extendShape<{
2640
- '@context': z.ZodArray<z.ZodString, "many">;
2639
+ verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<z.extendShape<{
2640
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
2641
2641
  id: z.ZodOptional<z.ZodString>;
2642
2642
  type: z.ZodArray<z.ZodString, "atleastone">;
2643
2643
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -2956,7 +2956,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
2956
2956
  id: string;
2957
2957
  } | undefined;
2958
2958
  type: [string, ...string[]];
2959
- '@context': string[];
2959
+ '@context': (string | Record<string, any>)[];
2960
2960
  issuer: string | {
2961
2961
  [x: string]: any;
2962
2962
  type?: string | [string, ...string[]] | undefined;
@@ -3050,7 +3050,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3050
3050
  id: string;
3051
3051
  } | undefined;
3052
3052
  type: [string, ...string[]];
3053
- '@context': string[];
3053
+ '@context': (string | Record<string, any>)[];
3054
3054
  issuer: string | {
3055
3055
  [x: string]: any;
3056
3056
  type?: string | [string, ...string[]] | undefined;
@@ -3127,7 +3127,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3127
3127
  verificationMethod: string;
3128
3128
  }[];
3129
3129
  }>, z.ZodArray<z.ZodObject<z.extendShape<{
3130
- '@context': z.ZodArray<z.ZodString, "many">;
3130
+ '@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
3131
3131
  id: z.ZodOptional<z.ZodString>;
3132
3132
  type: z.ZodArray<z.ZodString, "atleastone">;
3133
3133
  issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -3446,7 +3446,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3446
3446
  id: string;
3447
3447
  } | undefined;
3448
3448
  type: [string, ...string[]];
3449
- '@context': string[];
3449
+ '@context': (string | Record<string, any>)[];
3450
3450
  issuer: string | {
3451
3451
  [x: string]: any;
3452
3452
  type?: string | [string, ...string[]] | undefined;
@@ -3540,7 +3540,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3540
3540
  id: string;
3541
3541
  } | undefined;
3542
3542
  type: [string, ...string[]];
3543
- '@context': string[];
3543
+ '@context': (string | Record<string, any>)[];
3544
3544
  issuer: string | {
3545
3545
  [x: string]: any;
3546
3546
  type?: string | [string, ...string[]] | undefined;
@@ -3616,7 +3616,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3616
3616
  proofPurpose: string;
3617
3617
  verificationMethod: string;
3618
3618
  }[];
3619
- }>, "many">]>;
3619
+ }>, "many">]>>;
3620
3620
  holder: z.ZodOptional<z.ZodString>;
3621
3621
  }, {
3622
3622
  proof: z.ZodUnion<[z.ZodObject<{
@@ -3681,31 +3681,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3681
3681
  }>, "strip", z.ZodAny, {
3682
3682
  [x: string]: any;
3683
3683
  id?: string | undefined;
3684
- holder?: string | undefined;
3685
- type: [string, ...string[]];
3686
- '@context': string[];
3687
- proof: {
3688
- [x: string]: any;
3689
- challenge?: string | undefined;
3690
- domain?: string | undefined;
3691
- nonce?: string | undefined;
3692
- jws?: string | undefined;
3693
- type: string;
3694
- created: string;
3695
- proofPurpose: string;
3696
- verificationMethod: string;
3697
- } | {
3698
- [x: string]: any;
3699
- challenge?: string | undefined;
3700
- domain?: string | undefined;
3701
- nonce?: string | undefined;
3702
- jws?: string | undefined;
3703
- type: string;
3704
- created: string;
3705
- proofPurpose: string;
3706
- verificationMethod: string;
3707
- }[];
3708
- verifiableCredential: {
3684
+ verifiableCredential?: {
3709
3685
  [x: string]: any;
3710
3686
  id?: string | undefined;
3711
3687
  expirationDate?: string | undefined;
@@ -3723,7 +3699,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3723
3699
  id: string;
3724
3700
  } | undefined;
3725
3701
  type: [string, ...string[]];
3726
- '@context': string[];
3702
+ '@context': (string | Record<string, any>)[];
3727
3703
  issuer: string | {
3728
3704
  [x: string]: any;
3729
3705
  type?: string | [string, ...string[]] | undefined;
@@ -3817,7 +3793,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3817
3793
  id: string;
3818
3794
  } | undefined;
3819
3795
  type: [string, ...string[]];
3820
- '@context': string[];
3796
+ '@context': (string | Record<string, any>)[];
3821
3797
  issuer: string | {
3822
3798
  [x: string]: any;
3823
3799
  type?: string | [string, ...string[]] | undefined;
@@ -3893,13 +3869,10 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3893
3869
  proofPurpose: string;
3894
3870
  verificationMethod: string;
3895
3871
  }[];
3896
- }[];
3897
- }, {
3898
- [x: string]: any;
3899
- id?: string | undefined;
3872
+ }[] | undefined;
3900
3873
  holder?: string | undefined;
3901
3874
  type: [string, ...string[]];
3902
- '@context': string[];
3875
+ '@context': (string | Record<string, any>)[];
3903
3876
  proof: {
3904
3877
  [x: string]: any;
3905
3878
  challenge?: string | undefined;
@@ -3921,7 +3894,10 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3921
3894
  proofPurpose: string;
3922
3895
  verificationMethod: string;
3923
3896
  }[];
3924
- verifiableCredential: {
3897
+ }, {
3898
+ [x: string]: any;
3899
+ id?: string | undefined;
3900
+ verifiableCredential?: {
3925
3901
  [x: string]: any;
3926
3902
  id?: string | undefined;
3927
3903
  expirationDate?: string | undefined;
@@ -3939,7 +3915,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
3939
3915
  id: string;
3940
3916
  } | undefined;
3941
3917
  type: [string, ...string[]];
3942
- '@context': string[];
3918
+ '@context': (string | Record<string, any>)[];
3943
3919
  issuer: string | {
3944
3920
  [x: string]: any;
3945
3921
  type?: string | [string, ...string[]] | undefined;
@@ -4033,7 +4009,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
4033
4009
  id: string;
4034
4010
  } | undefined;
4035
4011
  type: [string, ...string[]];
4036
- '@context': string[];
4012
+ '@context': (string | Record<string, any>)[];
4037
4013
  issuer: string | {
4038
4014
  [x: string]: any;
4039
4015
  type?: string | [string, ...string[]] | undefined;
@@ -4109,6 +4085,30 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
4109
4085
  proofPurpose: string;
4110
4086
  verificationMethod: string;
4111
4087
  }[];
4088
+ }[] | undefined;
4089
+ holder?: string | undefined;
4090
+ type: [string, ...string[]];
4091
+ '@context': (string | Record<string, any>)[];
4092
+ proof: {
4093
+ [x: string]: any;
4094
+ challenge?: string | undefined;
4095
+ domain?: string | undefined;
4096
+ nonce?: string | undefined;
4097
+ jws?: string | undefined;
4098
+ type: string;
4099
+ created: string;
4100
+ proofPurpose: string;
4101
+ verificationMethod: string;
4102
+ } | {
4103
+ [x: string]: any;
4104
+ challenge?: string | undefined;
4105
+ domain?: string | undefined;
4106
+ nonce?: string | undefined;
4107
+ jws?: string | undefined;
4108
+ type: string;
4109
+ created: string;
4110
+ proofPurpose: string;
4111
+ verificationMethod: string;
4112
4112
  }[];
4113
4113
  }>;
4114
4114
  export declare type VP = z.infer<typeof VPValidator>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@learncard/types",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
4
4
  "description": "Shared types for learn card",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/types.esm.js",