@@ -92,16 +92,34 @@ export const searchResponseSchema = z.object({
9292 isBranchFilteringEnabled : z . boolean ( ) ,
9393} ) ;
9494
95- export const repositorySchema = z . object ( {
96- name : z . string ( ) ,
97- branches : z . array ( z . string ( ) ) ,
95+ enum RepoIndexingStatus {
96+ NEW = 'NEW' ,
97+ IN_INDEX_QUEUE = 'IN_INDEX_QUEUE' ,
98+ INDEXING = 'INDEXING' ,
99+ INDEXED = 'INDEXED' ,
100+ FAILED = 'FAILED' ,
101+ IN_GC_QUEUE = 'IN_GC_QUEUE' ,
102+ GARBAGE_COLLECTING = 'GARBAGE_COLLECTING' ,
103+ GARBAGE_COLLECTION_FAILED = 'GARBAGE_COLLECTION_FAILED'
104+ }
105+
106+ export const repositoryQuerySchema = z . object ( {
107+ codeHostType : z . string ( ) ,
108+ repoId : z . number ( ) ,
109+ repoName : z . string ( ) ,
110+ repoDisplayName : z . string ( ) . optional ( ) ,
111+ repoCloneUrl : z . string ( ) ,
98112 webUrl : z . string ( ) . optional ( ) ,
99- rawConfig : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) ,
113+ linkedConnections : z . array ( z . object ( {
114+ id : z . number ( ) ,
115+ name : z . string ( ) ,
116+ } ) ) ,
117+ imageUrl : z . string ( ) . optional ( ) ,
118+ indexedAt : z . coerce . date ( ) . optional ( ) ,
119+ repoIndexingStatus : z . nativeEnum ( RepoIndexingStatus ) ,
100120} ) ;
101121
102- export const listRepositoriesResponseSchema = z . object ( {
103- repos : z . array ( repositorySchema ) ,
104- } ) ;
122+ export const listRepositoriesResponseSchema = repositoryQuerySchema . array ( ) ;
105123
106124export const fileSourceRequestSchema = z . object ( {
107125 fileName : z . string ( ) ,
0 commit comments