@learncard/types 2.1.1 → 2.2.0

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/README.md CHANGED
@@ -1,11 +1,15 @@
1
+ [<img src="https://user-images.githubusercontent.com/2185016/176284693-4ca14052-d067-4ea5-b170-c6cd2594ee23.png" width="400"/>](image.png)
1
2
  # @learncard/types
2
-
3
- > Shared types for learn card
4
-
5
3
  [![npm version](https://img.shields.io/npm/v/@learncard/types)](https://www.npmjs.com/package/@learncard/types)
6
4
  [![npm downloads](https://img.shields.io/npm/dw/@learncard/types)](https://www.npmjs.com/package/@learncard/types)
7
5
  [![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@learncard/types)](https://www.npmjs.com/package/@learncard/types)
8
6
 
7
+ Shared types for learn card
8
+
9
+ ## Documentation
10
+ All LearnCard documentation can be found at:
11
+ https://docs.learncard.com
12
+
9
13
  ## Install
10
14
 
11
15
  ```bash
@@ -18,8 +22,18 @@ pnpm install @learncard/types
18
22
  import { VC } from "@learncard/types";
19
23
  ```
20
24
 
25
+
26
+ ## Contributing
27
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
28
+
29
+ Please make sure to update tests as appropriate.
30
+
31
+ ## Who is Learning Economy Foundation?
32
+
33
+ **[Learning Economy Foundation (LEF)](https://www.learningeconomy.io)** is a 501(c)(3) non-profit organization leveraging global standards and web3 protocols to bring quality skills and equal opportunity to every human on earth, and address the persistent inequities that exist around the globe in education and employment. We help you build the future of education and work with:
34
+
35
+
21
36
  ## License
22
37
 
23
- MIT © [Taylor Beeston <beeston.taylor@gmail.com>](https://github.com/TaylorBeeston)
38
+ MIT © [Learning Economy Foundation](https://github.com/Learning-Economy-Foundation)
24
39
 
25
- [Created with aqu 🌊](https://github.com/ArtiomTr/aqu#readme)
package/dist/idx.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const StorageTypeValidator: z.ZodEnum<["ceramic"]>;
3
+ export declare const StorageTypeEnum: {
4
+ ceramic: "ceramic";
5
+ };
6
+ export declare type StorageType = z.infer<typeof StorageTypeValidator>;
7
+ export declare const IDXCredentialValidator: z.ZodObject<{
8
+ id: z.ZodString;
9
+ title: z.ZodString;
10
+ storageType: z.ZodOptional<z.ZodEnum<["ceramic"]>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ storageType?: "ceramic" | undefined;
13
+ id: string;
14
+ title: string;
15
+ }, {
16
+ storageType?: "ceramic" | undefined;
17
+ id: string;
18
+ title: string;
19
+ }>;
20
+ export declare type IDXCredential = z.infer<typeof IDXCredentialValidator>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './vc';
2
2
  export * from './obv3';
3
3
  export * from './learncard';
4
+ export * from './idx';
@@ -1,4 +1,18 @@
1
1
  import { z } from 'zod';
2
+ export declare const VerificationCheckValidator: z.ZodObject<{
3
+ checks: z.ZodArray<z.ZodString, "many">;
4
+ warnings: z.ZodArray<z.ZodString, "many">;
5
+ errors: z.ZodArray<z.ZodString, "many">;
6
+ }, "strip", z.ZodTypeAny, {
7
+ checks: string[];
8
+ warnings: string[];
9
+ errors: string[];
10
+ }, {
11
+ checks: string[];
12
+ warnings: string[];
13
+ errors: string[];
14
+ }>;
15
+ export declare type VerificationCheck = z.infer<typeof VerificationCheckValidator>;
2
16
  export declare const VerificationStatusValidator: z.ZodEnum<["Success", "Failed", "Error"]>;
3
17
  export declare type VerificationStatus = z.infer<typeof VerificationStatusValidator>;
4
18
  export declare const VerificationStatusEnum: {
@@ -28,7 +42,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
28
42
  createdAt: z.ZodOptional<z.ZodString>;
29
43
  issuer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
30
44
  id: z.ZodOptional<z.ZodString>;
31
- type: z.ZodArray<z.ZodString, "atleastone">;
45
+ type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
32
46
  name: z.ZodOptional<z.ZodString>;
33
47
  url: z.ZodOptional<z.ZodString>;
34
48
  phone: z.ZodOptional<z.ZodString>;
@@ -124,6 +138,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
124
138
  dateOfBirth: z.ZodOptional<z.ZodString>;
125
139
  }, "strip", z.ZodAny, {
126
140
  [x: string]: any;
141
+ type?: [string, ...string[]] | undefined;
127
142
  id?: string | undefined;
128
143
  name?: string | undefined;
129
144
  url?: string | undefined;
@@ -166,9 +181,9 @@ export declare const CredentialInfoValidator: z.ZodObject<{
166
181
  honorificSuffix?: string | undefined;
167
182
  familyNamePrefix?: string | undefined;
168
183
  dateOfBirth?: string | undefined;
169
- type: [string, ...string[]];
170
184
  }, {
171
185
  [x: string]: any;
186
+ type?: [string, ...string[]] | undefined;
172
187
  id?: string | undefined;
173
188
  name?: string | undefined;
174
189
  url?: string | undefined;
@@ -211,11 +226,10 @@ export declare const CredentialInfoValidator: z.ZodObject<{
211
226
  honorificSuffix?: string | undefined;
212
227
  familyNamePrefix?: string | undefined;
213
228
  dateOfBirth?: string | undefined;
214
- type: [string, ...string[]];
215
229
  }>]>>;
216
230
  issuee: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
217
231
  id: z.ZodOptional<z.ZodString>;
218
- type: z.ZodArray<z.ZodString, "atleastone">;
232
+ type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
219
233
  name: z.ZodOptional<z.ZodString>;
220
234
  url: z.ZodOptional<z.ZodString>;
221
235
  phone: z.ZodOptional<z.ZodString>;
@@ -311,6 +325,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
311
325
  dateOfBirth: z.ZodOptional<z.ZodString>;
312
326
  }, "strip", z.ZodAny, {
313
327
  [x: string]: any;
328
+ type?: [string, ...string[]] | undefined;
314
329
  id?: string | undefined;
315
330
  name?: string | undefined;
316
331
  url?: string | undefined;
@@ -353,9 +368,9 @@ export declare const CredentialInfoValidator: z.ZodObject<{
353
368
  honorificSuffix?: string | undefined;
354
369
  familyNamePrefix?: string | undefined;
355
370
  dateOfBirth?: string | undefined;
356
- type: [string, ...string[]];
357
371
  }, {
358
372
  [x: string]: any;
373
+ type?: [string, ...string[]] | undefined;
359
374
  id?: string | undefined;
360
375
  name?: string | undefined;
361
376
  url?: string | undefined;
@@ -398,7 +413,6 @@ export declare const CredentialInfoValidator: z.ZodObject<{
398
413
  honorificSuffix?: string | undefined;
399
414
  familyNamePrefix?: string | undefined;
400
415
  dateOfBirth?: string | undefined;
401
- type: [string, ...string[]];
402
416
  }>]>>;
403
417
  credentialSubject: z.ZodOptional<z.ZodObject<{
404
418
  id: z.ZodOptional<z.ZodString>;
@@ -412,6 +426,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
412
426
  }, "strip", z.ZodTypeAny, {
413
427
  issuer?: string | {
414
428
  [x: string]: any;
429
+ type?: [string, ...string[]] | undefined;
415
430
  id?: string | undefined;
416
431
  name?: string | undefined;
417
432
  url?: string | undefined;
@@ -454,7 +469,6 @@ export declare const CredentialInfoValidator: z.ZodObject<{
454
469
  honorificSuffix?: string | undefined;
455
470
  familyNamePrefix?: string | undefined;
456
471
  dateOfBirth?: string | undefined;
457
- type: [string, ...string[]];
458
472
  } | undefined;
459
473
  credentialSubject?: {
460
474
  [x: string]: any;
@@ -464,6 +478,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
464
478
  createdAt?: string | undefined;
465
479
  issuee?: string | {
466
480
  [x: string]: any;
481
+ type?: [string, ...string[]] | undefined;
467
482
  id?: string | undefined;
468
483
  name?: string | undefined;
469
484
  url?: string | undefined;
@@ -506,11 +521,11 @@ export declare const CredentialInfoValidator: z.ZodObject<{
506
521
  honorificSuffix?: string | undefined;
507
522
  familyNamePrefix?: string | undefined;
508
523
  dateOfBirth?: string | undefined;
509
- type: [string, ...string[]];
510
524
  } | undefined;
511
525
  }, {
512
526
  issuer?: string | {
513
527
  [x: string]: any;
528
+ type?: [string, ...string[]] | undefined;
514
529
  id?: string | undefined;
515
530
  name?: string | undefined;
516
531
  url?: string | undefined;
@@ -553,7 +568,6 @@ export declare const CredentialInfoValidator: z.ZodObject<{
553
568
  honorificSuffix?: string | undefined;
554
569
  familyNamePrefix?: string | undefined;
555
570
  dateOfBirth?: string | undefined;
556
- type: [string, ...string[]];
557
571
  } | undefined;
558
572
  credentialSubject?: {
559
573
  [x: string]: any;
@@ -563,6 +577,7 @@ export declare const CredentialInfoValidator: z.ZodObject<{
563
577
  createdAt?: string | undefined;
564
578
  issuee?: string | {
565
579
  [x: string]: any;
580
+ type?: [string, ...string[]] | undefined;
566
581
  id?: string | undefined;
567
582
  name?: string | undefined;
568
583
  url?: string | undefined;
@@ -605,7 +620,6 @@ export declare const CredentialInfoValidator: z.ZodObject<{
605
620
  honorificSuffix?: string | undefined;
606
621
  familyNamePrefix?: string | undefined;
607
622
  dateOfBirth?: string | undefined;
608
- type: [string, ...string[]];
609
623
  } | undefined;
610
624
  }>;
611
625
  export declare type CredentialInfo = z.infer<typeof CredentialInfoValidator>;