@carrot-foundation/schemas 0.1.20 → 0.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.
Files changed (36) hide show
  1. package/README.md +45 -0
  2. package/dist/index.cjs +1104 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +552 -0
  5. package/dist/index.d.ts +552 -2
  6. package/dist/index.js +1100 -1
  7. package/dist/index.js.map +1 -0
  8. package/package.json +6 -4
  9. package/dist/index.d.ts.map +0 -1
  10. package/dist/mass-id/index.d.ts +0 -3
  11. package/dist/mass-id/index.d.ts.map +0 -1
  12. package/dist/mass-id/index.js +0 -2
  13. package/dist/mass-id/mass-id.data.schema.d.ts +0 -256
  14. package/dist/mass-id/mass-id.data.schema.d.ts.map +0 -1
  15. package/dist/mass-id/mass-id.data.schema.js +0 -348
  16. package/dist/mass-id/mass-id.schema.d.ts +0 -297
  17. package/dist/mass-id/mass-id.schema.d.ts.map +0 -1
  18. package/dist/mass-id/mass-id.schema.js +0 -163
  19. package/dist/shared/base.schema.d.ts +0 -111
  20. package/dist/shared/base.schema.d.ts.map +0 -1
  21. package/dist/shared/base.schema.js +0 -127
  22. package/dist/shared/definitions.schema.d.ts +0 -96
  23. package/dist/shared/definitions.schema.d.ts.map +0 -1
  24. package/dist/shared/definitions.schema.js +0 -283
  25. package/dist/shared/entities/location.schema.d.ts +0 -55
  26. package/dist/shared/entities/location.schema.d.ts.map +0 -1
  27. package/dist/shared/entities/location.schema.js +0 -68
  28. package/dist/shared/entities/participant.schema.d.ts +0 -8
  29. package/dist/shared/entities/participant.schema.d.ts.map +0 -1
  30. package/dist/shared/entities/participant.schema.js +0 -24
  31. package/dist/shared/helpers.schema.d.ts +0 -4
  32. package/dist/shared/helpers.schema.d.ts.map +0 -1
  33. package/dist/shared/helpers.schema.js +0 -16
  34. package/dist/shared/nft.schema.d.ts +0 -116
  35. package/dist/shared/nft.schema.d.ts.map +0 -1
  36. package/dist/shared/nft.schema.js +0 -193
package/README.md CHANGED
@@ -25,6 +25,51 @@ Example `$id` pinned to a tag:
25
25
  "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/v0.1.0/schemas/ipfs/collection/collection.schema.json"
26
26
  ```
27
27
 
28
+ ## 📚 Package Usage
29
+
30
+ This package is published to npm as `@carrot-foundation/schemas` and supports both **ESM** and **CommonJS** module formats.
31
+
32
+ ### Installation
33
+
34
+ ```bash
35
+ npm install @carrot-foundation/schemas
36
+ # or
37
+ pnpm add @carrot-foundation/schemas
38
+ # or
39
+ yarn add @carrot-foundation/schemas
40
+ ```
41
+
42
+ ### ESM (ECMAScript Modules)
43
+
44
+ ```typescript
45
+ import { MassIDIpfsSchema, MassIDDataSchema } from '@carrot-foundation/schemas';
46
+
47
+ // Use the schemas for validation
48
+ const result = MassIDIpfsSchema.safeParse(data);
49
+ ```
50
+
51
+ ### CommonJS
52
+
53
+ ```javascript
54
+ const { MassIDIpfsSchema, MassIDDataSchema } = require('@carrot-foundation/schemas');
55
+
56
+ // Use the schemas for validation
57
+ const result = MassIDIpfsSchema.safeParse(data);
58
+ ```
59
+
60
+ ### TypeScript Support
61
+
62
+ The package includes full TypeScript definitions:
63
+
64
+ ```typescript
65
+ import { MassIDIpfs, MassIDData } from '@carrot-foundation/schemas';
66
+
67
+ // Types are automatically inferred from the schemas
68
+ const massIdData: MassIDData = {
69
+ // ...
70
+ };
71
+ ```
72
+
28
73
  ## ✅ Usage
29
74
 
30
75
  You may: