Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
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>
58 lines
1.1 KiB
TypeScript
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;
|
|
};
|
|
}
|