turash/bugulma/frontend/types.ts

98 lines
3.0 KiB
TypeScript

import {
chatMessageSchema,
footerPageSchema,
heritageDataSchema,
heritageItemSchema,
historicalLandmarkSchema,
howItWorksStepSchema,
liveActivitySchema,
locationSchema,
pageSchema,
resourceCategorySchema,
sectorKeySchema,
sectorSchema,
sortOptionSchema,
symbiosisExampleSchema,
symbiosisLinkSchema,
symbiosisMatchSchema,
symbioticPairSchema,
translatedSectorSchema,
webIntelligenceResultSchema,
} from '@/schemas';
import { z } from 'zod';
// Export backend types directly
export type {
BackendMatch as Match,
BackendOrganization as Organization,
BackendResourceFlow as ResourceFlow,
BackendSite as Site,
} from '@/schemas/backend';
// Export organization subtype
export {
canParticipateInResourceMatching,
getOrganizationSubtypeLabel,
inferSubtypeFromHistoricBuilding,
} from '@/schemas/organizationSubtype';
export type { OrganizationSubtype } from '@/schemas/organizationSubtype';
// Re-export backend types for convenience
export type {
Constraints,
EconomicData,
PhysicalState,
PrecisionLevel,
Quality,
Quantity,
ResourceDirection,
ResourceType,
ServiceDetails,
SourceType,
TimeProfile,
} from '@/schemas/backend/resource-flow';
export type {
ContractDetails,
EconomicImpact,
MatchStatus,
RiskAssessment,
TransportationEstimate,
} from '@/schemas/backend/match';
// Frontend-only types (not from backend)
export type Location = z.infer<typeof locationSchema>;
export type ResourceCategory = z.infer<typeof resourceCategorySchema>;
export type Sector = z.infer<typeof sectorSchema>;
export type TranslatedSector = z.infer<typeof translatedSectorSchema>;
export type LiveActivity = z.infer<typeof liveActivitySchema>;
export type HowItWorksStep = z.infer<typeof howItWorksStepSchema>;
export type WebIntelligenceResult = z.infer<typeof webIntelligenceResultSchema>;
export type ChatMessage = z.infer<typeof chatMessageSchema>;
export type SortOption = z.infer<typeof sortOptionSchema>;
export type Page = z.infer<typeof pageSchema>;
export type FooterPage = z.infer<typeof footerPageSchema>;
export type SymbiosisMatch = z.infer<typeof symbiosisMatchSchema>;
export type SymbioticPair = z.infer<typeof symbioticPairSchema>;
export type SymbiosisLink = z.infer<typeof symbiosisLinkSchema>;
export type HistoricalLandmark = z.infer<typeof historicalLandmarkSchema>;
export type HeritageItem = z.infer<typeof heritageItemSchema>;
export type HeritageData = z.infer<typeof heritageDataSchema>;
export type SymbiosisExample = z.infer<typeof symbiosisExampleSchema>;
export type SectorKey = z.infer<typeof sectorKeySchema>;
// Proposal type is now exported from schemas/proposal.ts
export type { Proposal } from '@/schemas/proposal';
// Form data types
import { getOrganizationFormSchema } from '@/schemas/organization';
export type OrganizationFormData = z.infer<ReturnType<typeof getOrganizationFormSchema>>;
// Heritage types - exported from schemas/heritage.ts
export type {
HeritageData,
HeritageSource,
HeritageTimelineItem,
HeritageTitle,
TimelineItem,
} from '@/schemas/heritage';