refactor
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
* Returns metrics formatted for display to sponsors and admins.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { Logger } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import type { IPageViewRepository } from '../../domain/repositories/IPageViewRepository';
|
||||
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
|
||||
import type { IAnalyticsSnapshotRepository } from '../../domain/repositories/IAnalyticsSnapshotRepository';
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Records an engagement event when a visitor interacts with an entity.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import { EngagementEvent, type EngagementAction, type EngagementEntityType } from '../../domain/entities/EngagementEvent';
|
||||
import type { IEngagementRepository } from '../../domain/repositories/IEngagementRepository';
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Records a page view event when a visitor accesses an entity page.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import { PageView } from '../../domain/entities/PageView';
|
||||
import type { EntityType, VisitorType } from '../../domain/types/PageView';
|
||||
import type { IPageViewRepository } from '../../domain/repositories/IPageViewRepository';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Pre-calculated metrics for sponsor dashboard and entity analytics.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type {
|
||||
AnalyticsSnapshotProps,
|
||||
AnalyticsMetrics,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Tracks clicks, downloads, sign-ups, and other engagement actions.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type {
|
||||
EngagementAction,
|
||||
EngagementEntityType,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Captures visitor interactions with leagues, drivers, teams, races.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { EntityType, VisitorType, PageViewProps } from '../types/PageView';
|
||||
|
||||
export type { EntityType, VisitorType } from '../types/PageView';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface AnalyticsEntityIdProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface AnalyticsSessionIdProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface PageViewIdProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "@gridpilot/analytics",
|
||||
"version": "0.1.0",
|
||||
"main": "./index.ts",
|
||||
"types": "./index.ts",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./domain/*": "./domain/*",
|
||||
"./application/*": "./application/*",
|
||||
"./infrastructure/*": "./infrastructure/*"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"declarationMap": false
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { LogLevel } from './LoggerLogLevel';
|
||||
import type { LogContext } from './LoggerContext';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
|
||||
/**
|
||||
* LoggerPort - Port interface for application-layer logging.
|
||||
|
||||
@@ -2,7 +2,7 @@ import { OverlaySyncPort, OverlayAction, ActionAck } from '../ports/OverlaySyncP
|
||||
import { AutomationEventPublisherPort, AutomationEvent } from '../ports/AutomationEventPublisherPort';
|
||||
import { AutomationLifecycleEmitterPort, LifecycleCallback } from '../ports/AutomationLifecycleEmitterPort';
|
||||
import { LoggerPort } from '../ports/LoggerPort';
|
||||
import type { IAsyncApplicationService } from '@gridpilot/shared/application';
|
||||
import type { IAsyncApplicationService } from '@core/shared/application';
|
||||
|
||||
type ConstructorArgs = {
|
||||
lifecycleEmitter: AutomationLifecycleEmitterPort
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Result } from '../../../shared/result/Result';
|
||||
import type { AuthenticationServicePort } from '../ports/AuthenticationServicePort';
|
||||
import type { Logger } from '@gridpilot/shared/application/Logger';
|
||||
import type { Logger } from '@core/shared/application/Logger';
|
||||
|
||||
/**
|
||||
* Use case for initiating the manual login flow.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '../../../shared/src/logging/Logger';
|
||||
import { AutomationSession } from '../../domain/entities/AutomationSession';
|
||||
import type { HostedSessionConfig } from '../../domain/types/HostedSessionConfig';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from 'crypto';
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import { StepId } from '../value-objects/StepId';
|
||||
import { SessionState } from '../value-objects/SessionState';
|
||||
import type { HostedSessionConfig } from '../types/HostedSessionConfig';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDomainError } from '@gridpilot/shared/errors';
|
||||
import type { IDomainError } from '@core/shared/errors';
|
||||
|
||||
/**
|
||||
* Domain Error: AutomationDomainError
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDomainValidationService } from '@gridpilot/shared/domain';
|
||||
import type { IDomainValidationService } from '@core/shared/domain';
|
||||
import { Result } from '../../../shared/result/Result';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { StepId } from '../value-objects/StepId';
|
||||
import { SessionState } from '../value-objects/SessionState';
|
||||
import type { IDomainValidationService } from '@gridpilot/shared/domain';
|
||||
import type { IDomainValidationService } from '@core/shared/domain';
|
||||
import { Result } from '../../../shared/result/Result';
|
||||
|
||||
export interface ValidationResult {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AuthenticationState } from './AuthenticationState';
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface BrowserAuthenticationStateProps {
|
||||
cookiesValid: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface CheckoutPriceProps {
|
||||
amountUsd: number;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents the lifetime of an authentication session with expiry tracking.
|
||||
* Handles validation of session expiry dates with a configurable buffer window.
|
||||
*/
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface SessionLifetimeProps {
|
||||
expiry: Date | null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export type SessionStateValue =
|
||||
| 'PENDING'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface StepIdProps {
|
||||
value: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AutomationEvent } from '@gridpilot/automation/application/ports/AutomationEventPublisherPort';
|
||||
import { AutomationEvent } from '@core/automation/application/ports/AutomationEventPublisherPort';
|
||||
|
||||
export type LifecycleCallback = (event: AutomationEvent) => Promise<void> | void;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Page } from 'playwright';
|
||||
import { LoggerPort } from '@gridpilot/automation/application/ports/LoggerPort';
|
||||
import { LoggerPort } from '@core/automation/application/ports/LoggerPort';
|
||||
|
||||
export class AuthenticationGuard {
|
||||
constructor(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Page } from 'playwright';
|
||||
import type { LoggerPort } from '@gridpilot/automation/application/ports/LoggerPort';
|
||||
import type { LoggerPort } from '@core/automation/application/ports/LoggerPort';
|
||||
import type { IPlaywrightAuthFlow } from './PlaywrightAuthFlow';
|
||||
import { IRACING_URLS, IRACING_SELECTORS, IRACING_TIMEOUTS } from '../dom/IRacingSelectors';
|
||||
import { AuthenticationGuard } from './AuthenticationGuard';
|
||||
|
||||
@@ -23,7 +23,7 @@ import { PlaywrightBrowserSession } from './PlaywrightBrowserSession';
|
||||
import { getFixtureForStep } from '../engine/FixtureServer';
|
||||
import { BrowserModeConfigLoader, BrowserMode } from '../../../config/BrowserModeConfig';
|
||||
import { getAutomationMode } from '../../../config/AutomationConfig';
|
||||
import { PageStateValidator, PageStateValidation, PageStateValidationResult } from '@gridpilot/automation/domain/services/PageStateValidator';
|
||||
import { PageStateValidator, PageStateValidation, PageStateValidationResult } from '@core/automation/domain/services/PageStateValidator';
|
||||
import { IRacingDomNavigator } from '../dom/IRacingDomNavigator';
|
||||
import { SafeClickService } from '../dom/SafeClickService';
|
||||
import { IRacingDomInteractor } from '../dom/IRacingDomInteractor';
|
||||
|
||||
@@ -4,7 +4,7 @@ import StealthPlugin from 'puppeteer-extra-plugin-stealth';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
import type { LoggerPort } from '@gridpilot/automation/application/ports/LoggerPort';
|
||||
import type { LoggerPort } from '@core/automation/application/ports/LoggerPort';
|
||||
import { BrowserModeConfigLoader, BrowserMode } from '../../../config/BrowserModeConfig';
|
||||
import { getAutomationMode } from '../../../config/AutomationConfig';
|
||||
import type { PlaywrightConfig } from './PlaywrightAutomationAdapter';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Page } from 'playwright';
|
||||
import type { LoggerPort } from '@gridpilot/automation/application/ports/LoggerPort';
|
||||
import type { LoggerPort } from '@core/automation/application/ports/LoggerPort';
|
||||
import { IRACING_SELECTORS, BLOCKED_KEYWORDS } from './IRacingSelectors';
|
||||
import type { PlaywrightConfig } from '../core/PlaywrightAutomationAdapter';
|
||||
import { PlaywrightBrowserSession } from '../core/PlaywrightBrowserSession';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { LoggerPort } from '../../../application/ports/LoggerPort';
|
||||
import type { LogContext } from '../../../application/ports/LoggerContext';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
|
||||
export class NoOpLogAdapter implements LoggerPort, Logger {
|
||||
debug(_message: string, _context?: LogContext): void {}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { LoggerPort } from '@gridpilot/automation/application/ports/LoggerPort';
|
||||
import type { LogContext } from '@gridpilot/automation/application/ports/LoggerContext';
|
||||
import type { LogLevel } from '@gridpilot/automation/application/ports/LoggerLogLevel';
|
||||
import type { LoggerPort } from '@core/automation/application/ports/LoggerPort';
|
||||
import type { LogContext } from '@core/automation/application/ports/LoggerContext';
|
||||
import type { LogLevel } from '@core/automation/application/ports/LoggerLogLevel';
|
||||
import { loadLoggingConfig, type LoggingEnvironmentConfig } from '../../config/LoggingConfig';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
|
||||
const LOG_LEVEL_PRIORITY: Record<LogLevel, number> = {
|
||||
debug: 10,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "@gridpilot/automation",
|
||||
"version": "0.1.0",
|
||||
"main": "./index.ts",
|
||||
"types": "./index.ts",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./domain/*": "./domain/*",
|
||||
"./application/*": "./application/*",
|
||||
"./infrastructure/adapters/automation": "./infrastructure/adapters/automation/index.ts",
|
||||
"./infrastructure/config": "./infrastructure/config/index.ts",
|
||||
"./infrastructure/*": "./infrastructure/*"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "..",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"declarationMap": false
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* Achievements are categorized by role (driver, steward, admin) and type.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
|
||||
export type AchievementCategory = 'driver' | 'steward' | 'admin' | 'community';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents an achievement earned by a specific user.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
|
||||
export interface UserAchievementProps {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDomainService } from '@gridpilot/shared/domain';
|
||||
import type { IDomainService } from '@core/shared/domain';
|
||||
import type { IUserRatingRepository } from '../repositories/IUserRatingRepository';
|
||||
import { UserRating } from '../value-objects/UserRating';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { EmailValidationResult } from '../types/EmailAddress';
|
||||
import { validateEmail, isDisposableEmail } from '../types/EmailAddress';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import bcrypt from 'bcrypt';
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface PasswordHashProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface UserIdProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
/**
|
||||
* Value Object: UserRating
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "@gridpilot/identity",
|
||||
"version": "0.1.0",
|
||||
"main": "./index.ts",
|
||||
"types": "./index.ts",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./domain/*": "./domain/*",
|
||||
"./application/*": "./application/*",
|
||||
"./infrastructure/*": "./infrastructure/*"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^3.25.76"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"declarationMap": false
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UseCase, Logger } from '@gridpilot/shared/application';
|
||||
import type { UseCase, Logger } from '@core/shared/application';
|
||||
import type { IAvatarGenerationRepository } from '../../domain/repositories/IAvatarGenerationRepository';
|
||||
import type { FaceValidationPort } from '../ports/FaceValidationPort';
|
||||
import type { AvatarGenerationPort } from '../ports/AvatarGenerationPort';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Allows a user to select one of the generated avatars as their profile avatar.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase, Logger } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase, Logger } from '@core/shared/application';
|
||||
import type { IAvatarGenerationRepository } from '../../domain/repositories/IAvatarGenerationRepository';
|
||||
|
||||
export interface SelectAvatarCommand {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents a request to generate a racing avatar from a face photo.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type {
|
||||
AvatarGenerationRequestProps,
|
||||
AvatarGenerationStatus,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
|
||||
/**
|
||||
* Value Object: MediaUrl
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"name": "@gridpilot/media",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"main": "./index.ts",
|
||||
"types": "./index.ts",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./application/*": "./application/*"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"declarationMap": false
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
* Retrieves unread notifications for a recipient.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '../../../shared/src/logging/Logger';
|
||||
import type { Notification } from '../../domain/entities/Notification';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Marks a notification as read.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
import { NotificationDomainError } from '../../domain/errors/NotificationDomainError';
|
||||
import type { Logger } from '../../../shared/src/logging/Logger';
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Manages user notification preferences.
|
||||
*/
|
||||
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { Logger } from '@gridpilot/shared/logging/Logger';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import { NotificationPreference } from '../../domain/entities/NotificationPreference';
|
||||
import type { ChannelPreference, TypePreference } from '../../domain/entities/NotificationPreference';
|
||||
import type { INotificationPreferenceRepository } from '../../domain/repositories/INotificationPreferenceRepository';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import type { AsyncUseCase } from '@gridpilot/shared/application';
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { Logger } from '../../../shared/src/logging/Logger';
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import type { NotificationData } from '../../domain/entities/Notification';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Immutable entity with factory methods and domain validation.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import { NotificationDomainError } from '../errors/NotificationDomainError';
|
||||
import { NotificationId } from '../value-objects/NotificationId';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents a user's notification preferences for different channels and types.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { NotificationType, NotificationChannel } from '../types/NotificationTypes';
|
||||
import { NotificationDomainError } from '../errors/NotificationDomainError';
|
||||
import { QuietHours } from '../value-objects/QuietHours';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IDomainError, CommonDomainErrorKind } from '@gridpilot/shared/errors';
|
||||
import type { IDomainError, CommonDomainErrorKind } from '@core/shared/errors';
|
||||
|
||||
/**
|
||||
* Domain Error: NotificationDomainError
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import { NotificationDomainError } from '../errors/NotificationDomainError';
|
||||
|
||||
export interface NotificationIdProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import { NotificationDomainError } from '../errors/NotificationDomainError';
|
||||
|
||||
export interface QuietHoursProps {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "@gridpilot/notifications",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./domain/*": "./domain/*",
|
||||
"./application": "./application/index.ts",
|
||||
"./application/*": "./application/*",
|
||||
"./infrastructure": "./infrastructure/index.ts",
|
||||
"./infrastructure/*": "./infrastructure/*"
|
||||
},
|
||||
"dependencies": {
|
||||
"uuid": "^11.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^10.0.0"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IAwardPrizePresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PrizeDto } from './IGetPrizesPresenter';
|
||||
|
||||
export interface AwardPrizeResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: ICreatePaymentPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PaymentDto } from './IGetPaymentsPresenter';
|
||||
|
||||
export interface CreatePaymentResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: ICreatePrizePresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PrizeDto } from './IGetPrizesPresenter';
|
||||
|
||||
export interface CreatePrizeResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IDeletePrizePresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface DeletePrizeResultDTO {
|
||||
success: boolean;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IGetMembershipFeesPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { MembershipFeeType } from '../../domain/entities/MembershipFee';
|
||||
import type { MemberPaymentStatus } from '../../domain/entities/MemberPayment';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IGetPaymentsPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PaymentType, PayerType, PaymentStatus } from '../../domain/entities/Payment';
|
||||
|
||||
export interface PaymentDto {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IGetPrizesPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PrizeType } from '../../domain/entities/Prize';
|
||||
|
||||
export interface PrizeDto {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IGetWalletPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { TransactionType, ReferenceType } from '../../domain/entities/Wallet';
|
||||
|
||||
export interface WalletDto {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IProcessWalletTransactionPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { WalletDto, TransactionDto } from './IGetWalletPresenter';
|
||||
|
||||
export interface ProcessWalletTransactionResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IUpdateMemberPaymentPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { MemberPaymentDto } from './IGetMembershipFeesPresenter';
|
||||
|
||||
export interface UpdateMemberPaymentResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IUpdatePaymentStatusPresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { PaymentDto } from './IGetPaymentsPresenter';
|
||||
|
||||
export interface UpdatePaymentStatusResultDTO {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Presenter Interface: IUpsertMembershipFeePresenter
|
||||
*/
|
||||
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { MembershipFeeDto } from './IGetMembershipFeesPresenter';
|
||||
|
||||
export interface UpsertMembershipFeeResultDTO {
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
AwardPrizeResultDTO,
|
||||
AwardPrizeViewModel,
|
||||
} from '../presenters/IAwardPrizePresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface AwardPrizeInput {
|
||||
prizeId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
CreatePaymentResultDTO,
|
||||
CreatePaymentViewModel,
|
||||
} from '../presenters/ICreatePaymentPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
const PLATFORM_FEE_RATE = 0.10;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
CreatePrizeResultDTO,
|
||||
CreatePrizeViewModel,
|
||||
} from '../presenters/ICreatePrizePresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface CreatePrizeInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
DeletePrizeResultDTO,
|
||||
DeletePrizeViewModel,
|
||||
} from '../presenters/IDeletePrizePresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface DeletePrizeInput {
|
||||
prizeId: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
GetMembershipFeesResultDTO,
|
||||
GetMembershipFeesViewModel,
|
||||
} from '../presenters/IGetMembershipFeesPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface GetMembershipFeesInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
GetPaymentsResultDTO,
|
||||
GetPaymentsViewModel,
|
||||
} from '../presenters/IGetPaymentsPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface GetPaymentsInput {
|
||||
leagueId?: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
GetPrizesResultDTO,
|
||||
GetPrizesViewModel,
|
||||
} from '../presenters/IGetPrizesPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface GetPrizesInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
GetWalletResultDTO,
|
||||
GetWalletViewModel,
|
||||
} from '../presenters/IGetWalletPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface GetWalletInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
ProcessWalletTransactionResultDTO,
|
||||
ProcessWalletTransactionViewModel,
|
||||
} from '../presenters/IProcessWalletTransactionPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface ProcessWalletTransactionInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
UpdateMemberPaymentResultDTO,
|
||||
UpdateMemberPaymentViewModel,
|
||||
} from '../presenters/IUpdateMemberPaymentPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
const PLATFORM_FEE_RATE = 0.10;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
UpdatePaymentStatusResultDTO,
|
||||
UpdatePaymentStatusViewModel,
|
||||
} from '../presenters/IUpdatePaymentStatusPresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface UpdatePaymentStatusInput {
|
||||
paymentId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
UpsertMembershipFeeResultDTO,
|
||||
UpsertMembershipFeeViewModel,
|
||||
} from '../presenters/IUpsertMembershipFeePresenter';
|
||||
import type { UseCase } from '@gridpilot/shared/application/UseCase';
|
||||
import type { UseCase } from '@core/shared/application/UseCase';
|
||||
|
||||
export interface UpsertMembershipFeeInput {
|
||||
leagueId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ParticipantRef } from '@gridpilot/racing/domain/types/ParticipantRef';
|
||||
import type { ParticipantRef } from '@core/racing/domain/types/ParticipantRef';
|
||||
|
||||
export interface ChampionshipStandingsRowDTO {
|
||||
participant: ParticipantRef;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IApplicationError, CommonApplicationErrorKind } from '@gridpilot/shared/errors';
|
||||
import type { IApplicationError, CommonApplicationErrorKind } from '@core/shared/errors';
|
||||
|
||||
export abstract class RacingApplicationError
|
||||
extends Error
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Season } from '../../domain/entities/Season';
|
||||
import type { LeagueScoringConfig } from '../../domain/entities/LeagueScoringConfig';
|
||||
import type { Game } from '../../domain/entities/Game';
|
||||
import type { LeagueScoringPresetDTO } from '../ports/LeagueScoringPresetProvider';
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export interface LeagueSummaryViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { League } from '../../domain/entities/League';
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export interface LeagueWithCapacityViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export type AllRacesStatus = 'scheduled' | 'running' | 'completed' | 'cancelled' | 'all';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export interface TeamListItemViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface ApproveLeagueJoinRequestViewModel {
|
||||
success: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface SponsorDto {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export interface DashboardDriverSummaryViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Team } from '../../domain/entities/Team';
|
||||
import type { TeamMembership } from '../../domain/types/TeamMembership';
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export interface DriverTeamViewModel {
|
||||
team: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Driver } from '../../domain/entities/Driver';
|
||||
import type { SkillLevel } from '../../domain/services/SkillLevelService';
|
||||
import type { Presenter } from '@gridpilot/shared/presentation';
|
||||
import type { Presenter } from '@core/shared/presentation';
|
||||
|
||||
export type { SkillLevel };
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
import type { GetEntitySponsorshipPricingResultDTO } from '../use-cases/GetEntitySponsorshipPricingUseCase';
|
||||
|
||||
export interface IEntitySponsorshipPricingPresenter extends Presenter<GetEntitySponsorshipPricingResultDTO | null, GetEntitySponsorshipPricingResultDTO | null> {}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface RaceViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface GetLeagueAdminPermissionsViewModel {
|
||||
canRemoveMember: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface LeagueAdminViewModel {
|
||||
leagueId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface LeagueJoinRequestViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { Presenter } from '@core/shared/presentation/Presenter';
|
||||
|
||||
export interface LeagueMembershipsViewModel {
|
||||
members: {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user