feat(services): F005 – complete service layer
New domain types: - shortlist.ts: Shortlist, ShortlistItem, CreateShortlistInput - review.ts: ReviewQueueItem, ReviewPriority, ReviewQueueStatus New mock data: - shortlists.ts: 2 sample shortlists - reviewQueue.ts: 3 pending review items New providers (interface + mockup): - IShortlistProvider / MockupShortlistProvider (with 150ms latency) - IReviewProvider / MockupReviewProvider (priority-sorted, with latency) - IDashboardProvider / MockupDashboardProvider (computed from all mock data) New services: - reviewService: getQueue, approve, reject, assign - shortlistService: CRUD + addItem/removeItem - authService: wraps sessionStore, swappable for real auth - dashboardService: getStats(organizationId?) Enhancements: - types.ts: typed ServiceErrorCode + ServiceError, Pagination alias - aiService.ts: openRouterAIService stub (throws ai_generation_failed) - lib/mockUtils.ts: mockDelay(ms) utility New hooks: - useUnifiedResults(needId?): joins matches+properties+signals → UnifiedMatchResult[] - useReviewQueue: + useApproveReviewItem + useRejectReviewItem - useMatchDetail, usePropertyDetail, useNeedProfiles aliases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
export const ReviewPriority = {
|
||||
HIGH: 'HIGH',
|
||||
MEDIUM: 'MEDIUM',
|
||||
LOW: 'LOW',
|
||||
} as const
|
||||
export type ReviewPriority = typeof ReviewPriority[keyof typeof ReviewPriority]
|
||||
|
||||
export const ReviewQueueStatus = {
|
||||
PENDING: 'PENDING',
|
||||
IN_REVIEW: 'IN_REVIEW',
|
||||
COMPLETED: 'COMPLETED',
|
||||
} as const
|
||||
export type ReviewQueueStatus = typeof ReviewQueueStatus[keyof typeof ReviewQueueStatus]
|
||||
|
||||
export interface ReviewQueueItem {
|
||||
id: string
|
||||
matchId: string
|
||||
needId: string
|
||||
propertyId: string
|
||||
matchScore: number
|
||||
priority: ReviewPriority
|
||||
status: ReviewQueueStatus
|
||||
assignedTo?: string
|
||||
notes?: string
|
||||
dueAt?: string
|
||||
organizationId?: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
Reference in New Issue
Block a user