website refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { PageView } from '../../domain/entities/PageView';
|
||||
import { EntityType } from '../../domain/types/PageView';
|
||||
|
||||
export interface IPageViewRepository {
|
||||
export interface PageViewRepository {
|
||||
save(pageView: PageView): Promise<void>;
|
||||
findById(id: string): Promise<PageView | null>;
|
||||
findByEntityId(entityType: EntityType, entityId: string): Promise<PageView[]>;
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Logger, UseCase } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type { IPageViewRepository } from '../repositories/IPageViewRepository';
|
||||
import type { PageViewRepository } from '../repositories/PageViewRepository';
|
||||
|
||||
export interface GetAnalyticsMetricsInput {
|
||||
startDate?: Date;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Logger, UseCase } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
|
||||
export interface GetDashboardDataInput {}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, vi, type Mock } from 'vitest';
|
||||
import { GetEntityAnalyticsQuery, type GetEntityAnalyticsInput } from './GetEntityAnalyticsQuery';
|
||||
import type { IPageViewRepository } from '../repositories/IPageViewRepository';
|
||||
import type { IEngagementRepository } from '@core/analytics/domain/repositories/IEngagementRepository';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import type { PageViewRepository } from '../repositories/PageViewRepository';
|
||||
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
|
||||
import type { Logger } from '@core/shared/domain';
|
||||
import type { EntityType } from '../../domain/types/PageView';
|
||||
|
||||
describe('GetEntityAnalyticsQuery', () => {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase , Logger } from '@core/shared/application';
|
||||
import type { IPageViewRepository } from '../repositories/IPageViewRepository';
|
||||
import type { IEngagementRepository } from '@core/analytics/domain/repositories/IEngagementRepository';
|
||||
import type { PageViewRepository } from '../repositories/PageViewRepository';
|
||||
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
|
||||
import type { EntityType } from '../../domain/types/PageView';
|
||||
import type { SnapshotPeriod } from '../../domain/types/AnalyticsSnapshot';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
|
||||
export interface GetEntityAnalyticsInput {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect, vi, type Mock } from 'vitest';
|
||||
import { RecordEngagementUseCase, type RecordEngagementInput } from './RecordEngagementUseCase';
|
||||
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
|
||||
import type { EngagementRepository } from '../../domain/repositories/EngagementRepository';
|
||||
import { EngagementEvent } from '../../domain/entities/EngagementEvent';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import type { EngagementAction, EngagementEntityType } from '../../domain/types/EngagementEvent';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Logger, UseCase } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { EngagementEvent } from '../../domain/entities/EngagementEvent';
|
||||
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
|
||||
import type { EngagementRepository } from '../../domain/repositories/EngagementRepository';
|
||||
import type { EngagementAction, EngagementEntityType } from '../../domain/types/EngagementEvent';
|
||||
|
||||
export interface RecordEngagementInput {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Logger, UseCase } from '@core/shared/application';
|
||||
import type { IPageViewRepository } from '../repositories/IPageViewRepository';
|
||||
import type { PageViewRepository } from '../repositories/PageViewRepository';
|
||||
import { PageView } from '../../domain/entities/PageView';
|
||||
import type { EntityType, VisitorType } from '../../domain/types/PageView';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
|
||||
export interface RecordPageViewInput {
|
||||
|
||||
Reference in New Issue
Block a user