@@ -27,10 +27,8 @@ import {
2727import { FILE_BROWSER_SORTS } from '@/lib/workspace-files/browser'
2828
2929export const projectFilesParamsSchema = z . object ( { id : nonEmptyIdSchema } )
30- export type ProjectFilesParams = z . input < typeof projectFilesParamsSchema >
3130
3231export const projectFileParamsSchema = projectFilesParamsSchema . extend ( { fileId : nonEmptyIdSchema } )
33- export type ProjectFileParams = z . input < typeof projectFileParamsSchema >
3432
3533export const projectFileRecordSchema = workspaceFileRecordSchema
3634 . omit ( { workspaceId : true , storageContext : true , vfsNamespace : true } )
@@ -44,9 +42,8 @@ export const projectFileCapabilitiesSchema = z.object({
4442 canRead : z . boolean ( ) ,
4543 canWrite : z . boolean ( ) ,
4644} )
47- export type ProjectFileCapabilities = z . output < typeof projectFileCapabilitiesSchema >
4845
49- export const listProjectFilesQuerySchema = z
46+ const listProjectFilesQuerySchema = z
5047 . object ( {
5148 scope : workspaceFileScopeSchema . default ( 'active' ) ,
5249 folderId : folderIdSchema . optional ( ) ,
@@ -64,7 +61,7 @@ export const listProjectFilesQuerySchema = z
6461 } )
6562export type ListProjectFilesQuery = z . output < typeof listProjectFilesQuerySchema >
6663
67- export const listProjectFilesResponseSchema = z . object ( {
64+ const listProjectFilesResponseSchema = z . object ( {
6865 files : z . array ( projectFileRecordSchema ) ,
6966 items : z . array ( fileBrowserItemSchema ) ,
7067 creators : z . array ( fileBrowserCreatorSchema ) ,
@@ -81,11 +78,10 @@ export const listProjectFilesContract = defineRouteContract({
8178 response : { mode : 'json' , schema : listProjectFilesResponseSchema } ,
8279} )
8380
84- export const getProjectFileResponseSchema = z . object ( {
81+ const getProjectFileResponseSchema = z . object ( {
8582 file : projectFileRecordSchema ,
8683 capabilities : projectFileCapabilitiesSchema ,
8784} )
88- export type GetProjectFileResponse = z . output < typeof getProjectFileResponseSchema >
8985
9086export const getProjectFileContract = defineRouteContract ( {
9187 method : 'GET' ,
@@ -94,7 +90,7 @@ export const getProjectFileContract = defineRouteContract({
9490 response : { mode : 'json' , schema : getProjectFileResponseSchema } ,
9591} )
9692
97- export const createProjectFileBodySchema = createWorkspaceFileBodySchema . safeExtend ( {
93+ const createProjectFileBodySchema = createWorkspaceFileBodySchema . safeExtend ( {
9894 exactName : z . boolean ( ) . default ( false ) ,
9995 folderPath : z . string ( ) . max ( 4096 ) . optional ( ) ,
10096} )
@@ -108,20 +104,16 @@ export const createProjectFileContract = defineRouteContract({
108104 response : { mode : 'json' , schema : getProjectFileResponseSchema , status : 201 } ,
109105} )
110106
111- export const updateProjectFileContentBodySchema = updateWorkspaceFileContentBodySchema
107+ const updateProjectFileContentBodySchema = updateWorkspaceFileContentBodySchema
112108 . safeExtend ( {
113109 expectedRevision : z . string ( ) . min ( 1 ) . max ( 1024 ) . optional ( ) ,
114110 contentType : z . string ( ) . trim ( ) . min ( 1 ) . max ( 255 ) . optional ( ) ,
115111 } )
116112 . strict ( )
117- export type UpdateProjectFileContentBody = z . input < typeof updateProjectFileContentBodySchema >
118113
119- export const updateProjectFileContentResponseSchema = getProjectFileResponseSchema . safeExtend ( {
114+ const updateProjectFileContentResponseSchema = getProjectFileResponseSchema . safeExtend ( {
120115 file : projectFileRecordSchema . extend ( { currentVersion : z . number ( ) . int ( ) . positive ( ) } ) ,
121116} )
122- export type UpdateProjectFileContentResponse = z . output <
123- typeof updateProjectFileContentResponseSchema
124- >
125117
126118export const updateProjectFileContentContract = defineRouteContract ( {
127119 method : 'PUT' ,
@@ -138,12 +130,11 @@ export const readProjectFileContentContract = defineRouteContract({
138130 response : { mode : 'binary' } ,
139131} )
140132
141- export const projectFileArtifactQuerySchema = z . object ( {
133+ const projectFileArtifactQuerySchema = z . object ( {
142134 preview : z . enum ( [ '1' , '0' ] ) . optional ( ) ,
143135 v : z . string ( ) . max ( 128 ) . optional ( ) ,
144136 t : z . string ( ) . max ( 32 ) . optional ( ) ,
145137} )
146- export type ProjectFileArtifactQuery = z . input < typeof projectFileArtifactQuerySchema >
147138
148139export const readProjectFileArtifactContract = defineRouteContract ( {
149140 method : 'GET' ,
0 commit comments