@@ -72,21 +72,21 @@ export class Management {
72
72
private get headers ( ) {
73
73
return {
74
74
"Authorization" : `Bearer ${ this . token } ` ,
75
- "Content-Type" : "application/json"
75
+ "Content-Type" : "application/json" ,
76
76
} ;
77
77
}
78
78
79
79
public login ( ) : Promise < any > {
80
80
return this . fetch ( api . login , {
81
81
method : "POST" ,
82
82
headers : {
83
- "Content-Type" : "application/json"
83
+ "Content-Type" : "application/json" ,
84
84
} ,
85
85
body : JSON . stringify ( {
86
86
email : process . env . E2E_EMAIL ,
87
87
password : process . env . E2E_PASSWORD ,
88
88
recaptchaToken : process . env . RECAPTCHA_TOKEN ,
89
- } )
89
+ } ) ,
90
90
} ) . then ( ( res : any ) => res . json ( ) )
91
91
. then ( ( tokens : { access_token : string , refresh_token : string } ) => {
92
92
this . token = tokens . access_token ;
@@ -97,23 +97,23 @@ export class Management {
97
97
return this . fetch ( api . dataset . create , {
98
98
method : "POST" ,
99
99
headers : this . headers ,
100
- body : JSON . stringify ( { name } )
100
+ body : JSON . stringify ( { name } ) ,
101
101
} )
102
102
. then ( ( response : Response ) => response . json ( ) ) ;
103
103
}
104
104
105
105
public deleteDataset ( id : string ) : Promise < any > {
106
106
return this . fetch ( api . dataset . delete . replace ( "{dataset_id}" , id ) , {
107
107
method : "DELETE" ,
108
- headers : this . headers
108
+ headers : this . headers ,
109
109
} ) ;
110
110
}
111
111
112
112
public createDatasetField ( datasetId : string , field : ISetField ) : Promise < any > {
113
113
return this . fetch ( api . dataset . field . create . replace ( "{dataset_id}" , datasetId ) , {
114
114
method : "POST" ,
115
115
headers : this . headers ,
116
- body : JSON . stringify ( field )
116
+ body : JSON . stringify ( field ) ,
117
117
} )
118
118
. then ( ( response : Response ) => response . json ( ) ) ;
119
119
}
@@ -130,7 +130,7 @@ export class Management {
130
130
public deleteChannel ( id : string ) : Promise < void > {
131
131
return this . fetch ( api . channel . delete . replace ( "{channel_id}" , id ) , {
132
132
method : "DELETE" ,
133
- headers : this . headers
133
+ headers : this . headers ,
134
134
} )
135
135
. then ( ( response : Response ) => response . json ( ) ) ;
136
136
}
@@ -139,15 +139,15 @@ export class Management {
139
139
return this . fetch ( api . apikey . create , {
140
140
method : "POST" ,
141
141
headers : this . headers ,
142
- body : JSON . stringify ( { description : "test API key" } )
142
+ body : JSON . stringify ( { description : "test API key" } ) ,
143
143
} )
144
144
. then ( ( response : Response ) => response . json ( ) ) ;
145
145
}
146
146
147
147
public deleteApiKey ( key : string ) : Promise < any > {
148
148
return this . fetch ( api . apikey . delete . replace ( "{key}" , key ) , {
149
149
method : "DELETE" ,
150
- headers : this . headers
150
+ headers : this . headers ,
151
151
} ) ;
152
152
}
153
153
@@ -160,15 +160,15 @@ export class Management {
160
160
actions : { read : [ ] , create : [ ] , update : [ ] , delete : [ ] } ,
161
161
subjects : keys ,
162
162
resources : resources . map ( ( resource ) => resource . id ) ,
163
- } )
163
+ } ) ,
164
164
} )
165
165
. then ( ( response : Response ) => response . json ( ) ) ;
166
166
}
167
167
168
168
public deletePolicy ( id : string ) : Promise < any > {
169
169
return this . fetch ( api . policy . delete . replace ( "{policy_id}" , id ) , {
170
170
method : "DELETE" ,
171
- headers : this . headers
171
+ headers : this . headers ,
172
172
} ) ;
173
173
}
174
174
@@ -185,25 +185,25 @@ export class Management {
185
185
{ key : "key" , value : AWS_KEY } ,
186
186
{ key : "secret" , value : AWS_SECRET } ,
187
187
{ key : "bucket" , value : AWS_BUCKET } ,
188
- ]
189
- }
190
- } )
188
+ ] ,
189
+ } ,
190
+ } ) ,
191
191
} )
192
192
. then ( ( response : Response ) => response . json ( ) ) ;
193
193
}
194
194
195
195
public deleteFileset ( id : string ) : Promise < any > {
196
196
return this . fetch ( api . fileset . delete . replace ( "{fileset_id}" , id ) , {
197
197
method : "DELETE" ,
198
- headers : this . headers
198
+ headers : this . headers ,
199
199
} ) ;
200
200
}
201
201
202
202
public createFilesetField ( filesetId : string , field : ISetField ) : Promise < any > {
203
203
return this . fetch ( api . fileset . field . create . replace ( "{fileset_id}" , filesetId ) , {
204
204
method : "POST" ,
205
205
headers : this . headers ,
206
- body : JSON . stringify ( field )
206
+ body : JSON . stringify ( field ) ,
207
207
} )
208
208
. then ( ( response : Response ) => response . json ( ) ) ;
209
209
}
@@ -215,17 +215,17 @@ export class Management {
215
215
body : JSON . stringify ( {
216
216
from_resource : {
217
217
namespace : "mimir" ,
218
- resource_id : from . id
218
+ resource_id : from . id ,
219
219
} ,
220
220
to_resource : {
221
221
namespace : "mimir" ,
222
- resource_id : to . id
222
+ resource_id : to . id ,
223
223
} ,
224
224
type : {
225
225
from_cardinality : fromCardinality ,
226
226
to_cardinality : toCardinality ,
227
- }
228
- } )
227
+ } ,
228
+ } ) ,
229
229
} )
230
230
. then ( ( response : Response ) => response . json ( ) ) ;
231
231
}
@@ -258,7 +258,7 @@ export class Management {
258
258
public deleteGateway ( id : string ) : Promise < void > {
259
259
return this . fetch ( api . gateways . delete . replace ( "{gateway_id}" , id ) , {
260
260
method : "DELETE" ,
261
- headers : this . headers
261
+ headers : this . headers ,
262
262
} )
263
263
. then ( ( response : Response ) => response . json ( ) ) ;
264
264
}
@@ -275,7 +275,7 @@ export class Management {
275
275
public deleteFlow ( id : string ) : Promise < void > {
276
276
return this . fetch ( api . flows . delete . replace ( "{flow_id}" , id ) , {
277
277
method : "DELETE" ,
278
- headers : this . headers
278
+ headers : this . headers ,
279
279
} )
280
280
. then ( ( response : Response ) => response . json ( ) ) ;
281
281
}
0 commit comments