File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { z } from "zod" ;
2
+ import { curateItemSchema } from "./CurateItem" ;
3
+
4
+ /**
5
+ * @description Curate Regisrty's metadata
6
+ * @example
7
+ * {
8
+ "title": "Random list",
9
+ "description": "A random list",
10
+ "columns": [
11
+ {
12
+ "label": "item",
13
+ "description": "a",
14
+ "type": "text",
15
+ "isIdentifier": true,
16
+ }
17
+ ],
18
+ "logoURI": "/ipfs/Qmb9SGhBKCWVuxGTnszb5xS4zjrRpHLHW43Lg5LQYd9cjg/96962-fox-gourmet.png",
19
+ "policyURI": "/ipfs/QmQbDLDs8KZAoccJhBUMGorozb5nkjki5k4pFWso4jmvsZ/file-example_PDF_500_kB.pdf",
20
+ "itemName": "Item",
21
+ "itemNamePlural": "Items"
22
+ }
23
+ */
24
+ export const listMetadataSchema = z . object ( {
25
+ title : z . string ( ) ,
26
+ description : z . string ( ) ,
27
+ itemName : z . string ( ) ,
28
+ itemNamePlural : z . string ( ) ,
29
+ logoURI : z . string ( ) . optional ( ) ,
30
+ policyURI : z . string ( ) . optional ( ) ,
31
+ isListsOfLists : z . string ( ) . optional ( ) ,
32
+ columns : curateItemSchema . shape . columns ,
33
+ } ) ;
34
+
35
+ export type ListMetadata = z . infer < typeof listMetadataSchema > ;
You can’t perform that action at this time.
0 commit comments