fix issues in core

This commit is contained in:
2025-12-23 11:25:08 +01:00
parent 1efd971032
commit 2854ae3c5c
113 changed files with 1142 additions and 458 deletions

View File

@@ -1,9 +1,9 @@
import type { Logger, UseCaseOutputPort, UseCase } from '@core/shared/application';
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
import { EngagementEvent } from '../../domain/entities/EngagementEvent';
import type { EngagementAction, EngagementEntityType } from '../../domain/types/EngagementEvent';
import type { Logger, UseCase, UseCaseOutputPort } from '@core/shared/application';
import { Result } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
import { EngagementEvent } from '../../domain/entities/EngagementEvent';
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
import type { EngagementAction, EngagementEntityType } from '../../domain/types/EngagementEvent';
export interface RecordEngagementInput {
action: EngagementAction;
@@ -36,10 +36,10 @@ export class RecordEngagementUseCase implements UseCase<RecordEngagementInput, v
action: input.action,
entityType: input.entityType,
entityId: input.entityId,
actorId: input.actorId,
actorType: input.actorType,
sessionId: input.sessionId,
metadata: input.metadata,
...(input.actorId !== undefined && { actorId: input.actorId }),
...(input.metadata !== undefined && { metadata: input.metadata }),
});
await this.engagementRepository.save(engagementEvent);