@@ -35,7 +35,13 @@ function recursivePageGet(
3535}
3636export const projectFlagService = service
3737 . enhanceEndpoints ( {
38- addTagTypes : [ 'ProjectFlag' , 'FeatureList' , 'FeatureState' , 'Environment' ] ,
38+ addTagTypes : [
39+ 'ProjectFlag' ,
40+ 'FeatureList' ,
41+ 'FeatureState' ,
42+ 'Environment' ,
43+ 'LifecycleCounts' ,
44+ ] ,
3945 } )
4046 . injectEndpoints ( {
4147 endpoints : ( builder ) => ( {
@@ -68,6 +74,7 @@ export const projectFlagService = service
6874 invalidatesTags : [
6975 { id : 'LIST' , type : 'ProjectFlag' } ,
7076 { id : 'LIST' , type : 'FeatureList' } ,
77+ 'LifecycleCounts' ,
7178 ] ,
7279 query : ( query : Req [ 'createProjectFlag' ] ) => ( {
7380 body : query . body ,
@@ -132,6 +139,16 @@ export const projectFlagService = service
132139 } ) ,
133140 } ) ,
134141
142+ getLifecycleStatusCounts : builder . query <
143+ Res [ 'lifecycleStatusCounts' ] ,
144+ Req [ 'getLifecycleStatusCounts' ]
145+ > ( {
146+ providesTags : [ 'LifecycleCounts' ] ,
147+ query : ( { environment } ) => ( {
148+ url : `environments/${ environment } /feature-lifecycle-counts/` ,
149+ } ) ,
150+ } ) ,
151+
135152 getProjectFlag : builder . query < Res [ 'projectFlag' ] , Req [ 'getProjectFlag' ] > ( {
136153 providesTags : ( res ) => [ { id : res ?. id , type : 'ProjectFlag' } ] ,
137154 query : ( query : Req [ 'getProjectFlag' ] ) => ( {
@@ -198,6 +215,7 @@ export const projectFlagService = service
198215 { id : 'LIST' , type : 'ProjectFlag' } ,
199216 { id : 'LIST' , type : 'FeatureList' } ,
200217 { id : 'METRICS' , type : 'Environment' } ,
218+ 'LifecycleCounts' ,
201219 ] ,
202220 query : ( { flag_id, project_id } ) => ( {
203221 method : 'DELETE' ,
@@ -213,6 +231,7 @@ export const projectFlagService = service
213231 { id : 'LIST' , type : 'ProjectFlag' } ,
214232 { id : res ?. id , type : 'ProjectFlag' } ,
215233 { id : 'LIST' , type : 'FeatureList' } ,
234+ 'LifecycleCounts' ,
216235 ] ,
217236 query : ( query : Req [ 'updateProjectFlag' ] ) => ( {
218237 body : query . body ,
@@ -284,6 +303,7 @@ export const {
284303 useAddFlagOwnersMutation,
285304 useCreateProjectFlagMutation,
286305 useGetFeatureListQuery,
306+ useGetLifecycleStatusCountsQuery,
287307 useGetProjectFlagQuery,
288308 useGetProjectFlagsQuery,
289309 useRemoveFlagGroupOwnersMutation,
0 commit comments