diff --git a/Cargo.toml b/Cargo.toml index df952147e..56c8b7489 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,44 +2,42 @@ name = "botserver" version = "6.1.0" edition = "2021" -resolver = "2" # Better feature resolution +resolver = "2" [dependencies.botlib] path = "../botlib" -# Remove features here - control them in botlib's Cargo.toml -# features = ["database", "i18n"] # BAD - causes full recompile +features = ["database", "i18n"] [features] # ===== SINGLE DEFAULT FEATURE SET ===== -default = ["chat", "drive", "tasks", "automation", "cache"] +default = ["chat", "drive", "tasks", "automation", "cache", "communications", "productivity"] # ===== COMMUNICATION APPS ===== -chat = ["botlib/chat"] # Delegate to botlib +chat = [] people = [] -mail = ["botlib/mail"] # Delegate optional deps to botlib +mail = ["dep:lettre","dep:mailparse", "dep:imap", "dep:native-tls"] meet = ["dep:livekit"] social = [] whatsapp = [] telegram = [] instagram = [] msteams = [] -# CONSIDER: Do you REALLY need this mega-feature? communications = ["chat", "people", "mail", "meet", "social", "whatsapp", "telegram", "instagram", "msteams", "cache"] # ===== PRODUCTIVITY APPS ===== calendar = [] tasks = ["dep:cron"] -project = [] +project=["quick-xml"] goals = [] workspace = [] productivity = ["calendar", "tasks", "project", "goals", "workspace", "cache"] # ===== DOCUMENT APPS ===== -paper = ["docs", "dep:pdf-extract"] # Reuse docs +paper = ["docs", "dep:pdf-extract"] docs = ["docx-rs", "ooxmlsdk"] -sheet = ["calamine", "spreadsheet-ods"] # Reduced - pick one Excel lib +sheet = ["calamine", "spreadsheet-ods"] slides = ["ooxmlsdk"] -drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:pdf-extract", "dep:flate2"] +drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:pdf-extract"] documents = ["paper", "docs", "sheet", "slides", "drive"] # ===== MEDIA APPS ===== @@ -76,27 +74,21 @@ admin = ["attendant", "security", "settings"] llm = [] vectordb = ["dep:qdrant-client"] nvidia = [] -email = [] cache = ["dep:redis"] compliance = ["dep:csv"] timeseries = [] weba = [] directory = [] progress-bars = ["dep:indicatif"] -grpc = ["dep:tonic"] +grpc = [] jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"] console = ["dep:crossterm", "dep:ratatui", "monitoring"] # ===== BUNDLE FEATURES ===== -# REDUCED VERSION - Enable only what you actually use full = [ - # Communication "chat", "people", "mail", - # Productivity "tasks", "calendar", - # Documents "drive", "docs", - # Core tech "llm", "cache", "compliance" ] @@ -104,19 +96,20 @@ minimal = ["chat"] lightweight = ["chat", "drive", "tasks", "people"] [dependencies] -# === CORE RUNTIME (Minimal) === +# === CORE RUNTIME === aes-gcm = "0.10" anyhow = "1.0" argon2 = "0.5" async-lock = "2.8.0" async-stream = "0.3" async-trait = "0.1" -axum = { version = "0.7.5", default-features = false, features = [] } # NO defaults! +axum = { version = "0.7.5", features = ["ws", "multipart", "macros"] } +axum-server = { version = "0.7", features = ["tls-rustls"] } base64 = "0.22" bytes = "1.8" chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } color-eyre = "0.6.5" -diesel = { version = "2.1", default-features = false, features = ["postgres", "r2d2"] } # MINIMAL! +diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2", "numeric", "32-column-tables"] } bigdecimal = { version = "0.4", default-features = false } diesel_migrations = "2.1.0" dirs = "5.0" @@ -134,16 +127,16 @@ num-format = "0.4" once_cell = "1.18.0" rand = "0.9.2" regex = "1.11" -reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] } # Reduced +reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "multipart"] } serde = { version = "1.0", default-features = false, features = ["derive", "std"] } serde_json = "1.0" toml = "0.8" sha2 = "0.10.9" sha1 = "0.10.6" -tokio = { version = "1.41", default-features = false, features = ["rt", "sync", "time", "macros", "net"] } +tokio = { version = "1.41", default-features = false, features = ["rt", "sync", "time", "macros", "net", "rt-multi-thread"] } tokio-stream = "0.1" tower = "0.4" -tower-http = { version = "0.5", default-features = false, features = ["cors", "fs"] } +tower-http = { version = "0.5", default-features = false, features = ["cors", "fs", "trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3", default-features = false } urlencoding = "2.1" @@ -152,7 +145,7 @@ uuid = { version = "1.11", default-features = false, features = ["v4"] } # === TLS/SECURITY DEPENDENCIES === rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] } tokio-rustls = "0.26" -rcgen = { version = "0.14", default-features = false } +rcgen = { version = "0.14", default-features = false, features = ["crypto", "ring"] } # Added ring feature x509-parser = "0.15" rustls-native-certs = "0.8" webpki-roots = "0.25" @@ -164,7 +157,7 @@ tower-cookies = "0.10" # === APP-SPECIFIC DEPENDENCIES === -# Email Integration (mail feature) +# mail Integration (mail feature) imap = { version = "3.0.0-alpha.15", optional = true } lettre = { version = "0.11", default-features = false, optional = true } mailparse = { version = "0.15", optional = true } @@ -176,29 +169,25 @@ livekit = { version = "0.7", optional = true } # Vector Database (vectordb feature) qdrant-client = { version = "1.12", optional = true } -# Document Processing - PICK ONE PER FORMAT! +# Document Processing docx-rs = { version = "0.4", optional = true } ooxmlsdk = { version = "0.3", default-features = false, optional = true } -# umya-spreadsheet = { version = "2.3", optional = true } # REMOVE - pick one calamine = { version = "0.26", optional = true } -# rust_xlsxwriter = { version = "0.79", optional = true } # REMOVE - pick one spreadsheet-ods = { version = "1.0", optional = true } # File Storage & Drive (drive feature) aws-config = { version = "1.8.8", default-features = false, optional = true } aws-sdk-s3 = { version = "1.109.0", default-features = false, optional = true } pdf-extract = { version = "0.10.0", optional = true } -quick-xml = { version = "0.37", default-features = false } -# zip = { version = "2.2", optional = true } # Only if needed -# downloader = { version = "0.2", optional = true } # Use reqwest instead -flate2 = { version = "1.0", optional = true } -# tar = { version = "0.4", optional = true } # Only if needed +quick-xml = { version = "0.37", optional=true, default-features = false } +flate2 = { version = "1.0", optional = false } +zip = { version = "2.2", optional = false } +tar = { version = "0.4", optional = false } # Task Management (tasks feature) cron = { version = "0.15.0", optional = true } # Automation & Scripting (automation feature) -# REPLACE git with version rhai = { version = "1.23", features = ["sync"], optional = true } # Compliance & Reporting (compliance feature) @@ -222,7 +211,7 @@ redis = { version = "0.27", default-features = false, features = ["tokio-comp"], sysinfo = { version = "0.37.2", optional = true } # Networking/gRPC (grpc feature) -tonic = { version = "0.14.2", default-features = false, features = ["transport", "tls"], optional = true } +tonic = { version = "0.14.2", default-features = false, features = ["transport"], optional = true } # UI Enhancement (progress-bars feature) indicatif = { version = "0.18.0", optional = true } @@ -263,7 +252,7 @@ mockito = "1.7.0" tempfile = "3" [profile.dev] -opt-level = 1 # Slightly optimized debug builds +opt-level = 1 split-debuginfo = "unpacked" incremental = true diff --git a/src/basic/keywords/create_draft.rs b/src/basic/keywords/create_draft.rs index 094e78c69..aa816f596 100644 --- a/src/basic/keywords/create_draft.rs +++ b/src/basic/keywords/create_draft.rs @@ -30,7 +30,7 @@ async fn execute_create_draft( subject: &str, reply_text: &str, ) -> Result { - #[cfg(feature = "email")] + #[cfg(feature = "mail")] { use crate::email::{fetch_latest_sent_to, save_email_draft, SaveDraftRequest}; @@ -63,7 +63,7 @@ async fn execute_create_draft( .map(|()| "Draft saved successfully".to_string()) } - #[cfg(not(feature = "email"))] + #[cfg(not(feature = "mail"))] { use chrono::Utc; use diesel::prelude::*; diff --git a/src/basic/keywords/send_mail.rs b/src/basic/keywords/send_mail.rs index 82ac7c499..eef4ca05a 100644 --- a/src/basic/keywords/send_mail.rs +++ b/src/basic/keywords/send_mail.rs @@ -280,7 +280,7 @@ async fn execute_send_mail( return send_via_connected_account(state, &creds, to, subject, body, attachments).await; } - #[cfg(feature = "email")] + #[cfg(feature = "mail")] { use crate::email::EmailService; diff --git a/src/basic/keywords/universal_messaging.rs b/src/basic/keywords/universal_messaging.rs index 19a002481..a1d5a0fab 100644 --- a/src/basic/keywords/universal_messaging.rs +++ b/src/basic/keywords/universal_messaging.rs @@ -616,7 +616,7 @@ fn send_email( email: &str, message: &str, ) -> Result<(), Box> { - #[cfg(feature = "email")] + #[cfg(feature = "mail")] { use crate::email::EmailService; @@ -625,7 +625,7 @@ fn send_email( Ok(()) } - #[cfg(not(feature = "email"))] + #[cfg(not(feature = "mail"))] { let _ = (state, email, message); error!("Email feature not enabled"); @@ -639,7 +639,7 @@ fn send_email_attachment( file_data: Vec, caption: &str, ) -> Result<(), Box> { - #[cfg(feature = "email")] + #[cfg(feature = "mail")] { use crate::email::EmailService; @@ -654,7 +654,7 @@ fn send_email_attachment( Ok(()) } - #[cfg(not(feature = "email"))] + #[cfg(not(feature = "mail"))] { let _ = (state, email, file_data, caption); error!("Email feature not enabled for attachments"); diff --git a/src/core/shared/schema.rs b/src/core/shared/schema.rs index eb0fc6fde..4512bbe05 100644 --- a/src/core/shared/schema.rs +++ b/src/core/shared/schema.rs @@ -181,55 +181,101 @@ diesel::table! { } } + diesel::table! { - user_email_accounts (id) { + rbac_roles (id) { id -> Uuid, - user_id -> Uuid, - email -> Varchar, - display_name -> Nullable, - imap_server -> Varchar, - imap_port -> Int4, - smtp_server -> Varchar, - smtp_port -> Int4, - username -> Varchar, - password_encrypted -> Text, - is_primary -> Bool, + name -> Varchar, + display_name -> Varchar, + description -> Nullable, + is_system -> Bool, is_active -> Bool, + created_by -> Nullable, created_at -> Timestamptz, updated_at -> Timestamptz, } } diesel::table! { - email_drafts (id) { + rbac_groups (id) { + id -> Uuid, + name -> Varchar, + display_name -> Varchar, + description -> Nullable, + parent_group_id -> Nullable, + is_active -> Bool, + created_by -> Nullable, + created_at -> Timestamptz, + updated_at -> Timestamptz, + } +} + +diesel::table! { + rbac_permissions (id) { + id -> Uuid, + name -> Varchar, + display_name -> Varchar, + description -> Nullable, + resource_type -> Varchar, + action -> Varchar, + category -> Varchar, + is_system -> Bool, + created_at -> Timestamptz, + } +} + +diesel::table! { + rbac_role_permissions (id) { + id -> Uuid, + role_id -> Uuid, + permission_id -> Uuid, + granted_by -> Nullable, + granted_at -> Timestamptz, + } +} + +diesel::table! { + rbac_user_roles (id) { id -> Uuid, user_id -> Uuid, - account_id -> Uuid, - to_address -> Text, - cc_address -> Nullable, - bcc_address -> Nullable, - subject -> Nullable, - body -> Nullable, - attachments -> Jsonb, - created_at -> Timestamptz, - updated_at -> Timestamptz, + role_id -> Uuid, + granted_by -> Nullable, + granted_at -> Timestamptz, + expires_at -> Nullable, } } diesel::table! { - email_folders (id) { + rbac_user_groups (id) { id -> Uuid, - account_id -> Uuid, - folder_name -> Varchar, - folder_path -> Varchar, - unread_count -> Int4, - total_count -> Int4, - last_synced -> Nullable, - created_at -> Timestamptz, - updated_at -> Timestamptz, + user_id -> Uuid, + group_id -> Uuid, + added_by -> Nullable, + added_at -> Timestamptz, } } +diesel::table! { + rbac_group_roles (id) { + id -> Uuid, + group_id -> Uuid, + role_id -> Uuid, + granted_by -> Nullable, + granted_at -> Timestamptz, + } +} + +diesel::joinable!(rbac_role_permissions -> rbac_roles (role_id)); +diesel::joinable!(rbac_role_permissions -> rbac_permissions (permission_id)); +diesel::joinable!(rbac_user_roles -> users (user_id)); +diesel::joinable!(rbac_user_roles -> rbac_roles (role_id)); +diesel::joinable!(rbac_user_groups -> users (user_id)); +diesel::joinable!(rbac_user_groups -> rbac_groups (group_id)); +diesel::joinable!(rbac_group_roles -> rbac_groups (group_id)); +diesel::joinable!(rbac_group_roles -> rbac_roles (role_id)); + + + diesel::table! { user_preferences (id) { id -> Uuid, @@ -293,6 +339,57 @@ diesel::table! { } } + +diesel::table! { + user_email_accounts (id) { + id -> Uuid, + user_id -> Uuid, + email -> Varchar, + display_name -> Nullable, + imap_server -> Varchar, + imap_port -> Int4, + smtp_server -> Varchar, + smtp_port -> Int4, + username -> Varchar, + password_encrypted -> Text, + is_primary -> Bool, + is_active -> Bool, + created_at -> Timestamptz, + updated_at -> Timestamptz, + } +} + +diesel::table! { + email_drafts (id) { + id -> Uuid, + user_id -> Uuid, + account_id -> Uuid, + to_address -> Text, + cc_address -> Nullable, + bcc_address -> Nullable, + subject -> Nullable, + body -> Nullable, + attachments -> Jsonb, + created_at -> Timestamptz, + updated_at -> Timestamptz, + } +} + +diesel::table! { + email_folders (id) { + id -> Uuid, + account_id -> Uuid, + folder_name -> Varchar, + folder_path -> Varchar, + unread_count -> Int4, + total_count -> Int4, + last_synced -> Nullable, + created_at -> Timestamptz, + updated_at -> Timestamptz, + } +} + + diesel::table! { email_signatures (id) { id -> Uuid, @@ -447,98 +544,6 @@ diesel::table! { } } -diesel::table! { - rbac_roles (id) { - id -> Uuid, - name -> Varchar, - display_name -> Varchar, - description -> Nullable, - is_system -> Bool, - is_active -> Bool, - created_by -> Nullable, - created_at -> Timestamptz, - updated_at -> Timestamptz, - } -} - -diesel::table! { - rbac_groups (id) { - id -> Uuid, - name -> Varchar, - display_name -> Varchar, - description -> Nullable, - parent_group_id -> Nullable, - is_active -> Bool, - created_by -> Nullable, - created_at -> Timestamptz, - updated_at -> Timestamptz, - } -} - -diesel::table! { - rbac_permissions (id) { - id -> Uuid, - name -> Varchar, - display_name -> Varchar, - description -> Nullable, - resource_type -> Varchar, - action -> Varchar, - category -> Varchar, - is_system -> Bool, - created_at -> Timestamptz, - } -} - -diesel::table! { - rbac_role_permissions (id) { - id -> Uuid, - role_id -> Uuid, - permission_id -> Uuid, - granted_by -> Nullable, - granted_at -> Timestamptz, - } -} - -diesel::table! { - rbac_user_roles (id) { - id -> Uuid, - user_id -> Uuid, - role_id -> Uuid, - granted_by -> Nullable, - granted_at -> Timestamptz, - expires_at -> Nullable, - } -} - -diesel::table! { - rbac_user_groups (id) { - id -> Uuid, - user_id -> Uuid, - group_id -> Uuid, - added_by -> Nullable, - added_at -> Timestamptz, - } -} - -diesel::table! { - rbac_group_roles (id) { - id -> Uuid, - group_id -> Uuid, - role_id -> Uuid, - granted_by -> Nullable, - granted_at -> Timestamptz, - } -} - -diesel::joinable!(rbac_role_permissions -> rbac_roles (role_id)); -diesel::joinable!(rbac_role_permissions -> rbac_permissions (permission_id)); -diesel::joinable!(rbac_user_roles -> users (user_id)); -diesel::joinable!(rbac_user_roles -> rbac_roles (role_id)); -diesel::joinable!(rbac_user_groups -> users (user_id)); -diesel::joinable!(rbac_user_groups -> rbac_groups (group_id)); -diesel::joinable!(rbac_group_roles -> rbac_groups (group_id)); -diesel::joinable!(rbac_group_roles -> rbac_roles (role_id)); - diesel::table! { crm_contacts (id) { id -> Uuid, @@ -983,59 +988,61 @@ diesel::table! { barcode -> Nullable, created_at -> Timestamptz, updated_at -> Timestamptz, - // Tax and fiscal identification - tax_code -> Nullable, - tax_class -> Nullable, - fiscal_code -> Nullable, - origin_code -> Nullable, - global_trade_number -> Nullable, - tax_unit_code -> Nullable, - // Detailed dimensions (shipping) - net_weight -> Nullable, - gross_weight -> Nullable, - width -> Nullable, - height -> Nullable, - length -> Nullable, - package_count -> Nullable, - // Tax rates by type - sales_tax_code -> Nullable, - sales_tax_rate -> Nullable, - excise_tax_code -> Nullable, - excise_tax_rate -> Nullable, - vat_code -> Nullable, - vat_rate -> Nullable, - service_tax_code -> Nullable, - service_tax_rate -> Nullable, - // Marketplace and e-commerce - brand -> Nullable, - model -> Nullable, - color -> Nullable, - size -> Nullable, - material -> Nullable, - gender -> Nullable, - // Advanced inventory control - warehouse_location -> Nullable, - batch_number -> Nullable, - expiration_date -> Nullable, - manufacture_date -> Nullable, - min_stock -> Nullable, - max_stock -> Nullable, - reorder_point -> Nullable, - // Detailed pricing - sale_price -> Nullable, - sale_start -> Nullable, - sale_end -> Nullable, - shipping_cost -> Nullable, - profit_margin -> Nullable, + // // Tax and fiscal identification + // tax_code -> Nullable, + // tax_class -> Nullable, + // fiscal_code -> Nullable, + // origin_code -> Nullable, + // global_trade_number -> Nullable, + // tax_unit_code -> Nullable, + + + // // Detailed dimensions (shipping) + // net_weight -> Nullable, + // gross_weight -> Nullable, + // width -> Nullable, + // height -> Nullable, + // length -> Nullable, + // package_count -> Nullable, + // // Tax rates by type + // sales_tax_code -> Nullable, + // sales_tax_rate -> Nullable, + // excise_tax_code -> Nullable, + // excise_tax_rate -> Nullable, + // vat_code -> Nullable, + // vat_rate -> Nullable, + // service_tax_code -> Nullable, + // service_tax_rate -> Nullable, + // // Marketplace and e-commerce + // brand -> Nullable, + // model -> Nullable, + // color -> Nullable, + // size -> Nullable, + // material -> Nullable, + // gender -> Nullable, + // // Advanced inventory control + // warehouse_location -> Nullable, + // batch_number -> Nullable, + // expiration_date -> Nullable, + // manufacture_date -> Nullable, + // min_stock -> Nullable, + // max_stock -> Nullable, + // reorder_point -> Nullable, + // // Detailed pricing + // sale_price -> Nullable, + // sale_start -> Nullable, + // sale_end -> Nullable, + // shipping_cost -> Nullable, + // profit_margin -> Nullable, // Payment gateway integration - external_id -> Nullable, - external_category_id -> Nullable, - external_metadata -> Nullable, - // SEO and search - slug -> Nullable, - meta_title -> Nullable, - meta_description -> Nullable, - tags -> Nullable>>, + // external_id -> Nullable, + // external_category_id -> Nullable, + // external_metadata -> Nullable, + // // SEO and search + // slug -> Nullable, + // meta_title -> Nullable, + // meta_description -> Nullable, + // tags -> Nullable>>, } } diff --git a/src/main.rs b/src/main.rs index 3656ccc29..88de05352 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,7 +67,7 @@ pub mod directory; #[cfg(feature = "drive")] pub mod drive; -#[cfg(feature = "email")] +#[cfg(feature = "mail")] pub mod email; #[cfg(feature = "instagram")] @@ -427,7 +427,7 @@ async fn run_axum_server( api_router = api_router.merge(crate::meet::configure()); } - #[cfg(feature = "email")] + #[cfg(feature = "mail")] { api_router = api_router.merge(crate::email::configure()); } @@ -503,7 +503,7 @@ api_router = api_router.merge(crate::video::configure_video_routes()); api_router = api_router.merge(crate::social::configure_social_routes()); api_router = api_router.merge(crate::social::ui::configure_social_ui_routes()); api_router = api_router.merge(crate::learn::ui::configure_learn_ui_routes()); -#[cfg(feature = "email")] +#[cfg(feature = "mail")] { api_router = api_router.merge(crate::email::ui::configure_email_ui_routes()); } diff --git a/src/products/api.rs b/src/products/api.rs index 31ec04322..71f4c6ba7 100644 --- a/src/products/api.rs +++ b/src/products/api.rs @@ -48,59 +48,59 @@ pub struct Product { pub barcode: Option, pub created_at: DateTime, pub updated_at: DateTime, - // Tax and fiscal identification - pub tax_code: Option, - pub tax_class: Option, - pub fiscal_code: Option, - pub origin_code: Option, - pub global_trade_number: Option, - pub tax_unit_code: Option, - // Detailed dimensions (shipping) - pub net_weight: Option, - pub gross_weight: Option, - pub width: Option, - pub height: Option, - pub length: Option, - pub package_count: Option, - // Tax rates by type - pub sales_tax_code: Option, - pub sales_tax_rate: Option, - pub excise_tax_code: Option, - pub excise_tax_rate: Option, - pub vat_code: Option, - pub vat_rate: Option, - pub service_tax_code: Option, - pub service_tax_rate: Option, - // Marketplace and e-commerce - pub brand: Option, - pub model: Option, - pub color: Option, - pub size: Option, - pub material: Option, - pub gender: Option, - // Advanced inventory control - pub warehouse_location: Option, - pub batch_number: Option, - pub expiration_date: Option, - pub manufacture_date: Option, - pub min_stock: Option, - pub max_stock: Option, - pub reorder_point: Option, - // Detailed pricing - pub sale_price: Option, - pub sale_start: Option>, - pub sale_end: Option>, - pub shipping_cost: Option, - pub profit_margin: Option, + // // Tax and fiscal identification + // pub tax_code: Option, + // pub tax_class: Option, + // pub fiscal_code: Option, + // pub origin_code: Option, + // pub global_trade_number: Option, + // pub tax_unit_code: Option, + // // Detailed dimensions (shipping) + // pub net_weight: Option, + // pub gross_weight: Option, + // pub width: Option, + // pub height: Option, + // pub length: Option, + // pub package_count: Option, + // // Tax rates by type + // pub sales_tax_code: Option, + // pub sales_tax_rate: Option, + // pub excise_tax_code: Option, + // pub excise_tax_rate: Option, + // pub vat_code: Option, + // pub vat_rate: Option, + // pub service_tax_code: Option, + // pub service_tax_rate: Option, + // // Marketplace and e-commerce + // pub brand: Option, + // pub model: Option, + // pub color: Option, + // pub size: Option, + // pub material: Option, + // pub gender: Option, + // // Advanced inventory control + // pub warehouse_location: Option, + // pub batch_number: Option, + // pub expiration_date: Option, + // pub manufacture_date: Option, + // pub min_stock: Option, + // pub max_stock: Option, + // pub reorder_point: Option, + // // Detailed pricing + // pub sale_price: Option, + // pub sale_start: Option>, + // pub sale_end: Option>, + // pub shipping_cost: Option, + // pub profit_margin: Option, // Payment gateway integration - pub external_id: Option, - pub external_category_id: Option, - pub external_metadata: Option, - // SEO and search - pub slug: Option, - pub meta_title: Option, - pub meta_description: Option, - pub tags: Option>>, + // pub external_id: Option, + // pub external_category_id: Option, + // pub external_metadata: Option, + // // SEO and search + // pub slug: Option, + // pub meta_title: Option, + // pub meta_description: Option, + // pub tags: Option>>, } #[derive(Debug, Clone, Serialize, Deserialize, Queryable, Insertable, AsChangeset)] diff --git a/src/vector-db/vectordb_indexer.rs b/src/vector-db/vectordb_indexer.rs index b3377b45b..b3cd2956d 100644 --- a/src/vector-db/vectordb_indexer.rs +++ b/src/vector-db/vectordb_indexer.rs @@ -12,9 +12,9 @@ use uuid::Uuid; use crate::drive::vectordb::UserDriveVectorDB; #[cfg(feature = "vectordb")] use crate::drive::vectordb::{FileContentExtractor, FileDocument}; -#[cfg(all(feature = "vectordb", feature = "email"))] +#[cfg(all(feature = "vectordb", feature = "mail"))] use crate::email::vectordb::UserEmailVectorDB; -#[cfg(all(feature = "vectordb", feature = "email"))] +#[cfg(all(feature = "vectordb", feature = "mail"))] use crate::email::vectordb::{EmailDocument, EmailEmbeddingGenerator}; use crate::shared::utils::DbPool; @@ -71,7 +71,7 @@ struct UserIndexingJob { user_id: Uuid, bot_id: Uuid, workspace: UserWorkspace, - #[cfg(all(feature = "vectordb", feature = "email"))] + #[cfg(all(feature = "vectordb", feature = "mail"))] email_db: Option, #[cfg(feature = "vectordb")] drive_db: Option,