refactor(types): 重构类型系统,统一共享类型定义
feat(types): 新增共享类型中心,包含用户、产品、订单等核心领域类型 fix(types): 修复类型定义错误,统一各模块类型引用 style(types): 优化类型文件格式和注释 docs(types): 更新类型文档和变更日志 test(types): 添加类型测试用例 build(types): 配置类型共享路径 chore(types): 清理重复类型定义文件
This commit is contained in:
@@ -1,46 +1 @@
|
||||
/**
|
||||
* 数据配置
|
||||
*/
|
||||
export interface DataConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
location: string;
|
||||
description?: string;
|
||||
backupPolicy?: string;
|
||||
retentionPolicy?: string;
|
||||
encryptionEnabled?: boolean;
|
||||
compressionEnabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据状态
|
||||
*/
|
||||
export interface DataStatus {
|
||||
status: 'ACTIVE' | 'INACTIVE' | 'RESTORED' | 'ERROR' | 'UNKNOWN';
|
||||
lastUpdated: Date;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据备份
|
||||
*/
|
||||
export interface DataBackup {
|
||||
id: string;
|
||||
dataId: string;
|
||||
name: string;
|
||||
timestamp: Date;
|
||||
size: number;
|
||||
status: 'PENDING' | 'COMPLETED' | 'FAILED';
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据恢复
|
||||
*/
|
||||
export interface DataRestore {
|
||||
id: string;
|
||||
backupId: string;
|
||||
timestamp: Date;
|
||||
status: 'PENDING' | 'COMPLETED' | 'FAILED';
|
||||
message?: string;
|
||||
}
|
||||
export * from '../shared/types/shared/DataSource';
|
||||
|
||||
@@ -1,368 +1 @@
|
||||
/**
|
||||
* 统一状态枚举定义
|
||||
* 集中管理所有服务的状态枚举,确保一致性
|
||||
*/
|
||||
|
||||
// 套利机会状态
|
||||
export enum ArbitrageOpportunityStatus {
|
||||
PENDING = 'PENDING',
|
||||
APPROVED = 'APPROVED',
|
||||
REJECTED = 'REJECTED',
|
||||
EXECUTING = 'EXECUTING',
|
||||
EXECUTED = 'EXECUTED',
|
||||
FAILED = 'FAILED'
|
||||
}
|
||||
|
||||
// 套利执行状态
|
||||
export enum ArbitrageExecutionStatus {
|
||||
STARTED = 'STARTED',
|
||||
PURCHASED = 'PURCHASED',
|
||||
LISTED = 'LISTED',
|
||||
SOLD = 'SOLD',
|
||||
COMPLETED = 'COMPLETED',
|
||||
FAILED = 'FAILED'
|
||||
}
|
||||
|
||||
// 价格比较状态
|
||||
export enum PriceComparisonStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
EXPIRED = 'EXPIRED',
|
||||
EXECUTED = 'EXECUTED'
|
||||
}
|
||||
|
||||
// 风险等级
|
||||
export enum RiskLevel {
|
||||
LOW = 'LOW',
|
||||
MEDIUM = 'MEDIUM',
|
||||
HIGH = 'HIGH',
|
||||
BLOCK = 'BLOCK'
|
||||
}
|
||||
|
||||
// 定价策略
|
||||
export enum PricingStrategy {
|
||||
GAME_THEORY = 'GAME_THEORY',
|
||||
COMPETITION = 'COMPETITION',
|
||||
DEMAND_BASED = 'DEMAND_BASED',
|
||||
COST_PLUS = 'COST_PLUS',
|
||||
DYNAMIC = 'DYNAMIC'
|
||||
}
|
||||
|
||||
// 定价决策状态
|
||||
export enum PricingDecisionStatus {
|
||||
PENDING = 'PENDING',
|
||||
EXECUTED = 'EXECUTED',
|
||||
REJECTED = 'REJECTED',
|
||||
EXPIRED = 'EXPIRED'
|
||||
}
|
||||
|
||||
// 价格调整方向
|
||||
export enum PriceAdjustmentDirection {
|
||||
INCREASE = 'INCREASE',
|
||||
DECREASE = 'DECREASE',
|
||||
MAINTAIN = 'MAINTAIN'
|
||||
}
|
||||
|
||||
// 定价调整频率
|
||||
export enum PriceAdjustFrequency {
|
||||
HOURLY = 'HOURLY',
|
||||
DAILY = 'DAILY',
|
||||
WEEKLY = 'WEEKLY'
|
||||
}
|
||||
|
||||
// A/B测试状态
|
||||
export enum ABTestStatus {
|
||||
PENDING = 'PENDING',
|
||||
RUNNING = 'RUNNING',
|
||||
COMPLETED = 'COMPLETED',
|
||||
STOPPED = 'STOPPED',
|
||||
PAUSED = 'PAUSED'
|
||||
}
|
||||
|
||||
// 竞争对手监控状态
|
||||
export enum CompetitorMonitorStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
ERROR = 'ERROR'
|
||||
}
|
||||
|
||||
// 价格预警状态
|
||||
export enum PriceAlertStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
RESOLVED = 'RESOLVED',
|
||||
IGNORED = 'IGNORED'
|
||||
}
|
||||
|
||||
// 自动执行配置状态
|
||||
export enum AutoExecutionStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
PAUSED = 'PAUSED',
|
||||
DISABLED = 'DISABLED'
|
||||
}
|
||||
|
||||
// 自动化级别
|
||||
export enum AutomationLevel {
|
||||
LEVEL_1 = 'LEVEL_1',
|
||||
LEVEL_2 = 'LEVEL_2',
|
||||
LEVEL_3 = 'LEVEL_3',
|
||||
LEVEL_4 = 'LEVEL_4',
|
||||
LEVEL_5 = 'LEVEL_5'
|
||||
}
|
||||
|
||||
// 自动执行模式
|
||||
export enum ExecutionMode {
|
||||
AUTO = 'AUTO',
|
||||
MANUAL = 'MANUAL'
|
||||
}
|
||||
|
||||
// 店铺状态
|
||||
export enum ShopStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
SYNCING = 'SYNCING',
|
||||
ERROR = 'ERROR'
|
||||
}
|
||||
|
||||
// 租户状态
|
||||
export enum TenantStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
SUSPENDED = 'SUSPENDED'
|
||||
}
|
||||
|
||||
// 用户状态
|
||||
export enum UserStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
LOCKED = 'LOCKED'
|
||||
}
|
||||
|
||||
// 订单状态
|
||||
export enum OrderStatus {
|
||||
PENDING = 'PENDING',
|
||||
PAID = 'PAID',
|
||||
SHIPPED = 'SHIPPED',
|
||||
DELIVERED = 'DELIVERED',
|
||||
CANCELLED = 'CANCELLED',
|
||||
REFUNDED = 'REFUNDED'
|
||||
}
|
||||
|
||||
// 产品状态
|
||||
export enum ProductStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
OUT_OF_STOCK = 'OUT_OF_STOCK',
|
||||
DELETED = 'DELETED'
|
||||
}
|
||||
|
||||
// 广告状态
|
||||
export enum AdStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
PAUSED = 'PAUSED',
|
||||
DELETED = 'DELETED'
|
||||
}
|
||||
|
||||
// 证书状态
|
||||
export enum CertificateStatus {
|
||||
VALID = 'VALID',
|
||||
EXPIRED = 'EXPIRED',
|
||||
PENDING = 'PENDING',
|
||||
REVOKED = 'REVOKED'
|
||||
}
|
||||
|
||||
// 策略状态
|
||||
export enum StrategyStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
PAUSED = 'PAUSED',
|
||||
COMPLETED = 'COMPLETED',
|
||||
FAILED = 'FAILED'
|
||||
}
|
||||
|
||||
// 自动托管会话状态
|
||||
export enum AutopilotSessionStatus {
|
||||
IDLE = 'IDLE',
|
||||
RUNNING = 'RUNNING',
|
||||
PAUSED = 'PAUSED',
|
||||
STOPPED = 'STOPPED',
|
||||
ERROR = 'ERROR'
|
||||
}
|
||||
|
||||
// 自动托管模式
|
||||
export enum AutopilotMode {
|
||||
FULL_AUTO = 'FULL_AUTO',
|
||||
SEMI_AUTO = 'SEMI_AUTO',
|
||||
MANUAL = 'MANUAL'
|
||||
}
|
||||
|
||||
// 日志类型
|
||||
export enum LogType {
|
||||
TASK = 'TASK',
|
||||
DECISION = 'DECISION',
|
||||
ERROR = 'ERROR',
|
||||
WARNING = 'WARNING',
|
||||
INFO = 'INFO'
|
||||
}
|
||||
|
||||
// 任务状态
|
||||
export enum TaskStatus {
|
||||
PENDING = 'PENDING',
|
||||
RUNNING = 'RUNNING',
|
||||
COMPLETED = 'COMPLETED',
|
||||
FAILED = 'FAILED'
|
||||
}
|
||||
|
||||
// 业务类型
|
||||
export enum BusinessType {
|
||||
TOC = 'TOC',
|
||||
TOB = 'TOB'
|
||||
}
|
||||
|
||||
// 排行榜类型
|
||||
export enum LeaderboardType {
|
||||
REVENUE = 'REVENUE',
|
||||
ROI = 'ROI',
|
||||
GROWTH = 'GROWTH'
|
||||
}
|
||||
|
||||
// 排行榜周期
|
||||
export enum LeaderboardPeriod {
|
||||
DAILY = 'DAILY',
|
||||
WEEKLY = 'WEEKLY',
|
||||
MONTHLY = 'MONTHLY',
|
||||
ALL_TIME = 'ALL_TIME'
|
||||
}
|
||||
|
||||
// 商户等级
|
||||
export enum MerchantTier {
|
||||
BRONZE = 'BRONZE',
|
||||
SILVER = 'SILVER',
|
||||
GOLD = 'GOLD',
|
||||
PLATINUM = 'PLATINUM',
|
||||
DIAMOND = 'DIAMOND'
|
||||
}
|
||||
|
||||
// 策略类别
|
||||
export enum StrategyCategory {
|
||||
PRICING = 'PRICING',
|
||||
ADVERTISING = 'ADVERTISING',
|
||||
PRODUCT_SELECTION = 'PRODUCT_SELECTION',
|
||||
INVENTORY = 'INVENTORY',
|
||||
LOGISTICS = 'LOGISTICS',
|
||||
MARKETING = 'MARKETING'
|
||||
}
|
||||
|
||||
// 风险等级
|
||||
export enum StrategyRiskLevel {
|
||||
LOW = 'LOW',
|
||||
MEDIUM = 'MEDIUM',
|
||||
HIGH = 'HIGH'
|
||||
}
|
||||
|
||||
// 计费类型
|
||||
export enum BillingType {
|
||||
FREE = 'FREE',
|
||||
ONE_TIME = 'ONE_TIME',
|
||||
SUBSCRIPTION = 'SUBSCRIPTION',
|
||||
USAGE_BASED = 'USAGE_BASED'
|
||||
}
|
||||
|
||||
// 权限动作
|
||||
export enum PermissionAction {
|
||||
READ = 'READ',
|
||||
WRITE = 'WRITE',
|
||||
DELETE = 'DELETE',
|
||||
EXECUTE = 'EXECUTE'
|
||||
}
|
||||
|
||||
// 角色类型
|
||||
export enum RoleType {
|
||||
SYSTEM = 'SYSTEM',
|
||||
CUSTOM = 'CUSTOM'
|
||||
}
|
||||
|
||||
// 支付方式
|
||||
export enum PaymentMethod {
|
||||
CREDIT_CARD = 'CREDIT_CARD',
|
||||
PAYPAL = 'PAYPAL',
|
||||
BANK_TRANSFER = 'BANK_TRANSFER',
|
||||
CASH = 'CASH'
|
||||
}
|
||||
|
||||
// 广告类型
|
||||
export enum AdType {
|
||||
SEARCH = 'SEARCH',
|
||||
DISPLAY = 'DISPLAY',
|
||||
SOCIAL = 'SOCIAL',
|
||||
VIDEO = 'VIDEO'
|
||||
}
|
||||
|
||||
// 证书类型
|
||||
export enum CertificateType {
|
||||
CE = 'CE',
|
||||
FCC = 'FCC',
|
||||
ROHS = 'ROHS',
|
||||
ISO9001 = 'ISO9001',
|
||||
ISO14001 = 'ISO14001',
|
||||
FDA = 'FDA',
|
||||
UL = 'UL',
|
||||
CCC = 'CCC',
|
||||
EXPORT_LICENSE = 'EXPORT_LICENSE',
|
||||
ORIGIN = 'ORIGIN',
|
||||
OTHER = 'OTHER'
|
||||
}
|
||||
|
||||
// 安全测试结果
|
||||
export enum SecurityTestResult {
|
||||
PASS = 'PASS',
|
||||
FAIL = 'FAIL',
|
||||
WARNING = 'WARNING'
|
||||
}
|
||||
|
||||
// 回归测试结果
|
||||
export enum RegressionTestResult {
|
||||
PASS = 'PASS',
|
||||
FAIL = 'FAIL',
|
||||
SKIPPED = 'SKIPPED'
|
||||
}
|
||||
|
||||
export default {
|
||||
ArbitrageOpportunityStatus,
|
||||
ArbitrageExecutionStatus,
|
||||
PriceComparisonStatus,
|
||||
RiskLevel,
|
||||
PricingStrategy,
|
||||
PricingDecisionStatus,
|
||||
PriceAdjustmentDirection,
|
||||
PriceAdjustFrequency,
|
||||
ABTestStatus,
|
||||
CompetitorMonitorStatus,
|
||||
PriceAlertStatus,
|
||||
AutoExecutionStatus,
|
||||
AutomationLevel,
|
||||
ExecutionMode,
|
||||
ShopStatus,
|
||||
TenantStatus,
|
||||
UserStatus,
|
||||
OrderStatus,
|
||||
ProductStatus,
|
||||
AdStatus,
|
||||
CertificateStatus,
|
||||
StrategyStatus,
|
||||
AutopilotSessionStatus,
|
||||
AutopilotMode,
|
||||
LogType,
|
||||
TaskStatus,
|
||||
BusinessType,
|
||||
LeaderboardType,
|
||||
LeaderboardPeriod,
|
||||
MerchantTier,
|
||||
StrategyCategory,
|
||||
StrategyRiskLevel,
|
||||
BillingType,
|
||||
PermissionAction,
|
||||
RoleType,
|
||||
PaymentMethod,
|
||||
AdType,
|
||||
CertificateType,
|
||||
SecurityTestResult,
|
||||
RegressionTestResult
|
||||
}
|
||||
export * from '../shared/types/enums/index';
|
||||
|
||||
@@ -1,20 +1 @@
|
||||
export enum PlatformType {
|
||||
AMAZON = 'amazon',
|
||||
SHOPEE = 'shopee',
|
||||
ALIEXPRESS = 'aliexpress',
|
||||
TIKTOK = 'tiktok',
|
||||
EBAY = 'ebay',
|
||||
LAZADA = 'lazada',
|
||||
WISH = 'wish',
|
||||
SHEIN = 'shein',
|
||||
JD_WORLDWIDE = 'jd_worldwide',
|
||||
WALMART = 'walmart',
|
||||
ETSY = 'etsy',
|
||||
TARGET = 'target',
|
||||
NEWEGG = 'newegg',
|
||||
CDISCOUNT = 'cdiscount',
|
||||
ALLEGRO = 'allegro',
|
||||
OTTO = 'otto',
|
||||
RAKUTEN = 'rakuten',
|
||||
QOO10 = 'qoo10'
|
||||
}
|
||||
export * from '../../shared/types/enums/PlatformType';
|
||||
|
||||
@@ -1,6 +1 @@
|
||||
export enum StoreStatus {
|
||||
PENDING = 'pending',
|
||||
ACTIVE = 'active',
|
||||
INACTIVE = 'inactive',
|
||||
SUSPENDED = 'suspended'
|
||||
}
|
||||
export * from '../../shared/types/enums/StoreStatus';
|
||||
|
||||
13
server/src/types/express.d.ts
vendored
13
server/src/types/express.d.ts
vendored
@@ -16,11 +16,14 @@ declare global {
|
||||
interface Request {
|
||||
user?: User;
|
||||
traceContext?: {
|
||||
tenantId: string;
|
||||
shopId: string;
|
||||
traceId: string;
|
||||
businessType: 'TOC' | 'TOB';
|
||||
};
|
||||
tenantId: string;
|
||||
shopId: string;
|
||||
taskId: string;
|
||||
traceId: string;
|
||||
userId: string;
|
||||
roleCode: string;
|
||||
businessType: 'TOC' | 'TOB';
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +1 @@
|
||||
/**
|
||||
* 消息配置
|
||||
*/
|
||||
export interface MessageConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'QUEUE' | 'TOPIC' | 'STREAM';
|
||||
maxSize?: number;
|
||||
retentionPeriod?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
export interface MessageStatus {
|
||||
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'REJECTED' | 'ERROR';
|
||||
lastUpdated: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息队列
|
||||
*/
|
||||
export interface MessageQueue {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'QUEUE' | 'TOPIC' | 'STREAM';
|
||||
maxSize: number;
|
||||
retentionPeriod: number;
|
||||
created: Date;
|
||||
messages: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
export interface Message {
|
||||
id: string;
|
||||
queueId: string;
|
||||
payload: any;
|
||||
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'REJECTED' | 'ERROR';
|
||||
created: Date;
|
||||
updated: Date;
|
||||
}
|
||||
export * from '../shared/types/shared/Message';
|
||||
|
||||
@@ -1,26 +1 @@
|
||||
export interface OrderItem {
|
||||
productId: string;
|
||||
quantity: number;
|
||||
price: number;
|
||||
}
|
||||
|
||||
export interface ShippingAddress {
|
||||
name: string;
|
||||
address: string;
|
||||
city: string;
|
||||
state: string;
|
||||
zip: string;
|
||||
country: string;
|
||||
}
|
||||
|
||||
export interface Order {
|
||||
id: string;
|
||||
customerId: string;
|
||||
totalAmount: number;
|
||||
status: string;
|
||||
items: OrderItem[];
|
||||
shippingAddress: ShippingAddress;
|
||||
paymentMethod: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
export * from '../../shared/types/domain/Order';
|
||||
|
||||
@@ -1,13 +1 @@
|
||||
export interface Product {
|
||||
id: string;
|
||||
name: string;
|
||||
sku: string;
|
||||
price: number;
|
||||
stock: number;
|
||||
description: string;
|
||||
images: string[];
|
||||
categories: string[];
|
||||
attributes: Record<string, any>;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
export * from '../../shared/types/domain/Product';
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
export interface ShopInfo {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
export * from '../../shared/types/domain/ShopInfo';
|
||||
|
||||
@@ -1,41 +1 @@
|
||||
/**
|
||||
* 监控配置
|
||||
*/
|
||||
export interface MonitoringConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'CPU' | 'MEMORY' | 'DISK' | 'NETWORK' | 'SERVICE' | 'CUSTOM';
|
||||
threshold: number;
|
||||
description?: string;
|
||||
checkInterval?: number;
|
||||
alertEnabled?: boolean;
|
||||
alertThreshold?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 监控状态
|
||||
*/
|
||||
export interface MonitoringStatus {
|
||||
status: 'NORMAL' | 'ALERT' | 'ERROR' | 'UNKNOWN';
|
||||
lastChecked: Date;
|
||||
value: number;
|
||||
threshold: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 告警状态
|
||||
*/
|
||||
export type AlertStatus = 'ACTIVE' | 'ACKNOWLEDGED' | 'RESOLVED' | 'ESCALATED';
|
||||
|
||||
/**
|
||||
* 告警
|
||||
*/
|
||||
export interface Alert {
|
||||
id: string;
|
||||
configId: string;
|
||||
severity: 'INFO' | 'WARNING' | 'ERROR' | 'CRITICAL';
|
||||
message: string;
|
||||
status: AlertStatus;
|
||||
created: Date;
|
||||
updated: Date;
|
||||
}
|
||||
export * from '../shared/types/shared/Monitoring';
|
||||
|
||||
@@ -1,44 +1 @@
|
||||
/**
|
||||
* 安全配置
|
||||
*/
|
||||
export interface SecurityConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'AUTH' | 'ENCRYPTION' | 'ACCESS' | 'AUDIT';
|
||||
description?: string;
|
||||
settings?: Record<string, any>;
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全状态
|
||||
*/
|
||||
export interface SecurityStatus {
|
||||
status: 'ACTIVE' | 'INACTIVE' | 'ERROR' | 'UNKNOWN';
|
||||
lastUpdated: Date;
|
||||
complianceLevel: 'COMPLIANT' | 'NON_COMPLIANT' | 'PARTIALLY_COMPLIANT' | 'UNKNOWN';
|
||||
}
|
||||
|
||||
/**
|
||||
* 合规检查
|
||||
*/
|
||||
export interface ComplianceCheck {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'SECURITY' | 'PRIVACY' | 'REGULATORY' | 'PERFORMANCE';
|
||||
severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
||||
description?: string;
|
||||
frequency?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 合规检查结果
|
||||
*/
|
||||
export interface ComplianceResult {
|
||||
checkId: string;
|
||||
target: string;
|
||||
status: 'COMPLIANT' | 'NON_COMPLIANT' | 'ERROR';
|
||||
message: string;
|
||||
timestamp: Date;
|
||||
details: Record<string, any>;
|
||||
}
|
||||
export * from '../shared/types/shared/Security';
|
||||
|
||||
@@ -1,33 +1 @@
|
||||
/**
|
||||
* 服务配置
|
||||
*/
|
||||
export interface ServiceConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
version: string;
|
||||
description?: string;
|
||||
dependencies?: string[];
|
||||
startupOrder?: number;
|
||||
autoStart?: boolean;
|
||||
maxRestarts?: number;
|
||||
restartDelay?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务状态
|
||||
*/
|
||||
export interface ServiceStatus {
|
||||
status: 'RUNNING' | 'STOPPED' | 'ERROR' | 'UNKNOWN';
|
||||
lastCheck: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务健康检查结果
|
||||
*/
|
||||
export interface ServiceHealthCheck {
|
||||
serviceId: string;
|
||||
status: 'HEALTHY' | 'UNHEALTHY' | 'ERROR';
|
||||
message: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
export * from '../shared/types/shared/Service';
|
||||
|
||||
Reference in New Issue
Block a user