feat: add domains, ideas, layouts, widgets API modules

- Add DomainsModule with full CRUD, search, and activity logging
- Add IdeasModule with quick capture endpoint
- Add LayoutsModule for user dashboard layouts
- Add WidgetsModule for widget definitions (read-only)
- Update ActivityService with domain/idea logging methods
- Register all new modules in AppModule
This commit is contained in:
Jason Woltje
2026-01-29 13:47:03 -06:00
parent 973502f26e
commit f47dd8bc92
66 changed files with 4277 additions and 29 deletions

View File

@@ -23,7 +23,7 @@ export class UpdateEventDto {
@IsOptional()
@IsString({ message: "description must be a string" })
@MaxLength(10000, { message: "description must not exceed 10000 characters" })
description?: string | null;
description?: string;
@IsOptional()
@IsDateString({}, { message: "startTime must be a valid ISO 8601 date string" })
@@ -31,7 +31,7 @@ export class UpdateEventDto {
@IsOptional()
@IsDateString({}, { message: "endTime must be a valid ISO 8601 date string" })
endTime?: Date | null;
endTime?: Date;
@IsOptional()
@IsBoolean({ message: "allDay must be a boolean" })
@@ -40,15 +40,15 @@ export class UpdateEventDto {
@IsOptional()
@IsString({ message: "location must be a string" })
@MaxLength(500, { message: "location must not exceed 500 characters" })
location?: string | null;
location?: string;
@IsOptional()
@IsObject({ message: "recurrence must be an object" })
recurrence?: Record<string, unknown> | null;
recurrence?: Record<string, unknown>;
@IsOptional()
@IsUUID("4", { message: "projectId must be a valid UUID" })
projectId?: string | null;
projectId?: string;
@IsOptional()
@IsObject({ message: "metadata must be an object" })

View File

@@ -1,4 +1,5 @@
import { Injectable, NotFoundException } from "@nestjs/common";
import { Prisma } from "@prisma/client";
import { PrismaService } from "../prisma/prisma.service";
import { ActivityService } from "../activity/activity.service";
import type { CreateEventDto, UpdateEventDto, QueryEventsDto } from "./dto";
@@ -157,7 +158,7 @@ export class EventsService {
id,
workspaceId,
},
data: updateEventDto,
data: updateEventDto as any,
include: {
creator: {
select: { id: true, name: true, email: true },
@@ -170,7 +171,7 @@ export class EventsService {
// Log activity
await this.activityService.logEventUpdated(workspaceId, userId, id, {
changes: updateEventDto,
changes: updateEventDto as Prisma.JsonValue,
});
return event;