gitdataai/libs/api/workspace/mod.rs
ZhenYi 14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00

77 lines
2.4 KiB
Rust

pub mod billing;
pub mod info;
pub mod init;
pub mod members;
pub mod projects;
pub mod settings;
pub mod stats;
use actix_web::web;
pub fn init_workspace_routes(cfg: &mut web::ServiceConfig) {
cfg.service(
web::scope("/workspaces")
.route("", web::post().to(init::workspace_create))
.route("/me", web::get().to(info::workspace_list))
.route("/{slug}", web::get().to(info::workspace_info))
.route(
"/{slug}/billing",
web::get().to(billing::workspace_billing_current),
)
.route(
"/{slug}/billing/history",
web::get().to(billing::workspace_billing_history),
)
.route(
"/{slug}/billing/credits",
web::post().to(billing::workspace_billing_add_credit),
)
.route(
"/{slug}/projects",
web::get().to(projects::workspace_projects),
)
.route("/{slug}/stats", web::get().to(stats::workspace_stats))
.route("/{slug}", web::patch().to(settings::workspace_update))
.route("/{slug}", web::delete().to(settings::workspace_delete))
.route("/{slug}/members", web::get().to(members::workspace_members))
.route(
"/{slug}/members/{user_id}",
web::delete().to(members::workspace_remove_member),
)
.route(
"/{slug}/members/role",
web::patch().to(members::workspace_update_member_role),
)
.route(
"/me/invitations",
web::get().to(members::workspace_my_invitations),
)
.route(
"/invitations/accept",
web::post().to(members::workspace_accept_invitation),
)
.route(
"/invitations/accept-by-slug",
web::post().to(members::workspace_accept_invitation_by_slug),
)
.route(
"/{slug}/invitations",
web::post().to(members::workspace_invite_member),
)
.route(
"/{slug}/invitations",
web::get().to(members::workspace_pending_invitations),
)
.route(
"/{slug}/invitations/{user_id}",
web::delete().to(members::workspace_cancel_invitation),
),
);
}