@@ -1162,6 +1162,130 @@ impl MitoHttpClient {
11621162 }
11631163 }
11641164
1165+ pub async fn batch_delete_artifacts_by_filter (
1166+ & mut self ,
1167+ req : ArtifactsDeleteByFilterReq ,
1168+ ) -> crate :: error:: Result < ArtifactsDeleteByFilterResp > {
1169+ self . url . set_path ( "tasks/delete/artifacts" ) ;
1170+ let resp = self
1171+ . http_client
1172+ . post ( self . url . as_str ( ) )
1173+ . bearer_auth ( & self . credential )
1174+ . json ( & req)
1175+ . send ( )
1176+ . await
1177+ . map_err ( map_reqwest_err) ?;
1178+ if resp. status ( ) . is_success ( ) {
1179+ let resp = resp
1180+ . json :: < ArtifactsDeleteByFilterResp > ( )
1181+ . await
1182+ . map_err ( RequestError :: from) ?;
1183+ Ok ( resp)
1184+ } else {
1185+ Err ( get_error_from_resp ( resp) . await . into ( ) )
1186+ }
1187+ }
1188+
1189+ pub async fn batch_delete_artifacts_by_list (
1190+ & mut self ,
1191+ req : ArtifactsDeleteByUuidsReq ,
1192+ ) -> crate :: error:: Result < ArtifactsDeleteByUuidsResp > {
1193+ self . url . set_path ( "tasks/delete/artifacts/list" ) ;
1194+ let resp = self
1195+ . http_client
1196+ . post ( self . url . as_str ( ) )
1197+ . bearer_auth ( & self . credential )
1198+ . json ( & req)
1199+ . send ( )
1200+ . await
1201+ . map_err ( map_reqwest_err) ?;
1202+ if resp. status ( ) . is_success ( ) {
1203+ let resp = resp
1204+ . json :: < ArtifactsDeleteByUuidsResp > ( )
1205+ . await
1206+ . map_err ( RequestError :: from) ?;
1207+ Ok ( resp)
1208+ } else {
1209+ Err ( get_error_from_resp ( resp) . await . into ( ) )
1210+ }
1211+ }
1212+
1213+ pub async fn batch_delete_attachments_by_filter (
1214+ & mut self ,
1215+ group_name : & str ,
1216+ req : AttachmentsDeleteByFilterReq ,
1217+ ) -> crate :: error:: Result < AttachmentsDeleteByFilterResp > {
1218+ self . url
1219+ . set_path ( & format ! ( "groups/{group_name}/delete/attachments" ) ) ;
1220+ let resp = self
1221+ . http_client
1222+ . post ( self . url . as_str ( ) )
1223+ . bearer_auth ( & self . credential )
1224+ . json ( & req)
1225+ . send ( )
1226+ . await
1227+ . map_err ( map_reqwest_err) ?;
1228+ if resp. status ( ) . is_success ( ) {
1229+ let resp = resp
1230+ . json :: < AttachmentsDeleteByFilterResp > ( )
1231+ . await
1232+ . map_err ( RequestError :: from) ?;
1233+ Ok ( resp)
1234+ } else {
1235+ Err ( get_error_from_resp ( resp) . await . into ( ) )
1236+ }
1237+ }
1238+
1239+ pub async fn batch_delete_attachments_by_list (
1240+ & mut self ,
1241+ group_name : & str ,
1242+ req : AttachmentsDeleteByKeysReq ,
1243+ ) -> crate :: error:: Result < AttachmentsDeleteByKeysResp > {
1244+ self . url
1245+ . set_path ( & format ! ( "groups/{group_name}/delete/attachments/list" ) ) ;
1246+ let resp = self
1247+ . http_client
1248+ . post ( self . url . as_str ( ) )
1249+ . bearer_auth ( & self . credential )
1250+ . json ( & req)
1251+ . send ( )
1252+ . await
1253+ . map_err ( map_reqwest_err) ?;
1254+ if resp. status ( ) . is_success ( ) {
1255+ let resp = resp
1256+ . json :: < AttachmentsDeleteByKeysResp > ( )
1257+ . await
1258+ . map_err ( RequestError :: from) ?;
1259+ Ok ( resp)
1260+ } else {
1261+ Err ( get_error_from_resp ( resp) . await . into ( ) )
1262+ }
1263+ }
1264+
1265+ pub async fn batch_submit_tasks (
1266+ & mut self ,
1267+ req : TasksSubmitReq ,
1268+ ) -> crate :: error:: Result < TasksSubmitResp > {
1269+ self . url . set_path ( "tasks/submit" ) ;
1270+ let resp = self
1271+ . http_client
1272+ . post ( self . url . as_str ( ) )
1273+ . bearer_auth ( & self . credential )
1274+ . json ( & req)
1275+ . send ( )
1276+ . await
1277+ . map_err ( map_reqwest_err) ?;
1278+ if resp. status ( ) . is_success ( ) {
1279+ let resp = resp
1280+ . json :: < TasksSubmitResp > ( )
1281+ . await
1282+ . map_err ( RequestError :: from) ?;
1283+ Ok ( resp)
1284+ } else {
1285+ Err ( get_error_from_resp ( resp) . await . into ( ) )
1286+ }
1287+ }
1288+
11651289 pub async fn admin_shutdown_coordinator (
11661290 & mut self ,
11671291 req : ShutdownReq ,
0 commit comments