/** * TASK-0133 — the ORG module (the admin console API + the enforcement * surfaces that live outside a feature module). * * Controllers: * OrgAdminController — /orgs/:orgId/admin/* (all requireOrgAdmin) * EmbedPreviewController — /workspaces/:id/embeds/preview (auth #5) * PolicyEffectiveController — /workspaces/:id/policy/effective (member-facing) * * Services (PrismaService/RedisService/AuditService are GLOBAL via CoreModule): * OrgPolicyService — org policy cache + editor (the five enforcement points * read the same free functions it exports) * OrgAuditService — the org-scoped viewer + sync/async CSV export * OrgRetentionService — retention policies + enqueue/poll (the worker owns * the purge core — one implementation) * OrgMembersService — org member list/role/suspend * OrgOverviewService — the overview tab (counts + 30-day trends) * * The TOTP 2FA lives on AuthModule (the login gate + /auth/2fa/* self-service * routes are auth-surface, and AuthService DI-injects TwoFactorService). */ import { Module } from "@nestjs/common"; import { SearchModule } from "../search/search.module.js"; import { OrgAdminController } from "./org-admin.controller.js"; import { EmbedPreviewController } from "./embed-preview.controller.js"; import { PolicyEffectiveController } from "./policy-effective.controller.js"; import { OrgPolicyService } from "./org-policy.service.js"; import { OrgAuditService } from "./audit.service.js"; import { OrgRetentionService } from "./retention.service.js"; import { OrgMembersService } from "./members.service.js"; import { OrgOverviewService } from "./overview.service.js"; import { OrgSearchService } from "./search.service.js"; import { OrgJobsService } from "./jobs.service.js"; import { OrgNotificationsService } from "./notifications.service.js"; import { OrgAnalyticsService } from "./analytics.service.js"; @Module({ imports: [SearchModule], controllers: [OrgAdminController, EmbedPreviewController, PolicyEffectiveController], providers: [OrgPolicyService, OrgAuditService, OrgRetentionService, OrgMembersService, OrgOverviewService, OrgSearchService, OrgJobsService, OrgNotificationsService, OrgAnalyticsService], exports: [OrgPolicyService] }) export class OrgModule {}