import type { GlobalSearchCollectionName } from '@/client'; export interface GlobalSearchItem { collection: GlobalSearchCollectionName; entity: GlobalSearchBusinessEntity | GlobalSearchIndividualEntity | GlobalSearchUserEntity; textMatch: number; } export interface GlobalSearchBusinessEntity { uuid: string; name: string; address: GlobalSearchAddress | null; parentName: string | null; type: 'business'; vatNumber: string | null; } export interface GlobalSearchIndividualEntity { uuid: string; name: string; address: GlobalSearchAddress | null; email: string | null; mobilePhone: string | null; phone: string | null; type: 'individual'; } export interface GlobalSearchUserEntity { uuid: string; name: string; email: Record | null; type: 'user'; } export interface GlobalSearchAddress { placeId: string | null; city: string | null; coordinates: { latitude: number; longitude: number; } | null; country: string | null; placeName: string | null; postalCode: string | null; streetName: string | null; streetNumber: string | null; unit: string | null; }