@learncard/types 2.2.1 → 3.0.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.
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const JWKValidator: z.ZodObject<{
3
+ kty: z.ZodString;
4
+ crv: z.ZodString;
5
+ x: z.ZodString;
6
+ y: z.ZodOptional<z.ZodString>;
7
+ d: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ y?: string | undefined;
10
+ kty: string;
11
+ crv: string;
12
+ x: string;
13
+ d: string;
14
+ }, {
15
+ y?: string | undefined;
16
+ kty: string;
17
+ crv: string;
18
+ x: string;
19
+ d: string;
20
+ }>;
21
+ export declare type JWK = z.infer<typeof JWKValidator>;
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './vc';
2
2
  export * from './obv3';
3
3
  export * from './learncard';
4
4
  export * from './idx';
5
+ export * from './crypto';
@@ -63,7 +63,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
63
63
  }>]>>;
64
64
  email: z.ZodOptional<z.ZodString>;
65
65
  address: z.ZodOptional<z.ZodObject<{
66
- type: z.ZodArray<z.ZodString, "atleastone">;
66
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
67
67
  addressCountry: z.ZodOptional<z.ZodString>;
68
68
  addressCountryCode: z.ZodOptional<z.ZodString>;
69
69
  addressRegion: z.ZodOptional<z.ZodString>;
@@ -72,15 +72,15 @@ export declare const CredentialInfoValidator: z.ZodObject<{
72
72
  postOfficeBoxNumber: z.ZodOptional<z.ZodString>;
73
73
  postalCode: z.ZodOptional<z.ZodString>;
74
74
  geo: z.ZodOptional<z.ZodObject<{
75
- type: z.ZodArray<z.ZodString, "atleastone">;
75
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
76
76
  latitude: z.ZodNumber;
77
77
  longitude: z.ZodNumber;
78
78
  }, "strip", z.ZodTypeAny, {
79
- type: [string, ...string[]];
79
+ type: string | [string, ...string[]];
80
80
  latitude: number;
81
81
  longitude: number;
82
82
  }, {
83
- type: [string, ...string[]];
83
+ type: string | [string, ...string[]];
84
84
  latitude: number;
85
85
  longitude: number;
86
86
  }>>;
@@ -93,11 +93,11 @@ export declare const CredentialInfoValidator: z.ZodObject<{
93
93
  postOfficeBoxNumber?: string | undefined;
94
94
  postalCode?: string | undefined;
95
95
  geo?: {
96
- type: [string, ...string[]];
96
+ type: string | [string, ...string[]];
97
97
  latitude: number;
98
98
  longitude: number;
99
99
  } | undefined;
100
- type: [string, ...string[]];
100
+ type: string | [string, ...string[]];
101
101
  }, {
102
102
  addressCountry?: string | undefined;
103
103
  addressCountryCode?: string | undefined;
@@ -107,22 +107,22 @@ export declare const CredentialInfoValidator: z.ZodObject<{
107
107
  postOfficeBoxNumber?: string | undefined;
108
108
  postalCode?: string | undefined;
109
109
  geo?: {
110
- type: [string, ...string[]];
110
+ type: string | [string, ...string[]];
111
111
  latitude: number;
112
112
  longitude: number;
113
113
  } | undefined;
114
- type: [string, ...string[]];
114
+ type: string | [string, ...string[]];
115
115
  }>>;
116
116
  otherIdentifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
- type: z.ZodArray<z.ZodString, "atleastone">;
117
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
118
118
  identifier: z.ZodString;
119
119
  identifierType: z.ZodUnion<[z.ZodEnum<["sourcedId", "systemId", "productId", "userName", "accountId", "emailAddress", "nationalIdentityNumber", "isbn", "issn", "lisSourcedId", "oneRosterSourcedId", "sisSourcedId", "ltiContextId", "ltiDeploymentId", "ltiToolId", "ltiPlatformId", "ltiUserId", "identifier"]>, z.ZodString]>;
120
120
  }, "strip", z.ZodTypeAny, {
121
- type: [string, ...string[]];
121
+ type: string | [string, ...string[]];
122
122
  identifier: string;
123
123
  identifierType: string;
124
124
  }, {
125
- type: [string, ...string[]];
125
+ type: string | [string, ...string[]];
126
126
  identifier: string;
127
127
  identifierType: string;
128
128
  }>, "many">>;
@@ -160,14 +160,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
160
160
  postOfficeBoxNumber?: string | undefined;
161
161
  postalCode?: string | undefined;
162
162
  geo?: {
163
- type: [string, ...string[]];
163
+ type: string | [string, ...string[]];
164
164
  latitude: number;
165
165
  longitude: number;
166
166
  } | undefined;
167
- type: [string, ...string[]];
167
+ type: string | [string, ...string[]];
168
168
  } | undefined;
169
169
  otherIdentifier?: {
170
- type: [string, ...string[]];
170
+ type: string | [string, ...string[]];
171
171
  identifier: string;
172
172
  identifierType: string;
173
173
  }[] | undefined;
@@ -205,14 +205,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
205
205
  postOfficeBoxNumber?: string | undefined;
206
206
  postalCode?: string | undefined;
207
207
  geo?: {
208
- type: [string, ...string[]];
208
+ type: string | [string, ...string[]];
209
209
  latitude: number;
210
210
  longitude: number;
211
211
  } | undefined;
212
- type: [string, ...string[]];
212
+ type: string | [string, ...string[]];
213
213
  } | undefined;
214
214
  otherIdentifier?: {
215
- type: [string, ...string[]];
215
+ type: string | [string, ...string[]];
216
216
  identifier: string;
217
217
  identifierType: string;
218
218
  }[] | undefined;
@@ -250,7 +250,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
250
250
  }>]>>;
251
251
  email: z.ZodOptional<z.ZodString>;
252
252
  address: z.ZodOptional<z.ZodObject<{
253
- type: z.ZodArray<z.ZodString, "atleastone">;
253
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
254
254
  addressCountry: z.ZodOptional<z.ZodString>;
255
255
  addressCountryCode: z.ZodOptional<z.ZodString>;
256
256
  addressRegion: z.ZodOptional<z.ZodString>;
@@ -259,15 +259,15 @@ export declare const CredentialInfoValidator: z.ZodObject<{
259
259
  postOfficeBoxNumber: z.ZodOptional<z.ZodString>;
260
260
  postalCode: z.ZodOptional<z.ZodString>;
261
261
  geo: z.ZodOptional<z.ZodObject<{
262
- type: z.ZodArray<z.ZodString, "atleastone">;
262
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
263
263
  latitude: z.ZodNumber;
264
264
  longitude: z.ZodNumber;
265
265
  }, "strip", z.ZodTypeAny, {
266
- type: [string, ...string[]];
266
+ type: string | [string, ...string[]];
267
267
  latitude: number;
268
268
  longitude: number;
269
269
  }, {
270
- type: [string, ...string[]];
270
+ type: string | [string, ...string[]];
271
271
  latitude: number;
272
272
  longitude: number;
273
273
  }>>;
@@ -280,11 +280,11 @@ export declare const CredentialInfoValidator: z.ZodObject<{
280
280
  postOfficeBoxNumber?: string | undefined;
281
281
  postalCode?: string | undefined;
282
282
  geo?: {
283
- type: [string, ...string[]];
283
+ type: string | [string, ...string[]];
284
284
  latitude: number;
285
285
  longitude: number;
286
286
  } | undefined;
287
- type: [string, ...string[]];
287
+ type: string | [string, ...string[]];
288
288
  }, {
289
289
  addressCountry?: string | undefined;
290
290
  addressCountryCode?: string | undefined;
@@ -294,22 +294,22 @@ export declare const CredentialInfoValidator: z.ZodObject<{
294
294
  postOfficeBoxNumber?: string | undefined;
295
295
  postalCode?: string | undefined;
296
296
  geo?: {
297
- type: [string, ...string[]];
297
+ type: string | [string, ...string[]];
298
298
  latitude: number;
299
299
  longitude: number;
300
300
  } | undefined;
301
- type: [string, ...string[]];
301
+ type: string | [string, ...string[]];
302
302
  }>>;
303
303
  otherIdentifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
- type: z.ZodArray<z.ZodString, "atleastone">;
304
+ type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
305
305
  identifier: z.ZodString;
306
306
  identifierType: z.ZodUnion<[z.ZodEnum<["sourcedId", "systemId", "productId", "userName", "accountId", "emailAddress", "nationalIdentityNumber", "isbn", "issn", "lisSourcedId", "oneRosterSourcedId", "sisSourcedId", "ltiContextId", "ltiDeploymentId", "ltiToolId", "ltiPlatformId", "ltiUserId", "identifier"]>, z.ZodString]>;
307
307
  }, "strip", z.ZodTypeAny, {
308
- type: [string, ...string[]];
308
+ type: string | [string, ...string[]];
309
309
  identifier: string;
310
310
  identifierType: string;
311
311
  }, {
312
- type: [string, ...string[]];
312
+ type: string | [string, ...string[]];
313
313
  identifier: string;
314
314
  identifierType: string;
315
315
  }>, "many">>;
@@ -347,14 +347,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
347
347
  postOfficeBoxNumber?: string | undefined;
348
348
  postalCode?: string | undefined;
349
349
  geo?: {
350
- type: [string, ...string[]];
350
+ type: string | [string, ...string[]];
351
351
  latitude: number;
352
352
  longitude: number;
353
353
  } | undefined;
354
- type: [string, ...string[]];
354
+ type: string | [string, ...string[]];
355
355
  } | undefined;
356
356
  otherIdentifier?: {
357
- type: [string, ...string[]];
357
+ type: string | [string, ...string[]];
358
358
  identifier: string;
359
359
  identifierType: string;
360
360
  }[] | undefined;
@@ -392,14 +392,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
392
392
  postOfficeBoxNumber?: string | undefined;
393
393
  postalCode?: string | undefined;
394
394
  geo?: {
395
- type: [string, ...string[]];
395
+ type: string | [string, ...string[]];
396
396
  latitude: number;
397
397
  longitude: number;
398
398
  } | undefined;
399
- type: [string, ...string[]];
399
+ type: string | [string, ...string[]];
400
400
  } | undefined;
401
401
  otherIdentifier?: {
402
- type: [string, ...string[]];
402
+ type: string | [string, ...string[]];
403
403
  identifier: string;
404
404
  identifierType: string;
405
405
  }[] | undefined;
@@ -448,14 +448,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
448
448
  postOfficeBoxNumber?: string | undefined;
449
449
  postalCode?: string | undefined;
450
450
  geo?: {
451
- type: [string, ...string[]];
451
+ type: string | [string, ...string[]];
452
452
  latitude: number;
453
453
  longitude: number;
454
454
  } | undefined;
455
- type: [string, ...string[]];
455
+ type: string | [string, ...string[]];
456
456
  } | undefined;
457
457
  otherIdentifier?: {
458
- type: [string, ...string[]];
458
+ type: string | [string, ...string[]];
459
459
  identifier: string;
460
460
  identifierType: string;
461
461
  }[] | undefined;
@@ -500,14 +500,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
500
500
  postOfficeBoxNumber?: string | undefined;
501
501
  postalCode?: string | undefined;
502
502
  geo?: {
503
- type: [string, ...string[]];
503
+ type: string | [string, ...string[]];
504
504
  latitude: number;
505
505
  longitude: number;
506
506
  } | undefined;
507
- type: [string, ...string[]];
507
+ type: string | [string, ...string[]];
508
508
  } | undefined;
509
509
  otherIdentifier?: {
510
- type: [string, ...string[]];
510
+ type: string | [string, ...string[]];
511
511
  identifier: string;
512
512
  identifierType: string;
513
513
  }[] | undefined;
@@ -547,14 +547,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
547
547
  postOfficeBoxNumber?: string | undefined;
548
548
  postalCode?: string | undefined;
549
549
  geo?: {
550
- type: [string, ...string[]];
550
+ type: string | [string, ...string[]];
551
551
  latitude: number;
552
552
  longitude: number;
553
553
  } | undefined;
554
- type: [string, ...string[]];
554
+ type: string | [string, ...string[]];
555
555
  } | undefined;
556
556
  otherIdentifier?: {
557
- type: [string, ...string[]];
557
+ type: string | [string, ...string[]];
558
558
  identifier: string;
559
559
  identifierType: string;
560
560
  }[] | undefined;
@@ -599,14 +599,14 @@ export declare const CredentialInfoValidator: z.ZodObject<{
599
599
  postOfficeBoxNumber?: string | undefined;
600
600
  postalCode?: string | undefined;
601
601
  geo?: {
602
- type: [string, ...string[]];
602
+ type: string | [string, ...string[]];
603
603
  latitude: number;
604
604
  longitude: number;
605
605
  } | undefined;
606
- type: [string, ...string[]];
606
+ type: string | [string, ...string[]];
607
607
  } | undefined;
608
608
  otherIdentifier?: {
609
- type: [string, ...string[]];
609
+ type: string | [string, ...string[]];
610
610
  identifier: string;
611
611
  identifierType: string;
612
612
  }[] | undefined;