use std::collections::BTreeSet; use actix_web::{delete, get, post}; use actix_web::{web, HttpResponse}; use crate::Data; use crate::error::ResponseError; use crate::helpers::Authentication; use crate::updates::Settings; pub fn services(cfg: &mut web::ServiceConfig) { cfg.service(update_all) .service(get_all) .service(delete_all) .service(get_rules) .service(update_rules) .service(delete_rules) .service(get_distinct) .service(update_distinct) .service(delete_distinct) .service(get_searchable) .service(update_searchable) .service(delete_searchable) .service(get_displayed) .service(update_displayed) .service(delete_displayed) .service(get_attributes_for_faceting) .service(delete_attributes_for_faceting) .service(update_attributes_for_faceting); } #[post("/indexes/{index_uid}/settings", wrap = "Authentication::Private")] async fn update_all( _data: web::Data, _path: web::Path, _body: web::Json, ) -> Result { todo!() } #[get("/indexes/{index_uid}/settings", wrap = "Authentication::Private")] async fn get_all( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[delete("/indexes/{index_uid}/settings", wrap = "Authentication::Private")] async fn delete_all( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[get( "/indexes/{index_uid}/settings/ranking-rules", wrap = "Authentication::Private" )] async fn get_rules( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[post( "/indexes/{index_uid}/settings/ranking-rules", wrap = "Authentication::Private" )] async fn update_rules( _data: web::Data, _path: web::Path, _body: web::Json>>, ) -> Result { todo!() } #[delete( "/indexes/{index_uid}/settings/ranking-rules", wrap = "Authentication::Private" )] async fn delete_rules( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[get( "/indexes/{index_uid}/settings/distinct-attribute", wrap = "Authentication::Private" )] async fn get_distinct( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[post( "/indexes/{index_uid}/settings/distinct-attribute", wrap = "Authentication::Private" )] async fn update_distinct( _data: web::Data, _path: web::Path, _body: web::Json>, ) -> Result { todo!() } #[delete( "/indexes/{index_uid}/settings/distinct-attribute", wrap = "Authentication::Private" )] async fn delete_distinct( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[get( "/indexes/{index_uid}/settings/searchable-attributes", wrap = "Authentication::Private" )] async fn get_searchable( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[post( "/indexes/{index_uid}/settings/searchable-attributes", wrap = "Authentication::Private" )] async fn update_searchable( _data: web::Data, _path: web::Path, _body: web::Json>>, ) -> Result { todo!() } #[delete( "/indexes/{index_uid}/settings/searchable-attributes", wrap = "Authentication::Private" )] async fn delete_searchable( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[get( "/indexes/{index_uid}/settings/displayed-attributes", wrap = "Authentication::Private" )] async fn get_displayed( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[post( "/indexes/{index_uid}/settings/displayed-attributes", wrap = "Authentication::Private" )] async fn update_displayed( _data: web::Data, _path: web::Path, _body: web::Json>>, ) -> Result { todo!() } #[delete( "/indexes/{index_uid}/settings/displayed-attributes", wrap = "Authentication::Private" )] async fn delete_displayed( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[get( "/indexes/{index_uid}/settings/attributes-for-faceting", wrap = "Authentication::Private" )] async fn get_attributes_for_faceting( _data: web::Data, _path: web::Path, ) -> Result { todo!() } #[post( "/indexes/{index_uid}/settings/attributes-for-faceting", wrap = "Authentication::Private" )] async fn update_attributes_for_faceting( _data: web::Data, _path: web::Path, _body: web::Json>>, ) -> Result { todo!() } #[delete( "/indexes/{index_uid}/settings/attributes-for-faceting", wrap = "Authentication::Private" )] async fn delete_attributes_for_faceting( _data: web::Data, _path: web::Path, ) -> Result { todo!() }