@@ -21,25 +21,6 @@ export const TemplateFileSchema = z.object({
2121} )
2222export type TemplateFile = z . infer < typeof TemplateFileSchema >
2323
24- // --- Template Details ---
25-
26- export const TemplateDetailsSchema = z . object ( {
27- name : z . string ( ) ,
28- description : z . object ( {
29- selection : z . string ( ) ,
30- usage : z . string ( ) ,
31- } ) ,
32- fileTree : FileTreeNodeSchema ,
33- allFiles : z . record ( z . string ( ) , z . string ( ) ) , // Map of filePath -> fileContents
34- language : z . string ( ) . optional ( ) ,
35- deps : z . record ( z . string ( ) , z . string ( ) ) ,
36- frameworks : z . array ( z . string ( ) ) . optional ( ) ,
37- importantFiles : z . array ( z . string ( ) ) ,
38- dontTouchFiles : z . array ( z . string ( ) ) ,
39- redactedFiles : z . array ( z . string ( ) ) ,
40- } )
41- export type TemplateDetails = z . infer < typeof TemplateDetailsSchema >
42-
4324// ==========================================
4425// RUNTIME ERROR SCHEMAS
4526// ==========================================
@@ -116,10 +97,24 @@ export const TemplateInfoSchema = z.object({
11697 description : z . object ( {
11798 selection : z . string ( ) ,
11899 usage : z . string ( ) ,
119- } )
100+ } ) ,
101+ renderMode : z . enum ( [ 'sandbox' , 'browser' ] ) . optional ( ) ,
102+ slideDirectory : z . string ( ) . optional ( ) ,
120103} )
121104export type TemplateInfo = z . infer < typeof TemplateInfoSchema >
122105
106+ // --- Template Details ---
107+
108+ export const TemplateDetailsSchema = TemplateInfoSchema . extend ( {
109+ fileTree : FileTreeNodeSchema ,
110+ allFiles : z . record ( z . string ( ) , z . string ( ) ) ,
111+ deps : z . record ( z . string ( ) , z . string ( ) ) ,
112+ importantFiles : z . array ( z . string ( ) ) ,
113+ dontTouchFiles : z . array ( z . string ( ) ) ,
114+ redactedFiles : z . array ( z . string ( ) ) ,
115+ } )
116+ export type TemplateDetails = z . infer < typeof TemplateDetailsSchema >
117+
123118export const TemplateListResponseSchema = z . object ( {
124119 success : z . boolean ( ) ,
125120 templates : z . array ( TemplateInfoSchema ) ,
0 commit comments