Adds tenants/memberships/consent_records tables, a CASL AbilityFactory keyed on membership role, and a TenantGuard that derives tenant_id from session only (never client-supplied), per blueprint 8.2/8.3/11.3. Adds outbox_events + audit_log tables, an OutboxService for transactional writes, and a Cron-based OutboxDispatcher that publishes pending events to a BullMQ queue, per blueprint 9.1 (events before intelligence).
11 lines
398 B
TypeScript
11 lines
398 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { BullModule } from '@nestjs/bullmq';
|
|
import { OutboxService } from './outbox.service';
|
|
import { OutboxDispatcher, OUTBOX_QUEUE_NAME } from './outbox.dispatcher';
|
|
|
|
@Module({
|
|
imports: [BullModule.registerQueue({ name: OUTBOX_QUEUE_NAME })],
|
|
providers: [OutboxService, OutboxDispatcher],
|
|
exports: [OutboxService],
|
|
})
|
|
export class EventsModule {}
|