File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,12 +157,25 @@ export const networksApi = {
157157
158158export const certificatesApi = {
159159 list : ( ) => apiClient . get < { certificates : Certificate [ ] } > ( "/certificates" ) ,
160+ get : ( domain : string ) => apiClient . get < { certificate : Certificate } > ( `/certificates/${ encodeURIComponent ( domain ) } ` ) ,
160161 request : ( domain : string ) =>
161162 apiClient . post < { message : string ; result : any } > ( "/certificates" , {
162163 domain,
163164 } ) ,
164165 renew : ( ) => apiClient . post < { message : string ; result : any } > ( "/certificates/renew" ) ,
165- delete : ( domain : string ) => apiClient . delete ( `/certificates/${ domain } ` ) ,
166+ renewOne : ( domain : string ) =>
167+ apiClient . post < { message : string ; domain : string ; result : any } > (
168+ `/certificates/${ encodeURIComponent ( domain ) } /renew` ,
169+ ) ,
170+ setAutoRenew : ( domain : string , autoRenew : boolean ) =>
171+ apiClient . patch < { domain : string ; auto_renew : boolean } > ( `/certificates/${ encodeURIComponent ( domain ) } /auto-renew` , {
172+ auto_renew : autoRenew ,
173+ } ) ,
174+ renewDeployment : ( name : string ) =>
175+ apiClient . post < { message : string ; deployment : string ; result : any } > (
176+ `/deployments/${ encodeURIComponent ( name ) } /certificates/renew` ,
177+ ) ,
178+ delete : ( domain : string ) => apiClient . delete ( `/certificates/${ encodeURIComponent ( domain ) } ` ) ,
166179} ;
167180
168181export const proxyApi = {
You can’t perform that action at this time.
0 commit comments