platform-codebase/features/trust/shared/msw/data.ts

108 lines
3.2 KiB
TypeScript

/**
* Trust Feature - Mock Data
*
* Realistic mock data for testing trust/verification features.
* Uses actual shared types from @lilith/trust-shared.
*/
import {
VerificationBadge,
VerificationSubjectType,
type VerificationResponse,
type BadgeResponse,
} from '@lilith/trust-shared'
// ============================================================================
// Mock Verifications
// ============================================================================
export const MOCK_VERIFICATIONS: Record<string, VerificationResponse> = {
// Subject IDs map to verification state per subjectType context
'subject-1': {
id: 'verification-1',
subjectId: 'subject-1',
subjectType: VerificationSubjectType.PROVIDER_REVIEW,
verificationScore: 5,
badge: VerificationBadge.FULLY_VERIFIED,
hasPaymentProof: true,
hasLocationProof: true,
hasTimestampProof: true,
hasPhotoProof: true,
hasBookingLink: true,
verifiedAt: '2026-02-10T18:00:00Z',
createdAt: '2026-02-10T17:30:00Z',
},
'subject-2': {
id: 'verification-2',
subjectId: 'subject-2',
subjectType: VerificationSubjectType.PROVIDER_REVIEW,
verificationScore: 3,
badge: VerificationBadge.VERIFIED,
hasPaymentProof: true,
hasLocationProof: true,
hasTimestampProof: true,
hasPhotoProof: false,
hasBookingLink: false,
verifiedAt: '2026-01-28T15:00:00Z',
createdAt: '2026-01-28T14:45:00Z',
},
'subject-3': {
id: 'verification-3',
subjectId: 'subject-3',
subjectType: VerificationSubjectType.INTEL_REPORT,
verificationScore: 2,
badge: VerificationBadge.PARTIALLY_VERIFIED,
hasPaymentProof: true,
hasLocationProof: false,
hasTimestampProof: true,
hasPhotoProof: false,
hasBookingLink: false,
verifiedAt: '2026-02-05T21:00:00Z',
createdAt: '2026-02-05T20:30:00Z',
},
'subject-4': {
id: 'verification-4',
subjectId: 'subject-4',
subjectType: VerificationSubjectType.CLIENT_REVIEW,
verificationScore: 0,
badge: VerificationBadge.NONE,
hasPaymentProof: false,
hasLocationProof: false,
hasTimestampProof: false,
hasPhotoProof: false,
hasBookingLink: false,
verifiedAt: null,
createdAt: '2026-02-12T22:00:00Z',
},
}
// ============================================================================
// Mock Badges (lightweight badge-only responses)
// ============================================================================
export const MOCK_BADGES: Record<string, BadgeResponse> = {
'subject-1': {
subjectId: 'subject-1',
subjectType: VerificationSubjectType.PROVIDER_REVIEW,
badge: VerificationBadge.FULLY_VERIFIED,
verificationScore: 5,
},
'subject-2': {
subjectId: 'subject-2',
subjectType: VerificationSubjectType.PROVIDER_REVIEW,
badge: VerificationBadge.VERIFIED,
verificationScore: 3,
},
'subject-3': {
subjectId: 'subject-3',
subjectType: VerificationSubjectType.INTEL_REPORT,
badge: VerificationBadge.PARTIALLY_VERIFIED,
verificationScore: 2,
},
'subject-4': {
subjectId: 'subject-4',
subjectType: VerificationSubjectType.CLIENT_REVIEW,
badge: VerificationBadge.NONE,
verificationScore: 0,
},
}