File tree Expand file tree Collapse file tree
src/clients/janus/LicenseManager Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 APIBindingCreate ,
99 Addr ,
1010 APICreateBindingRes ,
11+ OptionsDeleteBinding ,
1112} from './types'
1213
1314const TWO_MINUTES_S = 2 * 60
@@ -21,6 +22,7 @@ const routes = {
2122 listBindings : ( tenant : string ) => `${ BASE_URL } /binding/site/${ encodeURIComponent ( tenant ) } ` ,
2223 getBinding : ( bindingId : string ) => `${ BASE_URL } /binding/${ encodeURIComponent ( bindingId ) } ` ,
2324 createBinding : ( ) => `${ BASE_URL } /binding` ,
25+ deleteBinding : ( bindingId : string ) => `${ BASE_URL } /binding/${ encodeURIComponent ( bindingId ) } ` ,
2426}
2527
2628export class LicenseManager extends JanusClient {
@@ -171,4 +173,21 @@ export class LicenseManager extends JanusClient {
171173 } ,
172174 } )
173175 }
176+
177+ public deleteBinding = ( { adminUserAuthToken, bindingId } : OptionsDeleteBinding , config ?: RequestConfig ) => {
178+ const metric = 'lm-delete-binding'
179+
180+ return this . http . delete ( routes . deleteBinding ( bindingId ) , {
181+ inflightKey : inflightUrlWithQuery ,
182+ metric,
183+ headers : {
184+ VtexIdclientAutCookie : adminUserAuthToken ,
185+ } ,
186+ ...config ,
187+ tracing : {
188+ requestSpanNameSuffix : metric ,
189+ ...config ?. tracing ,
190+ } ,
191+ } )
192+ }
174193}
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ export interface OptionsGetBinding {
88 bindingId : string
99}
1010
11+ export interface OptionsDeleteBinding {
12+ adminUserAuthToken : string
13+ bindingId : string
14+ }
15+
1116export interface Addr {
1217 host : string
1318 path : string
You can’t perform that action at this time.
0 commit comments