Some checks failed
BotServer CI / build (push) Failing after 1m34s
Split 20+ files over 1000 lines into focused subdirectories for better maintainability and code organization. All changes maintain backward compatibility through re-export wrappers. Major splits: - attendance/llm_assist.rs (2074→7 modules) - basic/keywords/face_api.rs → face_api/ (7 modules) - basic/keywords/file_operations.rs → file_ops/ (8 modules) - basic/keywords/hear_talk.rs → hearing/ (6 modules) - channels/wechat.rs → wechat/ (10 modules) - channels/youtube.rs → youtube/ (5 modules) - contacts/mod.rs → contacts_api/ (6 modules) - core/bootstrap/mod.rs → bootstrap/ (5 modules) - core/shared/admin.rs → admin_*.rs (5 modules) - designer/canvas.rs → canvas_api/ (6 modules) - designer/mod.rs → designer_api/ (6 modules) - docs/handlers.rs → handlers_api/ (11 modules) - drive/mod.rs → drive_handlers.rs, drive_types.rs - learn/mod.rs → types.rs - main.rs → main_module/ (7 modules) - meet/webinar.rs → webinar_api/ (8 modules) - paper/mod.rs → (10 modules) - security/auth.rs → auth_api/ (7 modules) - security/passkey.rs → (4 modules) - sources/mod.rs → sources_api/ (5 modules) - tasks/mod.rs → task_api/ (5 modules) Stats: 38,040 deletions, 1,315 additions across 318 files Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
93 lines
5.3 KiB
Rust
93 lines
5.3 KiB
Rust
pub mod collaboration;
|
|
pub mod export;
|
|
pub mod formulas;
|
|
pub mod handlers;
|
|
pub mod storage;
|
|
pub mod types;
|
|
|
|
use crate::core::shared::state::AppState;
|
|
use axum::{
|
|
routing::{get, post},
|
|
Router,
|
|
};
|
|
use std::sync::Arc;
|
|
|
|
pub use collaboration::{
|
|
handle_get_collaborators, handle_get_mentions, handle_get_presence, handle_get_selections,
|
|
handle_get_typing, handle_sheet_websocket,
|
|
};
|
|
pub use handlers::{
|
|
handle_add_comment, handle_add_external_link, handle_add_note, handle_array_formula,
|
|
handle_clear_filter, handle_conditional_format, handle_create_chart, handle_create_named_range,
|
|
handle_data_validation, handle_delete_array_formula, handle_delete_chart, handle_delete_comment,
|
|
handle_delete_named_range, handle_delete_sheet, handle_evaluate_formula, handle_export_sheet,
|
|
handle_filter_data, handle_format_cells, handle_freeze_panes, handle_get_sheet_by_id,
|
|
handle_import_sheet, handle_list_comments, handle_list_external_links, handle_list_named_ranges,
|
|
handle_list_sheets, handle_load_from_drive, handle_load_sheet, handle_lock_cells,
|
|
handle_merge_cells, handle_new_sheet, handle_protect_sheet, handle_refresh_external_link,
|
|
handle_remove_external_link, handle_reply_comment, handle_resolve_comment, handle_save_sheet,
|
|
handle_search_sheets, handle_share_sheet, handle_sheet_ai, handle_sort_range,
|
|
handle_unmerge_cells, handle_unprotect_sheet, handle_update_cell, handle_update_named_range,
|
|
handle_validate_cell,
|
|
};
|
|
pub use types::{
|
|
ArrayFormula, CellComment, CellData, CellStyle, ChartConfig, ChartDataset, ChartOptions,
|
|
ChartPosition, Collaborator, CollabMessage, CommentReply, ConditionalFormatRule, ExternalLink,
|
|
FilterConfig, MergedCell, NamedRange, SaveResponse, SheetProtection, Spreadsheet,
|
|
SpreadsheetMetadata, ValidationRule, Worksheet,
|
|
};
|
|
|
|
pub fn configure_sheet_routes() -> Router<Arc<AppState>> {
|
|
Router::new()
|
|
.route("/api/sheet/list", get(handle_list_sheets))
|
|
.route("/api/sheet/search", get(handle_search_sheets))
|
|
.route("/api/sheet/load", get(handle_load_sheet))
|
|
.route("/api/sheet/load-from-drive", post(handle_load_from_drive))
|
|
.route("/api/sheet/save", post(handle_save_sheet))
|
|
.route("/api/sheet/delete", post(handle_delete_sheet))
|
|
.route("/api/sheet/cell", post(handle_update_cell))
|
|
.route("/api/sheet/format", post(handle_format_cells))
|
|
.route("/api/sheet/formula", post(handle_evaluate_formula))
|
|
.route("/api/sheet/export", post(handle_export_sheet))
|
|
.route("/api/sheet/share", post(handle_share_sheet))
|
|
.route("/api/sheet/new", get(handle_new_sheet))
|
|
.route("/api/sheet/merge", post(handle_merge_cells))
|
|
.route("/api/sheet/unmerge", post(handle_unmerge_cells))
|
|
.route("/api/sheet/freeze", post(handle_freeze_panes))
|
|
.route("/api/sheet/sort", post(handle_sort_range))
|
|
.route("/api/sheet/filter", post(handle_filter_data))
|
|
.route("/api/sheet/filter/clear", post(handle_clear_filter))
|
|
.route("/api/sheet/chart", post(handle_create_chart))
|
|
.route("/api/sheet/chart/delete", post(handle_delete_chart))
|
|
.route("/api/sheet/conditional-format", post(handle_conditional_format))
|
|
.route("/api/sheet/data-validation", post(handle_data_validation))
|
|
.route("/api/sheet/validate-cell", post(handle_validate_cell))
|
|
.route("/api/sheet/note", post(handle_add_note))
|
|
.route("/api/sheet/import", post(handle_import_sheet))
|
|
.route("/api/sheet/ai", post(handle_sheet_ai))
|
|
.route("/api/sheet/:id", get(handle_get_sheet_by_id))
|
|
.route("/api/sheet/:id/collaborators", get(handle_get_collaborators))
|
|
.route("/api/sheet/comment", post(handle_add_comment))
|
|
.route("/api/sheet/comment/reply", post(handle_reply_comment))
|
|
.route("/api/sheet/comment/resolve", post(handle_resolve_comment))
|
|
.route("/api/sheet/comment/delete", post(handle_delete_comment))
|
|
.route("/api/sheet/comments", post(handle_list_comments))
|
|
.route("/api/sheet/protect", post(handle_protect_sheet))
|
|
.route("/api/sheet/unprotect", post(handle_unprotect_sheet))
|
|
.route("/api/sheet/lock-cells", post(handle_lock_cells))
|
|
.route("/api/sheet/external-link", post(handle_add_external_link))
|
|
.route("/api/sheet/external-link/refresh", post(handle_refresh_external_link))
|
|
.route("/api/sheet/external-link/remove", post(handle_remove_external_link))
|
|
.route("/api/sheet/external-links", get(handle_list_external_links))
|
|
.route("/api/sheet/array-formula", post(handle_array_formula))
|
|
.route("/api/sheet/array-formula/delete", post(handle_delete_array_formula))
|
|
.route("/api/sheet/named-range", post(handle_create_named_range))
|
|
.route("/api/sheet/named-range/update", post(handle_update_named_range))
|
|
.route("/api/sheet/named-range/delete", post(handle_delete_named_range))
|
|
.route("/api/sheet/named-ranges", get(handle_list_named_ranges))
|
|
.route("/api/sheet/:sheet_id/presence", get(handle_get_presence))
|
|
.route("/api/sheet/:sheet_id/typing", get(handle_get_typing))
|
|
.route("/api/sheet/:sheet_id/selections", get(handle_get_selections))
|
|
.route("/api/sheet/mentions/:user_id", get(handle_get_mentions))
|
|
.route("/ws/sheet/:sheet_id", get(handle_sheet_websocket))
|
|
}
|