Initial commit

This commit is contained in:
Benjamin Sutter
2026-05-15 00:48:18 +02:00
commit 9e827c50f9
72 changed files with 10477 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
export enum AssetType {
OFFICE = 'OFFICE',
RETAIL = 'RETAIL',
GASTRO = 'GASTRO',
LOGISTICS = 'LOGISTICS',
PRODUCTION = 'PRODUCTION',
MIXED = 'MIXED',
}
export enum ResultType {
VERIFIED_PORTFOLIO = 'VERIFIED_PORTFOLIO',
EXTERNAL_MARKET = 'EXTERNAL_MARKET',
FUTURE_AVAILABILITY = 'FUTURE_AVAILABILITY',
}
export enum MatchStrength {
STRONG = 'STRONG',
MODERATE = 'MODERATE',
WEAK = 'WEAK',
}
export enum RiskLevel {
LOW = 'LOW',
MEDIUM = 'MEDIUM',
HIGH = 'HIGH',
CRITICAL = 'CRITICAL',
}
export enum AvailabilityStatus {
AVAILABLE_NOW = 'AVAILABLE_NOW',
AVAILABLE_SOON = 'AVAILABLE_SOON',
FUTURE_SIGNAL = 'FUTURE_SIGNAL',
OCCUPIED = 'OCCUPIED',
UNKNOWN = 'UNKNOWN',
}
export enum DataFreshness {
FRESH = 'FRESH',
STALE = 'STALE',
OUTDATED = 'OUTDATED',
}
export enum UserRole {
SUPER_ADMIN = 'SUPER_ADMIN',
ORGANIZATION_ADMIN = 'ORGANIZATION_ADMIN',
PROPERTY_MANAGER = 'PROPERTY_MANAGER',
REVIEWER = 'REVIEWER',
OWNER_VIEWER = 'OWNER_VIEWER',
DEMAND_USER = 'DEMAND_USER',
}
export enum SignalType {
EXPANSION = 'EXPANSION',
POSSIBLE_MOVE_OUT = 'POSSIBLE_MOVE_OUT',
CONSTRUCTION_PROJECT = 'CONSTRUCTION_PROJECT',
RESTRUCTURING = 'RESTRUCTURING',
PROJECT_DEVELOPMENT = 'PROJECT_DEVELOPMENT',
SPACE_CONSOLIDATION = 'SPACE_CONSOLIDATION',
}
export enum WorkspaceType {
SUPPLY = 'SUPPLY',
DEMAND = 'DEMAND',
OPERATIONS = 'OPERATIONS',
}
+33
View File
@@ -0,0 +1,33 @@
import type { SignalType, RiskLevel } from './enums'
export interface SignalSource {
type: 'PRESS' | 'CONSTRUCTION_PERMIT' | 'JOB_POSTING' | 'COMPANY_REPORT' | 'MARKET_DATA' | 'MANUAL'
url?: string
publishedAt?: string
credibility: 'LOW' | 'MEDIUM' | 'HIGH'
}
export interface FutureSignal {
id: string
signalType: SignalType
companyName?: string
propertyId?: string
locationHint: string
areaSqmEstimate?: number
probability: number
confidenceScore: number
timeHorizonMonths: number
source: SignalSource
sensitivityLevel: 'PUBLIC' | 'INTERNAL' | 'CONFIDENTIAL'
disclaimer: string
riskLevel: RiskLevel
marketIndicator?: string
relevanceScore?: number
isVerified: boolean
verifiedBy?: string
verifiedAt?: string
expiresAt?: string
organizationId?: string
createdAt: string
updatedAt: string
}
+5
View File
@@ -0,0 +1,5 @@
export * from './enums'
export * from './property'
export * from './need'
export * from './match'
export * from './futureSignal'
+53
View File
@@ -0,0 +1,53 @@
import type { MatchStrength, RiskLevel } from './enums'
export interface ScoreBreakdown {
hardMatchScore: number
softFactorScore: number
confidenceModifier: number
dataQualityModifier: number
totalScore: number
}
export interface ScoreFactor {
criterion: string
weight: number
score: number
contribution: number
explanation: string
}
export interface Tradeoff {
criterion: string
concern: string
severity: 'LOW' | 'MEDIUM' | 'HIGH'
mitigation?: string
}
export interface AlternativeStrategy {
title: string
description: string
expectedScore?: number
}
export interface Match {
id: string
propertyId: string
needId: string
matchScore: number
matchStrength: MatchStrength
scoreBreakdown: ScoreBreakdown
positiveFactors: ScoreFactor[]
negativeFactors: ScoreFactor[]
tradeoffs: Tradeoff[]
explainabilitySummary: string
confidenceLevel: number
riskLevel: RiskLevel
uncertaintyIndicators: string[]
alternativeStrategies?: AlternativeStrategy[]
reviewedBy?: string
reviewedAt?: string
isApproved?: boolean
organizationId?: string
createdAt: string
updatedAt: string
}
+65
View File
@@ -0,0 +1,65 @@
import type { AssetType } from './enums'
export interface AreaRange {
min: number
max: number
}
export interface BudgetRange {
minPerSqm?: number
maxPerSqm: number
maxMonthlyTotal?: number
currency: string
}
export interface Timing {
earliestMoveIn: string
latestMoveIn: string
contractDurationMonths?: number
flexibleTiming: boolean
}
export interface WeightingProfile {
area: number
location: number
budget: number
timing: number
prestige: number
accessibility: number
expansionPotential: number
flexibility: number
[key: string]: number
}
export interface SoftFactorPreferences {
minPrestige?: number
minAccessibility?: number
requireParking?: boolean
maxPublicTransportMinutes?: number
preferredEsgRating?: string
requireHighVisibility?: boolean
}
export interface Need {
id: string
companyName: string
contactName?: string
assetType: AssetType
requiredArea: AreaRange
preferredLocations: string[]
excludedLocations?: string[]
budgetRange: BudgetRange
timing: Timing
mustCriteriaText?: string[]
softFactors?: SoftFactorPreferences
weightingProfile: WeightingProfile
confidenceInCriteria: number
extractedFromText?: string
notes?: string
organizationId?: string
createdAt: string
updatedAt: string
}
export type CreateNeedInput = Omit<Need, 'id' | 'createdAt' | 'updatedAt'>
export type UpdateNeedInput = Partial<CreateNeedInput>
+73
View File
@@ -0,0 +1,73 @@
import type { AssetType, ResultType, AvailabilityStatus, DataFreshness, RiskLevel } from './enums'
export interface Location {
city: string
district?: string
canton?: string
country: string
coordinates?: {
lat: number
lng: number
}
}
export interface Address {
street: string
houseNumber: string
postalCode: string
city: string
country: string
}
export interface SoftFactors {
prestige?: number
accessibility?: number
visibilityScore?: number
talentAccess?: number
esgRating?: string
passerbyFrequency?: 'LOW' | 'MEDIUM' | 'HIGH' | 'VERY_HIGH'
parkingSpots?: number
publicTransportMinutes?: number
infrastructureNotes?: string
}
export interface DataQuality {
score: number
missingCriticalFields: string[]
missingOptionalFields: string[]
lastVerifiedAt?: string
freshness: DataFreshness
warnings: string[]
}
export interface Property {
id: string
title: string
assetType: AssetType
resultType: ResultType
location: Location
address: Address
areaSqm: number
rentPricePerSqm: number
totalRentMonthly?: number
availabilityDate: string
availabilityStatus: AvailabilityStatus
sourceType: string
sourceUrl?: string
confidenceScore: number
dataQuality: DataQuality
softFactors?: SoftFactors
floorLevel?: number
expansionPotentialSqm?: number
contractDurationMonths?: number
ancillaryCosts?: number
riskLevel?: RiskLevel
description?: string
images?: string[]
organizationId?: string
createdAt: string
updatedAt: string
}
export type CreatePropertyInput = Omit<Property, 'id' | 'createdAt' | 'updatedAt'>
export type UpdatePropertyInput = Partial<CreatePropertyInput>