Files
stack/apps/api/src/activity/interfaces/activity.interface.ts
Jason Woltje c221b63d14
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix: Resolve CI typecheck failures and improve type safety
Fixes CI pipeline failures caused by missing Prisma Client generation and TypeScript type safety issues. Added Prisma generation step to CI pipeline, installed missing type dependencies, and resolved 40+ exactOptionalPropertyTypes violations across service layer.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 20:39:03 -06:00

58 lines
1.1 KiB
TypeScript

import type { ActivityAction, EntityType, Prisma } from "@prisma/client";
/**
* Interface for creating a new activity log entry
*/
export interface CreateActivityLogInput {
workspaceId: string;
userId: string;
action: ActivityAction;
entityType: EntityType;
entityId: string;
details?: Prisma.JsonValue;
ipAddress?: string | undefined;
userAgent?: string | undefined;
}
/**
* Interface for activity log query filters
*/
export interface ActivityLogFilters {
workspaceId: string;
userId?: string;
action?: ActivityAction;
entityType?: EntityType;
entityId?: string;
startDate?: Date;
endDate?: Date;
}
/**
* Type for activity log result with user info
* Uses Prisma's generated type for type safety
*/
export type ActivityLogResult = Prisma.ActivityLogGetPayload<{
include: {
user: {
select: {
id: true;
name: true;
email: true;
};
};
};
}>;
/**
* Interface for paginated activity log results
*/
export interface PaginatedActivityLogs {
data: ActivityLogResult[];
meta: {
total: number;
page: number;
limit: number;
totalPages: number;
};
}