fix: migrate geo GraphQL queries and frontend to camelCase
All checks were successful
Build Docker Image / build (push) Successful in 5m0s
All checks were successful
Build Docker Image / build (push) Successful in 5m0s
Geo backend was migrated to camelCase but frontend .graphql files and component code still used snake_case, causing 400 errors on all geo API calls.
This commit is contained in:
@@ -152,17 +152,17 @@ const fetchOffersByHub = async () => {
|
|||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
|
|
||||||
const offers = offersResponse?.nearest_offers || []
|
const offers = offersResponse?.nearestOffers || []
|
||||||
|
|
||||||
// Offers already include routes from backend
|
// Offers already include routes from backend
|
||||||
const offersWithRoutes = offers
|
const offersWithRoutes = offers
|
||||||
.filter((offer): offer is NonNullable<OfferWithRoute> => offer !== null)
|
.filter((offer): offer is NonNullable<OfferWithRoute> => offer !== null)
|
||||||
.map((offer) => ({
|
.map((offer) => ({
|
||||||
sourceUuid: offer.uuid,
|
sourceUuid: offer.uuid,
|
||||||
sourceName: offer.product_name,
|
sourceName: offer.productName,
|
||||||
sourceLat: offer.latitude,
|
sourceLat: offer.latitude,
|
||||||
sourceLon: offer.longitude,
|
sourceLon: offer.longitude,
|
||||||
distanceKm: offer.distance_km,
|
distanceKm: offer.distanceKm,
|
||||||
routes: offer.routes || []
|
routes: offer.routes || []
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -209,10 +209,10 @@ const getRouteStages = (option: ProductRouteOption) => {
|
|||||||
return route.stages
|
return route.stages
|
||||||
.filter((stage): stage is NonNullable<RouteStage> => stage !== null)
|
.filter((stage): stage is NonNullable<RouteStage> => stage !== null)
|
||||||
.map((stage) => ({
|
.map((stage) => ({
|
||||||
transportType: stage.transport_type,
|
transportType: stage.transportType,
|
||||||
distanceKm: stage.distance_km,
|
distanceKm: stage.distanceKm,
|
||||||
travelTimeSeconds: stage.travel_time_seconds,
|
travelTimeSeconds: stage.travelTimeSeconds,
|
||||||
fromName: stage.from_name
|
fromName: stage.fromName
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { HubsListDocument, type HubsListQueryResult } from '~/composables/graphql/public/geo-generated'
|
import { HubsListDocument, type HubsListQueryResult } from '~/composables/graphql/public/geo-generated'
|
||||||
|
|
||||||
type HubItem = NonNullable<NonNullable<HubsListQueryResult['hubs_list']>[number]>
|
type HubItem = NonNullable<NonNullable<HubsListQueryResult['hubsList']>[number]>
|
||||||
type HubWithDistance = HubItem & { distance?: string }
|
type HubWithDistance = HubItem & { distance?: string }
|
||||||
|
|
||||||
interface TeamAddress {
|
interface TeamAddress {
|
||||||
@@ -96,7 +96,7 @@ const calculateDistance = (lat: number, lng: number) => {
|
|||||||
// Load logistics hubs
|
// Load logistics hubs
|
||||||
const { data: locationsDataRaw, pending, error, refresh } = await useServerQuery('locations', HubsListDocument, { limit: 100 }, 'public', 'geo')
|
const { data: locationsDataRaw, pending, error, refresh } = await useServerQuery('locations', HubsListDocument, { limit: 100 }, 'public', 'geo')
|
||||||
const locationsData = computed<HubWithDistance[]>(() => {
|
const locationsData = computed<HubWithDistance[]>(() => {
|
||||||
return (locationsDataRaw.value?.hubs_list || [])
|
return (locationsDataRaw.value?.hubsList || [])
|
||||||
.filter((location): location is HubItem => location !== null)
|
.filter((location): location is HubItem => location !== null)
|
||||||
.map((location) => ({
|
.map((location) => ({
|
||||||
...location,
|
...location,
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
<Stack v-if="autoEdges.length > 0" gap="2">
|
<Stack v-if="autoEdges.length > 0" gap="2">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="(edge, index) in autoEdges"
|
v-for="(edge, index) in autoEdges"
|
||||||
:key="edge.to_uuid ?? index"
|
:key="edge.toUuid ?? index"
|
||||||
:to="localePath(`/catalog/hubs/${edge.to_uuid}`)"
|
:to="localePath(`/catalog/hubs/${edge.toUuid}`)"
|
||||||
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
@@ -49,11 +49,11 @@
|
|||||||
<Icon name="lucide:map-pin" size="16" class="text-primary" />
|
<Icon name="lucide:map-pin" size="16" class="text-primary" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="font-medium">{{ edge.to_name }}</div>
|
<div class="font-medium">{{ edge.toName }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="font-semibold text-primary">{{ edge.distance_km }} km</div>
|
<div class="font-semibold text-primary">{{ edge.distanceKm }} km</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
<Stack v-if="railEdges.length > 0" gap="2">
|
<Stack v-if="railEdges.length > 0" gap="2">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="(edge, index) in railEdges"
|
v-for="(edge, index) in railEdges"
|
||||||
:key="edge.to_uuid ?? index"
|
:key="edge.toUuid ?? index"
|
||||||
:to="localePath(`/catalog/hubs/${edge.to_uuid}`)"
|
:to="localePath(`/catalog/hubs/${edge.toUuid}`)"
|
||||||
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
@@ -81,11 +81,11 @@
|
|||||||
<Icon name="lucide:map-pin" size="16" class="text-emerald-500" />
|
<Icon name="lucide:map-pin" size="16" class="text-emerald-500" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="font-medium">{{ edge.to_name }}</div>
|
<div class="font-medium">{{ edge.toName }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="font-semibold text-emerald-600">{{ edge.distance_km }} km</div>
|
<div class="font-semibold text-emerald-600">{{ edge.distanceKm }} km</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
@@ -147,8 +147,8 @@ const mapCenter = computed<[number, number]>(() => {
|
|||||||
|
|
||||||
const allEdges = [...props.autoEdges, ...props.railEdges]
|
const allEdges = [...props.autoEdges, ...props.railEdges]
|
||||||
allEdges.forEach((edge) => {
|
allEdges.forEach((edge) => {
|
||||||
if (edge.to_latitude && edge.to_longitude) {
|
if (edge.toLatitude && edge.toLongitude) {
|
||||||
points.push([edge.to_longitude, edge.to_latitude])
|
points.push([edge.toLongitude, edge.toLatitude])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ const mapCenter = computed<[number, number]>(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const mapZoom = computed(() => {
|
const mapZoom = computed(() => {
|
||||||
const distances = [...props.autoEdges, ...props.railEdges].map(e => e.distance_km || 0)
|
const distances = [...props.autoEdges, ...props.railEdges].map(e => e.distanceKm || 0)
|
||||||
if (distances.length === 0) return 5
|
if (distances.length === 0) return 5
|
||||||
|
|
||||||
const maxDistance = Math.max(...distances)
|
const maxDistance = Math.max(...distances)
|
||||||
@@ -193,18 +193,18 @@ const buildRouteFeatureCollection = (routes: RouteGeometry[], transportType: 'au
|
|||||||
const buildNeighborsFeatureCollection = (edges: Edge[], transportType: 'auto' | 'rail') => ({
|
const buildNeighborsFeatureCollection = (edges: Edge[], transportType: 'auto' | 'rail') => ({
|
||||||
type: 'FeatureCollection' as const,
|
type: 'FeatureCollection' as const,
|
||||||
features: edges
|
features: edges
|
||||||
.filter(e => e.to_latitude && e.to_longitude)
|
.filter(e => e.toLatitude && e.toLongitude)
|
||||||
.map(edge => ({
|
.map(edge => ({
|
||||||
type: 'Feature' as const,
|
type: 'Feature' as const,
|
||||||
properties: {
|
properties: {
|
||||||
uuid: edge.to_uuid,
|
uuid: edge.toUuid,
|
||||||
name: edge.to_name,
|
name: edge.toName,
|
||||||
distanceKm: edge.distance_km,
|
distanceKm: edge.distanceKm,
|
||||||
transportType
|
transportType
|
||||||
},
|
},
|
||||||
geometry: {
|
geometry: {
|
||||||
type: 'Point' as const,
|
type: 'Point' as const,
|
||||||
coordinates: [edge.to_longitude!, edge.to_latitude!]
|
coordinates: [edge.toLongitude!, edge.toLatitude!]
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -38,8 +38,8 @@
|
|||||||
<Stack gap="2">
|
<Stack gap="2">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-for="(edge, index) in edges"
|
v-for="(edge, index) in edges"
|
||||||
:key="edge.to_uuid ?? index"
|
:key="edge.toUuid ?? index"
|
||||||
:to="localePath(`/catalog/hubs/${edge.to_uuid}`)"
|
:to="localePath(`/catalog/hubs/${edge.toUuid}`)"
|
||||||
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
class="flex flex-col gap-2 p-3 rounded-lg border border-base-300 hover:bg-base-200 transition-colors"
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
<Icon name="lucide:map-pin" size="16" class="text-primary" />
|
<Icon name="lucide:map-pin" size="16" class="text-primary" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="font-medium">{{ edge.to_name }}</div>
|
<div class="font-medium">{{ edge.toName }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="font-semibold text-primary">{{ edge.distance_km }} km</div>
|
<div class="font-semibold text-primary">{{ edge.distanceKm }} km</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
@@ -124,8 +124,8 @@ const mapCenter = computed<[number, number]>(() => {
|
|||||||
return [0, 0]
|
return [0, 0]
|
||||||
}
|
}
|
||||||
|
|
||||||
const allLats = [props.currentHub.latitude, ...props.edges.map(e => e.to_latitude!).filter(Boolean)]
|
const allLats = [props.currentHub.latitude, ...props.edges.map(e => e.toLatitude!).filter(Boolean)]
|
||||||
const allLngs = [props.currentHub.longitude, ...props.edges.map(e => e.to_longitude!).filter(Boolean)]
|
const allLngs = [props.currentHub.longitude, ...props.edges.map(e => e.toLongitude!).filter(Boolean)]
|
||||||
|
|
||||||
const avgLng = allLngs.reduce((a, b) => a + b, 0) / allLngs.length
|
const avgLng = allLngs.reduce((a, b) => a + b, 0) / allLngs.length
|
||||||
const avgLat = allLats.reduce((a, b) => a + b, 0) / allLats.length
|
const avgLat = allLats.reduce((a, b) => a + b, 0) / allLats.length
|
||||||
@@ -166,16 +166,16 @@ const buildRouteFeatureCollection = () => ({
|
|||||||
|
|
||||||
const buildNeighborsFeatureCollection = () => ({
|
const buildNeighborsFeatureCollection = () => ({
|
||||||
type: 'FeatureCollection' as const,
|
type: 'FeatureCollection' as const,
|
||||||
features: props.edges.filter(e => e.to_latitude && e.to_longitude).map(edge => ({
|
features: props.edges.filter(e => e.toLatitude && e.toLongitude).map(edge => ({
|
||||||
type: 'Feature' as const,
|
type: 'Feature' as const,
|
||||||
properties: {
|
properties: {
|
||||||
uuid: edge.to_uuid,
|
uuid: edge.toUuid,
|
||||||
name: edge.to_name,
|
name: edge.toName,
|
||||||
distanceKm: edge.distance_km
|
distanceKm: edge.distanceKm
|
||||||
},
|
},
|
||||||
geometry: {
|
geometry: {
|
||||||
type: 'Point' as const,
|
type: 'Point' as const,
|
||||||
coordinates: [edge.to_longitude!, edge.to_latitude!]
|
coordinates: [edge.toLongitude!, edge.toLatitude!]
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const fetchRouteGeometry = async (stage: RouteStage): Promise<[number, number][]
|
|||||||
if (stage.transportType === 'auto' || stage.transportType === 'rail') {
|
if (stage.transportType === 'auto' || stage.transportType === 'rail') {
|
||||||
try {
|
try {
|
||||||
const RouteDocument = stage.transportType === 'auto' ? GetAutoRouteDocument : GetRailRouteDocument
|
const RouteDocument = stage.transportType === 'auto' ? GetAutoRouteDocument : GetRailRouteDocument
|
||||||
const routeField = stage.transportType === 'auto' ? 'auto_route' : 'rail_route'
|
const routeField = stage.transportType === 'auto' ? 'autoRoute' : 'railRoute'
|
||||||
|
|
||||||
const routeData = await execute(RouteDocument, {
|
const routeData = await execute(RouteDocument, {
|
||||||
fromLat: stage.fromLat,
|
fromLat: stage.fromLat,
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const fetchStageGeometry = async (stage: RouteStage, routeIndex: number, stageIn
|
|||||||
if (stage.transportType === 'auto' || stage.transportType === 'rail') {
|
if (stage.transportType === 'auto' || stage.transportType === 'rail') {
|
||||||
try {
|
try {
|
||||||
const RouteDocument = stage.transportType === 'auto' ? GetAutoRouteDocument : GetRailRouteDocument
|
const RouteDocument = stage.transportType === 'auto' ? GetAutoRouteDocument : GetRailRouteDocument
|
||||||
const routeField = stage.transportType === 'auto' ? 'auto_route' : 'rail_route'
|
const routeField = stage.transportType === 'auto' ? 'autoRoute' : 'railRoute'
|
||||||
|
|
||||||
const routeData = await execute(RouteDocument, { fromLat, fromLon, toLat, toLon }, 'public', 'geo') as Record<string, any>
|
const routeData = await execute(RouteDocument, { fromLat, fromLon, toLat, toLon }, 'public', 'geo') as Record<string, any>
|
||||||
const geometry = routeData?.[routeField]?.geometry
|
const geometry = routeData?.[routeField]?.geometry
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ const serverClusteredGeoJson = computed(() => ({
|
|||||||
id: point!.id,
|
id: point!.id,
|
||||||
name: point!.name,
|
name: point!.name,
|
||||||
count: point!.count ?? 1,
|
count: point!.count ?? 1,
|
||||||
expansionZoom: point!.expansion_zoom,
|
expansionZoom: point!.expansionZoom,
|
||||||
isCluster: (point!.count ?? 1) > 1
|
isCluster: (point!.count ?? 1) > 1
|
||||||
},
|
},
|
||||||
geometry: {
|
geometry: {
|
||||||
@@ -246,7 +246,7 @@ const serverClusteredGeoJsonByType = computed(() => {
|
|||||||
id: point!.id,
|
id: point!.id,
|
||||||
name: point!.name,
|
name: point!.name,
|
||||||
count: point!.count ?? 1,
|
count: point!.count ?? 1,
|
||||||
expansionZoom: point!.expansion_zoom,
|
expansionZoom: point!.expansionZoom,
|
||||||
isCluster: (point!.count ?? 1) > 1,
|
isCluster: (point!.count ?? 1) > 1,
|
||||||
type
|
type
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
<!-- Transport icons bottom -->
|
<!-- Transport icons bottom -->
|
||||||
<div v-if="hub.transport_types?.length" class="flex items-center gap-1 pt-1">
|
<div v-if="hub.transportTypes?.length" class="flex items-center gap-1 pt-1">
|
||||||
<Icon v-if="hasTransport('auto')" name="lucide:truck" size="14" class="text-base-content/50" />
|
<Icon v-if="hasTransport('auto')" name="lucide:truck" size="14" class="text-base-content/50" />
|
||||||
<Icon v-if="hasTransport('rail')" name="lucide:train-front" size="14" class="text-base-content/50" />
|
<Icon v-if="hasTransport('rail')" name="lucide:train-front" size="14" class="text-base-content/50" />
|
||||||
<Icon v-if="hasTransport('sea')" name="lucide:ship" size="14" class="text-base-content/50" />
|
<Icon v-if="hasTransport('sea')" name="lucide:ship" size="14" class="text-base-content/50" />
|
||||||
@@ -58,12 +58,12 @@ interface Hub {
|
|||||||
uuid?: string | null
|
uuid?: string | null
|
||||||
name?: string | null
|
name?: string | null
|
||||||
country?: string | null
|
country?: string | null
|
||||||
country_code?: string | null
|
countryCode?: string | null
|
||||||
latitude?: number | null
|
latitude?: number | null
|
||||||
longitude?: number | null
|
longitude?: number | null
|
||||||
distance?: string
|
distance?: string
|
||||||
distance_km?: number | null
|
distanceKm?: number | null
|
||||||
transport_types?: (string | null)[] | null
|
transportTypes?: (string | null)[] | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -91,16 +91,16 @@ const isoToEmoji = (code: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const countryFlag = computed(() => {
|
const countryFlag = computed(() => {
|
||||||
if (props.hub.country_code) {
|
if (props.hub.countryCode) {
|
||||||
return isoToEmoji(props.hub.country_code)
|
return isoToEmoji(props.hub.countryCode)
|
||||||
}
|
}
|
||||||
return '🌍'
|
return '🌍'
|
||||||
})
|
})
|
||||||
|
|
||||||
const hasTransport = (type: string) => props.hub.transport_types?.some(t => t === type)
|
const hasTransport = (type: string) => props.hub.transportTypes?.some(t => t === type)
|
||||||
const distanceLabel = computed(() => {
|
const distanceLabel = computed(() => {
|
||||||
if (props.hub.distance) return props.hub.distance
|
if (props.hub.distance) return props.hub.distance
|
||||||
if (props.hub.distance_km != null) return `${Math.round(props.hub.distance_km)} km`
|
if (props.hub.distanceKm != null) return `${Math.round(props.hub.distanceKm)} km`
|
||||||
return ''
|
return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -173,13 +173,13 @@
|
|||||||
:key="offer.uuid ?? index"
|
:key="offer.uuid ?? index"
|
||||||
:supplier-name="getOfferSupplierName(offer)"
|
:supplier-name="getOfferSupplierName(offer)"
|
||||||
:location-name="offer.country || ''"
|
:location-name="offer.country || ''"
|
||||||
:product-name="offer.product_name"
|
:product-name="offer.productName"
|
||||||
:price-per-unit="offer.price_per_unit ? Number(offer.price_per_unit) : null"
|
:price-per-unit="offer.pricePerUnit ? Number(offer.pricePerUnit) : null"
|
||||||
:quantity="offer.quantity"
|
:quantity="offer.quantity"
|
||||||
:currency="offer.currency"
|
:currency="offer.currency"
|
||||||
:unit="offer.unit"
|
:unit="offer.unit"
|
||||||
:stages="getOfferStages(offer)"
|
:stages="getOfferStages(offer)"
|
||||||
:total-time-seconds="offer.routes?.[0]?.total_time_seconds ?? null"
|
:total-time-seconds="offer.routes?.[0]?.totalTimeSeconds ?? null"
|
||||||
@select="onOfferSelect(offer)"
|
@select="onOfferSelect(offer)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -353,7 +353,7 @@ const relatedHubs = computed(() => props.relatedHubs ?? [])
|
|||||||
const relatedSuppliers = computed(() => props.relatedSuppliers ?? [])
|
const relatedSuppliers = computed(() => props.relatedSuppliers ?? [])
|
||||||
const relatedOffers = computed(() => props.relatedOffers ?? [])
|
const relatedOffers = computed(() => props.relatedOffers ?? [])
|
||||||
const offersWithPrice = computed(() =>
|
const offersWithPrice = computed(() =>
|
||||||
relatedOffers.value.filter(o => o?.price_per_unit != null)
|
relatedOffers.value.filter(o => o?.pricePerUnit != null)
|
||||||
)
|
)
|
||||||
|
|
||||||
const suppliersByUuid = computed(() => {
|
const suppliersByUuid = computed(() => {
|
||||||
@@ -370,9 +370,9 @@ const suppliersByUuid = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getOfferSupplierName = (offer: InfoOfferItem) => {
|
const getOfferSupplierName = (offer: InfoOfferItem) => {
|
||||||
if (offer.supplier_name) return offer.supplier_name
|
if (offer.supplierName) return offer.supplierName
|
||||||
if (offer.supplier_uuid && suppliersByUuid.value.has(offer.supplier_uuid)) {
|
if (offer.supplierUuid && suppliersByUuid.value.has(offer.supplierUuid)) {
|
||||||
return suppliersByUuid.value.get(offer.supplier_uuid)
|
return suppliersByUuid.value.get(offer.supplierUuid)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -441,11 +441,11 @@ const formatPrice = (price: number | string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const railHubs = computed(() =>
|
const railHubs = computed(() =>
|
||||||
relatedHubs.value.filter(h => h.transport_types?.includes('rail'))
|
relatedHubs.value.filter(h => h.transportTypes?.includes('rail'))
|
||||||
)
|
)
|
||||||
|
|
||||||
const seaHubs = computed(() =>
|
const seaHubs = computed(() =>
|
||||||
relatedHubs.value.filter(h => h.transport_types?.includes('sea'))
|
relatedHubs.value.filter(h => h.transportTypes?.includes('sea'))
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mock KYC teaser data (will be replaced with real data later)
|
// Mock KYC teaser data (will be replaced with real data later)
|
||||||
@@ -473,7 +473,7 @@ const onProductSelect = (product: InfoProductItem) => {
|
|||||||
|
|
||||||
const onOfferSelect = (offer: InfoOfferItem) => {
|
const onOfferSelect = (offer: InfoOfferItem) => {
|
||||||
if (offer.uuid) {
|
if (offer.uuid) {
|
||||||
emit('select-offer', { uuid: offer.uuid, productUuid: offer.product_uuid })
|
emit('select-offer', { uuid: offer.uuid, productUuid: offer.productUuid })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,10 +495,10 @@ const getOfferStages = (offer: InfoOfferItem) => {
|
|||||||
return route.stages
|
return route.stages
|
||||||
.filter((stage): stage is NonNullable<RouteStage> => stage !== null)
|
.filter((stage): stage is NonNullable<RouteStage> => stage !== null)
|
||||||
.map(stage => ({
|
.map(stage => ({
|
||||||
transportType: stage.transport_type,
|
transportType: stage.transportType,
|
||||||
distanceKm: stage.distance_km,
|
distanceKm: stage.distanceKm,
|
||||||
travelTimeSeconds: stage.travel_time_seconds,
|
travelTimeSeconds: stage.travelTimeSeconds,
|
||||||
fromName: stage.from_name
|
fromName: stage.fromName
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -37,15 +37,15 @@
|
|||||||
>
|
>
|
||||||
<OfferResultCard
|
<OfferResultCard
|
||||||
grouped
|
grouped
|
||||||
:supplier-name="offer.supplier_name"
|
:supplier-name="offer.supplierName"
|
||||||
:location-name="offer.country || ''"
|
:location-name="offer.country || ''"
|
||||||
:product-name="offer.product_name"
|
:product-name="offer.productName"
|
||||||
:price-per-unit="offer.price_per_unit ? Number(offer.price_per_unit) : null"
|
:price-per-unit="offer.pricePerUnit ? Number(offer.pricePerUnit) : null"
|
||||||
:quantity="offer.quantity"
|
:quantity="offer.quantity"
|
||||||
:currency="offer.currency"
|
:currency="offer.currency"
|
||||||
:unit="offer.unit"
|
:unit="offer.unit"
|
||||||
:stages="getOfferStages(offer)"
|
:stages="getOfferStages(offer)"
|
||||||
:total-time-seconds="offer.routes?.[0]?.total_time_seconds ?? null"
|
:total-time-seconds="offer.routes?.[0]?.totalTimeSeconds ?? null"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,15 +58,15 @@
|
|||||||
@click="emit('select-offer', offer)"
|
@click="emit('select-offer', offer)"
|
||||||
>
|
>
|
||||||
<OfferResultCard
|
<OfferResultCard
|
||||||
:supplier-name="offer.supplier_name"
|
:supplier-name="offer.supplierName"
|
||||||
:location-name="offer.country || ''"
|
:location-name="offer.country || ''"
|
||||||
:product-name="offer.product_name"
|
:product-name="offer.productName"
|
||||||
:price-per-unit="offer.price_per_unit ? Number(offer.price_per_unit) : null"
|
:price-per-unit="offer.pricePerUnit ? Number(offer.pricePerUnit) : null"
|
||||||
:quantity="offer.quantity"
|
:quantity="offer.quantity"
|
||||||
:currency="offer.currency"
|
:currency="offer.currency"
|
||||||
:unit="offer.unit"
|
:unit="offer.unit"
|
||||||
:stages="getOfferStages(offer)"
|
:stages="getOfferStages(offer)"
|
||||||
:total-time-seconds="offer.routes?.[0]?.total_time_seconds ?? null"
|
:total-time-seconds="offer.routes?.[0]?.totalTimeSeconds ?? null"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,23 +78,23 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
interface Offer {
|
interface Offer {
|
||||||
uuid: string
|
uuid: string
|
||||||
product_name?: string | null
|
productName?: string | null
|
||||||
product_uuid?: string | null
|
productUuid?: string | null
|
||||||
supplier_name?: string | null
|
supplierName?: string | null
|
||||||
supplier_uuid?: string | null
|
supplierUuid?: string | null
|
||||||
quantity?: number | string | null
|
quantity?: number | string | null
|
||||||
unit?: string | null
|
unit?: string | null
|
||||||
price_per_unit?: number | string | null
|
pricePerUnit?: number | string | null
|
||||||
currency?: string | null
|
currency?: string | null
|
||||||
country?: string | null
|
country?: string | null
|
||||||
country_code?: string | null
|
countryCode?: string | null
|
||||||
routes?: Array<{
|
routes?: Array<{
|
||||||
total_time_seconds?: number | null
|
totalTimeSeconds?: number | null
|
||||||
stages?: Array<{
|
stages?: Array<{
|
||||||
transport_type?: string | null
|
transportType?: string | null
|
||||||
distance_km?: number | null
|
distanceKm?: number | null
|
||||||
travel_time_seconds?: number | null
|
travelTimeSeconds?: number | null
|
||||||
from_name?: string | null
|
fromName?: string | null
|
||||||
} | null> | null
|
} | null> | null
|
||||||
} | null> | null
|
} | null> | null
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ const props = defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const offersWithPrice = computed(() =>
|
const offersWithPrice = computed(() =>
|
||||||
(props.offers || []).filter(o => o?.price_per_unit != null)
|
(props.offers || []).filter(o => o?.pricePerUnit != null)
|
||||||
)
|
)
|
||||||
|
|
||||||
const totalOffers = computed(() => {
|
const totalOffers = computed(() => {
|
||||||
@@ -139,10 +139,10 @@ const getOfferStages = (offer: Offer) => {
|
|||||||
return route.stages
|
return route.stages
|
||||||
.filter((stage): stage is NonNullable<typeof stage> => stage !== null)
|
.filter((stage): stage is NonNullable<typeof stage> => stage !== null)
|
||||||
.map((stage) => ({
|
.map((stage) => ({
|
||||||
transportType: stage.transport_type,
|
transportType: stage.transportType,
|
||||||
distanceKm: stage.distance_km,
|
distanceKm: stage.distanceKm,
|
||||||
travelTimeSeconds: stage.travel_time_seconds,
|
travelTimeSeconds: stage.travelTimeSeconds,
|
||||||
fromName: stage.from_name
|
fromName: stage.fromName
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export type Scalars = {
|
|||||||
export type ClusterPoint = {
|
export type ClusterPoint = {
|
||||||
__typename?: 'ClusterPoint';
|
__typename?: 'ClusterPoint';
|
||||||
count?: Maybe<Scalars['Int']['output']>;
|
count?: Maybe<Scalars['Int']['output']>;
|
||||||
expansion_zoom?: Maybe<Scalars['Int']['output']>;
|
expansionZoom?: Maybe<Scalars['Int']['output']>;
|
||||||
id?: Maybe<Scalars['String']['output']>;
|
id?: Maybe<Scalars['String']['output']>;
|
||||||
latitude?: Maybe<Scalars['Float']['output']>;
|
latitude?: Maybe<Scalars['Float']['output']>;
|
||||||
longitude?: Maybe<Scalars['Float']['output']>;
|
longitude?: Maybe<Scalars['Float']['output']>;
|
||||||
@@ -28,51 +28,51 @@ export type ClusterPoint = {
|
|||||||
|
|
||||||
export type Edge = {
|
export type Edge = {
|
||||||
__typename?: 'Edge';
|
__typename?: 'Edge';
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
to_latitude?: Maybe<Scalars['Float']['output']>;
|
toLatitude?: Maybe<Scalars['Float']['output']>;
|
||||||
to_longitude?: Maybe<Scalars['Float']['output']>;
|
toLongitude?: Maybe<Scalars['Float']['output']>;
|
||||||
to_name?: Maybe<Scalars['String']['output']>;
|
toName?: Maybe<Scalars['String']['output']>;
|
||||||
to_uuid?: Maybe<Scalars['String']['output']>;
|
toUuid?: Maybe<Scalars['String']['output']>;
|
||||||
transport_type?: Maybe<Scalars['String']['output']>;
|
transportType?: Maybe<Scalars['String']['output']>;
|
||||||
travel_time_seconds?: Maybe<Scalars['Int']['output']>;
|
travelTimeSeconds?: Maybe<Scalars['Int']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Node = {
|
export type Node = {
|
||||||
__typename?: 'Node';
|
__typename?: 'Node';
|
||||||
country?: Maybe<Scalars['String']['output']>;
|
country?: Maybe<Scalars['String']['output']>;
|
||||||
country_code?: Maybe<Scalars['String']['output']>;
|
countryCode?: Maybe<Scalars['String']['output']>;
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
edges?: Maybe<Array<Maybe<Edge>>>;
|
edges?: Maybe<Array<Maybe<Edge>>>;
|
||||||
latitude?: Maybe<Scalars['Float']['output']>;
|
latitude?: Maybe<Scalars['Float']['output']>;
|
||||||
longitude?: Maybe<Scalars['Float']['output']>;
|
longitude?: Maybe<Scalars['Float']['output']>;
|
||||||
name?: Maybe<Scalars['String']['output']>;
|
name?: Maybe<Scalars['String']['output']>;
|
||||||
synced_at?: Maybe<Scalars['String']['output']>;
|
syncedAt?: Maybe<Scalars['String']['output']>;
|
||||||
transport_types?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
transportTypes?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
||||||
uuid?: Maybe<Scalars['String']['output']>;
|
uuid?: Maybe<Scalars['String']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NodeConnections = {
|
export type NodeConnections = {
|
||||||
__typename?: 'NodeConnections';
|
__typename?: 'NodeConnections';
|
||||||
auto_edges?: Maybe<Array<Maybe<Edge>>>;
|
autoEdges?: Maybe<Array<Maybe<Edge>>>;
|
||||||
hub?: Maybe<Node>;
|
hub?: Maybe<Node>;
|
||||||
rail_edges?: Maybe<Array<Maybe<Edge>>>;
|
railEdges?: Maybe<Array<Maybe<Edge>>>;
|
||||||
rail_node?: Maybe<Node>;
|
railNode?: Maybe<Node>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type OfferNode = {
|
export type OfferNode = {
|
||||||
__typename?: 'OfferNode';
|
__typename?: 'OfferNode';
|
||||||
country?: Maybe<Scalars['String']['output']>;
|
country?: Maybe<Scalars['String']['output']>;
|
||||||
country_code?: Maybe<Scalars['String']['output']>;
|
countryCode?: Maybe<Scalars['String']['output']>;
|
||||||
currency?: Maybe<Scalars['String']['output']>;
|
currency?: Maybe<Scalars['String']['output']>;
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
latitude?: Maybe<Scalars['Float']['output']>;
|
latitude?: Maybe<Scalars['Float']['output']>;
|
||||||
longitude?: Maybe<Scalars['Float']['output']>;
|
longitude?: Maybe<Scalars['Float']['output']>;
|
||||||
price_per_unit?: Maybe<Scalars['String']['output']>;
|
pricePerUnit?: Maybe<Scalars['String']['output']>;
|
||||||
product_name?: Maybe<Scalars['String']['output']>;
|
productName?: Maybe<Scalars['String']['output']>;
|
||||||
product_uuid?: Maybe<Scalars['String']['output']>;
|
productUuid?: Maybe<Scalars['String']['output']>;
|
||||||
quantity?: Maybe<Scalars['String']['output']>;
|
quantity?: Maybe<Scalars['String']['output']>;
|
||||||
supplier_name?: Maybe<Scalars['String']['output']>;
|
supplierName?: Maybe<Scalars['String']['output']>;
|
||||||
supplier_uuid?: Maybe<Scalars['String']['output']>;
|
supplierUuid?: Maybe<Scalars['String']['output']>;
|
||||||
unit?: Maybe<Scalars['String']['output']>;
|
unit?: Maybe<Scalars['String']['output']>;
|
||||||
uuid?: Maybe<Scalars['String']['output']>;
|
uuid?: Maybe<Scalars['String']['output']>;
|
||||||
};
|
};
|
||||||
@@ -80,18 +80,18 @@ export type OfferNode = {
|
|||||||
export type OfferWithRoute = {
|
export type OfferWithRoute = {
|
||||||
__typename?: 'OfferWithRoute';
|
__typename?: 'OfferWithRoute';
|
||||||
country?: Maybe<Scalars['String']['output']>;
|
country?: Maybe<Scalars['String']['output']>;
|
||||||
country_code?: Maybe<Scalars['String']['output']>;
|
countryCode?: Maybe<Scalars['String']['output']>;
|
||||||
currency?: Maybe<Scalars['String']['output']>;
|
currency?: Maybe<Scalars['String']['output']>;
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
latitude?: Maybe<Scalars['Float']['output']>;
|
latitude?: Maybe<Scalars['Float']['output']>;
|
||||||
longitude?: Maybe<Scalars['Float']['output']>;
|
longitude?: Maybe<Scalars['Float']['output']>;
|
||||||
price_per_unit?: Maybe<Scalars['String']['output']>;
|
pricePerUnit?: Maybe<Scalars['String']['output']>;
|
||||||
product_name?: Maybe<Scalars['String']['output']>;
|
productName?: Maybe<Scalars['String']['output']>;
|
||||||
product_uuid?: Maybe<Scalars['String']['output']>;
|
productUuid?: Maybe<Scalars['String']['output']>;
|
||||||
quantity?: Maybe<Scalars['String']['output']>;
|
quantity?: Maybe<Scalars['String']['output']>;
|
||||||
routes?: Maybe<Array<Maybe<RoutePath>>>;
|
routes?: Maybe<Array<Maybe<RoutePath>>>;
|
||||||
supplier_name?: Maybe<Scalars['String']['output']>;
|
supplierName?: Maybe<Scalars['String']['output']>;
|
||||||
supplier_uuid?: Maybe<Scalars['String']['output']>;
|
supplierUuid?: Maybe<Scalars['String']['output']>;
|
||||||
unit?: Maybe<Scalars['String']['output']>;
|
unit?: Maybe<Scalars['String']['output']>;
|
||||||
uuid?: Maybe<Scalars['String']['output']>;
|
uuid?: Maybe<Scalars['String']['output']>;
|
||||||
};
|
};
|
||||||
@@ -99,126 +99,126 @@ export type OfferWithRoute = {
|
|||||||
export type Product = {
|
export type Product = {
|
||||||
__typename?: 'Product';
|
__typename?: 'Product';
|
||||||
name?: Maybe<Scalars['String']['output']>;
|
name?: Maybe<Scalars['String']['output']>;
|
||||||
offers_count?: Maybe<Scalars['Int']['output']>;
|
offersCount?: Maybe<Scalars['Int']['output']>;
|
||||||
uuid?: Maybe<Scalars['String']['output']>;
|
uuid?: Maybe<Scalars['String']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ProductRouteOption = {
|
export type ProductRouteOption = {
|
||||||
__typename?: 'ProductRouteOption';
|
__typename?: 'ProductRouteOption';
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
routes?: Maybe<Array<Maybe<RoutePath>>>;
|
routes?: Maybe<Array<Maybe<RoutePath>>>;
|
||||||
source_lat?: Maybe<Scalars['Float']['output']>;
|
sourceLat?: Maybe<Scalars['Float']['output']>;
|
||||||
source_lon?: Maybe<Scalars['Float']['output']>;
|
sourceLon?: Maybe<Scalars['Float']['output']>;
|
||||||
source_name?: Maybe<Scalars['String']['output']>;
|
sourceName?: Maybe<Scalars['String']['output']>;
|
||||||
source_uuid?: Maybe<Scalars['String']['output']>;
|
sourceUuid?: Maybe<Scalars['String']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Query = {
|
export type Query = {
|
||||||
__typename?: 'Query';
|
__typename?: 'Query';
|
||||||
auto_route?: Maybe<Route>;
|
autoRoute?: Maybe<Route>;
|
||||||
clustered_nodes: Array<ClusterPoint>;
|
clusteredNodes: Array<ClusterPoint>;
|
||||||
hub_countries: Array<Scalars['String']['output']>;
|
hubCountries: Array<Scalars['String']['output']>;
|
||||||
hubs_for_product: Array<Node>;
|
hubsForProduct: Array<Node>;
|
||||||
hubs_list: Array<Node>;
|
hubsList: Array<Node>;
|
||||||
hubs_near_offer: Array<Node>;
|
hubsNearOffer: Array<Node>;
|
||||||
nearest_hubs: Array<Node>;
|
nearestHubs: Array<Node>;
|
||||||
nearest_nodes: Array<Node>;
|
nearestNodes: Array<Node>;
|
||||||
nearest_offers: Array<OfferWithRoute>;
|
nearestOffers: Array<OfferWithRoute>;
|
||||||
nearest_suppliers: Array<Supplier>;
|
nearestSuppliers: Array<Supplier>;
|
||||||
node?: Maybe<Node>;
|
node?: Maybe<Node>;
|
||||||
node_connections?: Maybe<NodeConnections>;
|
nodeConnections?: Maybe<NodeConnections>;
|
||||||
nodes: Array<Node>;
|
nodes: Array<Node>;
|
||||||
nodes_count: Scalars['Int']['output'];
|
nodesCount: Scalars['Int']['output'];
|
||||||
offer_to_hub?: Maybe<ProductRouteOption>;
|
offerToHub?: Maybe<ProductRouteOption>;
|
||||||
offers_by_hub: Array<ProductRouteOption>;
|
offersByHub: Array<ProductRouteOption>;
|
||||||
offers_by_product: Array<OfferNode>;
|
offersByProduct: Array<OfferNode>;
|
||||||
offers_by_supplier_product: Array<OfferNode>;
|
offersBySupplierProduct: Array<OfferNode>;
|
||||||
products: Array<Product>;
|
products: Array<Product>;
|
||||||
products_by_supplier: Array<Product>;
|
productsBySupplier: Array<Product>;
|
||||||
products_list: Array<Product>;
|
productsList: Array<Product>;
|
||||||
products_near_hub: Array<Product>;
|
productsNearHub: Array<Product>;
|
||||||
rail_route?: Maybe<Route>;
|
railRoute?: Maybe<Route>;
|
||||||
route_to_coordinate?: Maybe<ProductRouteOption>;
|
routeToCoordinate?: Maybe<ProductRouteOption>;
|
||||||
suppliers: Array<Supplier>;
|
suppliers: Array<Supplier>;
|
||||||
suppliers_for_product: Array<Supplier>;
|
suppliersForProduct: Array<Supplier>;
|
||||||
suppliers_list: Array<Supplier>;
|
suppliersList: Array<Supplier>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryAuto_RouteArgs = {
|
export type QueryAutoRouteArgs = {
|
||||||
from_lat: Scalars['Float']['input'];
|
fromLat: Scalars['Float']['input'];
|
||||||
from_lon: Scalars['Float']['input'];
|
fromLon: Scalars['Float']['input'];
|
||||||
to_lat: Scalars['Float']['input'];
|
toLat: Scalars['Float']['input'];
|
||||||
to_lon: Scalars['Float']['input'];
|
toLon: Scalars['Float']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryClustered_NodesArgs = {
|
export type QueryClusteredNodesArgs = {
|
||||||
east: Scalars['Float']['input'];
|
east: Scalars['Float']['input'];
|
||||||
node_type?: InputMaybe<Scalars['String']['input']>;
|
nodeType?: InputMaybe<Scalars['String']['input']>;
|
||||||
north: Scalars['Float']['input'];
|
north: Scalars['Float']['input'];
|
||||||
south: Scalars['Float']['input'];
|
south: Scalars['Float']['input'];
|
||||||
transport_type?: InputMaybe<Scalars['String']['input']>;
|
transportType?: InputMaybe<Scalars['String']['input']>;
|
||||||
west: Scalars['Float']['input'];
|
west: Scalars['Float']['input'];
|
||||||
zoom: Scalars['Int']['input'];
|
zoom: Scalars['Int']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryHubs_For_ProductArgs = {
|
export type QueryHubsForProductArgs = {
|
||||||
product_uuid: Scalars['String']['input'];
|
productUuid: Scalars['String']['input'];
|
||||||
radius_km?: InputMaybe<Scalars['Float']['input']>;
|
radiusKm?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryHubs_ListArgs = {
|
export type QueryHubsListArgs = {
|
||||||
country?: InputMaybe<Scalars['String']['input']>;
|
country?: InputMaybe<Scalars['String']['input']>;
|
||||||
east?: InputMaybe<Scalars['Float']['input']>;
|
east?: InputMaybe<Scalars['Float']['input']>;
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
north?: InputMaybe<Scalars['Float']['input']>;
|
north?: InputMaybe<Scalars['Float']['input']>;
|
||||||
offset?: InputMaybe<Scalars['Int']['input']>;
|
offset?: InputMaybe<Scalars['Int']['input']>;
|
||||||
south?: InputMaybe<Scalars['Float']['input']>;
|
south?: InputMaybe<Scalars['Float']['input']>;
|
||||||
transport_type?: InputMaybe<Scalars['String']['input']>;
|
transportType?: InputMaybe<Scalars['String']['input']>;
|
||||||
west?: InputMaybe<Scalars['Float']['input']>;
|
west?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryHubs_Near_OfferArgs = {
|
export type QueryHubsNearOfferArgs = {
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
offer_uuid: Scalars['String']['input'];
|
offerUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNearest_HubsArgs = {
|
export type QueryNearestHubsArgs = {
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
lon: Scalars['Float']['input'];
|
lon: Scalars['Float']['input'];
|
||||||
product_uuid?: InputMaybe<Scalars['String']['input']>;
|
productUuid?: InputMaybe<Scalars['String']['input']>;
|
||||||
radius?: InputMaybe<Scalars['Float']['input']>;
|
radius?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNearest_NodesArgs = {
|
export type QueryNearestNodesArgs = {
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
lon: Scalars['Float']['input'];
|
lon: Scalars['Float']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNearest_OffersArgs = {
|
export type QueryNearestOffersArgs = {
|
||||||
hub_uuid?: InputMaybe<Scalars['String']['input']>;
|
hubUuid?: InputMaybe<Scalars['String']['input']>;
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
lon: Scalars['Float']['input'];
|
lon: Scalars['Float']['input'];
|
||||||
product_uuid?: InputMaybe<Scalars['String']['input']>;
|
productUuid?: InputMaybe<Scalars['String']['input']>;
|
||||||
radius?: InputMaybe<Scalars['Float']['input']>;
|
radius?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNearest_SuppliersArgs = {
|
export type QueryNearestSuppliersArgs = {
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
lon: Scalars['Float']['input'];
|
lon: Scalars['Float']['input'];
|
||||||
product_uuid?: InputMaybe<Scalars['String']['input']>;
|
productUuid?: InputMaybe<Scalars['String']['input']>;
|
||||||
radius?: InputMaybe<Scalars['Float']['input']>;
|
radius?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,9 +228,9 @@ export type QueryNodeArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNode_ConnectionsArgs = {
|
export type QueryNodeConnectionsArgs = {
|
||||||
limit_auto?: InputMaybe<Scalars['Int']['input']>;
|
limitAuto?: InputMaybe<Scalars['Int']['input']>;
|
||||||
limit_rail?: InputMaybe<Scalars['Int']['input']>;
|
limitRail?: InputMaybe<Scalars['Int']['input']>;
|
||||||
uuid: Scalars['String']['input'];
|
uuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -243,51 +243,51 @@ export type QueryNodesArgs = {
|
|||||||
offset?: InputMaybe<Scalars['Int']['input']>;
|
offset?: InputMaybe<Scalars['Int']['input']>;
|
||||||
search?: InputMaybe<Scalars['String']['input']>;
|
search?: InputMaybe<Scalars['String']['input']>;
|
||||||
south?: InputMaybe<Scalars['Float']['input']>;
|
south?: InputMaybe<Scalars['Float']['input']>;
|
||||||
transport_type?: InputMaybe<Scalars['String']['input']>;
|
transportType?: InputMaybe<Scalars['String']['input']>;
|
||||||
west?: InputMaybe<Scalars['Float']['input']>;
|
west?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryNodes_CountArgs = {
|
export type QueryNodesCountArgs = {
|
||||||
country?: InputMaybe<Scalars['String']['input']>;
|
country?: InputMaybe<Scalars['String']['input']>;
|
||||||
east?: InputMaybe<Scalars['Float']['input']>;
|
east?: InputMaybe<Scalars['Float']['input']>;
|
||||||
north?: InputMaybe<Scalars['Float']['input']>;
|
north?: InputMaybe<Scalars['Float']['input']>;
|
||||||
south?: InputMaybe<Scalars['Float']['input']>;
|
south?: InputMaybe<Scalars['Float']['input']>;
|
||||||
transport_type?: InputMaybe<Scalars['String']['input']>;
|
transportType?: InputMaybe<Scalars['String']['input']>;
|
||||||
west?: InputMaybe<Scalars['Float']['input']>;
|
west?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryOffer_To_HubArgs = {
|
export type QueryOfferToHubArgs = {
|
||||||
hub_uuid: Scalars['String']['input'];
|
hubUuid: Scalars['String']['input'];
|
||||||
offer_uuid: Scalars['String']['input'];
|
offerUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryOffers_By_HubArgs = {
|
export type QueryOffersByHubArgs = {
|
||||||
hub_uuid: Scalars['String']['input'];
|
hubUuid: Scalars['String']['input'];
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
product_uuid: Scalars['String']['input'];
|
productUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryOffers_By_ProductArgs = {
|
export type QueryOffersByProductArgs = {
|
||||||
product_uuid: Scalars['String']['input'];
|
productUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryOffers_By_Supplier_ProductArgs = {
|
export type QueryOffersBySupplierProductArgs = {
|
||||||
product_uuid: Scalars['String']['input'];
|
productUuid: Scalars['String']['input'];
|
||||||
supplier_uuid: Scalars['String']['input'];
|
supplierUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryProducts_By_SupplierArgs = {
|
export type QueryProductsBySupplierArgs = {
|
||||||
supplier_uuid: Scalars['String']['input'];
|
supplierUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryProducts_ListArgs = {
|
export type QueryProductsListArgs = {
|
||||||
east?: InputMaybe<Scalars['Float']['input']>;
|
east?: InputMaybe<Scalars['Float']['input']>;
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
north?: InputMaybe<Scalars['Float']['input']>;
|
north?: InputMaybe<Scalars['Float']['input']>;
|
||||||
@@ -297,33 +297,33 @@ export type QueryProducts_ListArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryProducts_Near_HubArgs = {
|
export type QueryProductsNearHubArgs = {
|
||||||
hub_uuid: Scalars['String']['input'];
|
hubUuid: Scalars['String']['input'];
|
||||||
radius_km?: InputMaybe<Scalars['Float']['input']>;
|
radiusKm?: InputMaybe<Scalars['Float']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryRail_RouteArgs = {
|
export type QueryRailRouteArgs = {
|
||||||
from_lat: Scalars['Float']['input'];
|
fromLat: Scalars['Float']['input'];
|
||||||
from_lon: Scalars['Float']['input'];
|
fromLon: Scalars['Float']['input'];
|
||||||
to_lat: Scalars['Float']['input'];
|
toLat: Scalars['Float']['input'];
|
||||||
to_lon: Scalars['Float']['input'];
|
toLon: Scalars['Float']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QueryRoute_To_CoordinateArgs = {
|
export type QueryRouteToCoordinateArgs = {
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
lon: Scalars['Float']['input'];
|
lon: Scalars['Float']['input'];
|
||||||
offer_uuid: Scalars['String']['input'];
|
offerUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QuerySuppliers_For_ProductArgs = {
|
export type QuerySuppliersForProductArgs = {
|
||||||
product_uuid: Scalars['String']['input'];
|
productUuid: Scalars['String']['input'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type QuerySuppliers_ListArgs = {
|
export type QuerySuppliersListArgs = {
|
||||||
country?: InputMaybe<Scalars['String']['input']>;
|
country?: InputMaybe<Scalars['String']['input']>;
|
||||||
east?: InputMaybe<Scalars['Float']['input']>;
|
east?: InputMaybe<Scalars['Float']['input']>;
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
@@ -335,35 +335,35 @@ export type QuerySuppliers_ListArgs = {
|
|||||||
|
|
||||||
export type Route = {
|
export type Route = {
|
||||||
__typename?: 'Route';
|
__typename?: 'Route';
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
geometry?: Maybe<Scalars['JSON']['output']>;
|
geometry?: Maybe<Scalars['JSON']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RoutePath = {
|
export type RoutePath = {
|
||||||
__typename?: 'RoutePath';
|
__typename?: 'RoutePath';
|
||||||
stages?: Maybe<Array<Maybe<RouteStage>>>;
|
stages?: Maybe<Array<Maybe<RouteStage>>>;
|
||||||
total_distance_km?: Maybe<Scalars['Float']['output']>;
|
totalDistanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
total_time_seconds?: Maybe<Scalars['Int']['output']>;
|
totalTimeSeconds?: Maybe<Scalars['Int']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RouteStage = {
|
export type RouteStage = {
|
||||||
__typename?: 'RouteStage';
|
__typename?: 'RouteStage';
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
from_lat?: Maybe<Scalars['Float']['output']>;
|
fromLat?: Maybe<Scalars['Float']['output']>;
|
||||||
from_lon?: Maybe<Scalars['Float']['output']>;
|
fromLon?: Maybe<Scalars['Float']['output']>;
|
||||||
from_name?: Maybe<Scalars['String']['output']>;
|
fromName?: Maybe<Scalars['String']['output']>;
|
||||||
from_uuid?: Maybe<Scalars['String']['output']>;
|
fromUuid?: Maybe<Scalars['String']['output']>;
|
||||||
to_lat?: Maybe<Scalars['Float']['output']>;
|
toLat?: Maybe<Scalars['Float']['output']>;
|
||||||
to_lon?: Maybe<Scalars['Float']['output']>;
|
toLon?: Maybe<Scalars['Float']['output']>;
|
||||||
to_name?: Maybe<Scalars['String']['output']>;
|
toName?: Maybe<Scalars['String']['output']>;
|
||||||
to_uuid?: Maybe<Scalars['String']['output']>;
|
toUuid?: Maybe<Scalars['String']['output']>;
|
||||||
transport_type?: Maybe<Scalars['String']['output']>;
|
transportType?: Maybe<Scalars['String']['output']>;
|
||||||
travel_time_seconds?: Maybe<Scalars['Int']['output']>;
|
travelTimeSeconds?: Maybe<Scalars['Int']['output']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Supplier = {
|
export type Supplier = {
|
||||||
__typename?: 'Supplier';
|
__typename?: 'Supplier';
|
||||||
distance_km?: Maybe<Scalars['Float']['output']>;
|
distanceKm?: Maybe<Scalars['Float']['output']>;
|
||||||
latitude?: Maybe<Scalars['Float']['output']>;
|
latitude?: Maybe<Scalars['Float']['output']>;
|
||||||
longitude?: Maybe<Scalars['Float']['output']>;
|
longitude?: Maybe<Scalars['Float']['output']>;
|
||||||
name?: Maybe<Scalars['String']['output']>;
|
name?: Maybe<Scalars['String']['output']>;
|
||||||
@@ -378,7 +378,7 @@ export type GetAutoRouteQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetAutoRouteQueryResult = { __typename?: 'Query', auto_route?: { __typename?: 'Route', distance_km?: number | null, geometry?: Record<string, unknown> | null } | null };
|
export type GetAutoRouteQueryResult = { __typename?: 'Query', autoRoute?: { __typename?: 'Route', distanceKm?: number | null, geometry?: Record<string, unknown> | null } | null };
|
||||||
|
|
||||||
export type GetClusteredNodesQueryVariables = Exact<{
|
export type GetClusteredNodesQueryVariables = Exact<{
|
||||||
west: Scalars['Float']['input'];
|
west: Scalars['Float']['input'];
|
||||||
@@ -391,19 +391,19 @@ export type GetClusteredNodesQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetClusteredNodesQueryResult = { __typename?: 'Query', clustered_nodes: Array<{ __typename?: 'ClusterPoint', id?: string | null, latitude?: number | null, longitude?: number | null, count?: number | null, expansion_zoom?: number | null, name?: string | null }> };
|
export type GetClusteredNodesQueryResult = { __typename?: 'Query', clusteredNodes: Array<{ __typename?: 'ClusterPoint', id?: string | null, latitude?: number | null, longitude?: number | null, count?: number | null, expansionZoom?: number | null, name?: string | null }> };
|
||||||
|
|
||||||
export type GetHubCountriesQueryVariables = Exact<{ [key: string]: never; }>;
|
export type GetHubCountriesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type GetHubCountriesQueryResult = { __typename?: 'Query', hub_countries: Array<string> };
|
export type GetHubCountriesQueryResult = { __typename?: 'Query', hubCountries: Array<string> };
|
||||||
|
|
||||||
export type GetNodeQueryVariables = Exact<{
|
export type GetNodeQueryVariables = Exact<{
|
||||||
uuid: Scalars['String']['input'];
|
uuid: Scalars['String']['input'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetNodeQueryResult = { __typename?: 'Query', node?: { __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, country_code?: string | null, transport_types?: Array<string | null> | null } | null };
|
export type GetNodeQueryResult = { __typename?: 'Query', node?: { __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array<string | null> | null } | null };
|
||||||
|
|
||||||
export type GetRailRouteQueryVariables = Exact<{
|
export type GetRailRouteQueryVariables = Exact<{
|
||||||
fromLat: Scalars['Float']['input'];
|
fromLat: Scalars['Float']['input'];
|
||||||
@@ -413,7 +413,7 @@ export type GetRailRouteQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetRailRouteQueryResult = { __typename?: 'Query', rail_route?: { __typename?: 'Route', distance_km?: number | null, geometry?: Record<string, unknown> | null } | null };
|
export type GetRailRouteQueryResult = { __typename?: 'Query', railRoute?: { __typename?: 'Route', distanceKm?: number | null, geometry?: Record<string, unknown> | null } | null };
|
||||||
|
|
||||||
export type HubsListQueryVariables = Exact<{
|
export type HubsListQueryVariables = Exact<{
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
@@ -427,7 +427,7 @@ export type HubsListQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type HubsListQueryResult = { __typename?: 'Query', hubs_list: Array<{ __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, country_code?: string | null, transport_types?: Array<string | null> | null }> };
|
export type HubsListQueryResult = { __typename?: 'Query', hubsList: Array<{ __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array<string | null> | null }> };
|
||||||
|
|
||||||
export type NearestHubsQueryVariables = Exact<{
|
export type NearestHubsQueryVariables = Exact<{
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
@@ -438,7 +438,7 @@ export type NearestHubsQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type NearestHubsQueryResult = { __typename?: 'Query', nearest_hubs: Array<{ __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, country_code?: string | null, transport_types?: Array<string | null> | null }> };
|
export type NearestHubsQueryResult = { __typename?: 'Query', nearestHubs: Array<{ __typename?: 'Node', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array<string | null> | null }> };
|
||||||
|
|
||||||
export type NearestOffersQueryVariables = Exact<{
|
export type NearestOffersQueryVariables = Exact<{
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
@@ -450,7 +450,7 @@ export type NearestOffersQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type NearestOffersQueryResult = { __typename?: 'Query', nearest_offers: Array<{ __typename?: 'OfferWithRoute', uuid?: string | null, product_uuid?: string | null, product_name?: string | null, supplier_uuid?: string | null, supplier_name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, country_code?: string | null, price_per_unit?: string | null, currency?: string | null, quantity?: string | null, unit?: string | null, distance_km?: number | null, routes?: Array<{ __typename?: 'RoutePath', total_distance_km?: number | null, total_time_seconds?: number | null, stages?: Array<{ __typename?: 'RouteStage', from_uuid?: string | null, from_name?: string | null, from_lat?: number | null, from_lon?: number | null, to_uuid?: string | null, to_name?: string | null, to_lat?: number | null, to_lon?: number | null, distance_km?: number | null, travel_time_seconds?: number | null, transport_type?: string | null } | null> | null } | null> | null }> };
|
export type NearestOffersQueryResult = { __typename?: 'Query', nearestOffers: Array<{ __typename?: 'OfferWithRoute', uuid?: string | null, productUuid?: string | null, productName?: string | null, supplierUuid?: string | null, supplierName?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, pricePerUnit?: string | null, currency?: string | null, quantity?: string | null, unit?: string | null, distanceKm?: number | null, routes?: Array<{ __typename?: 'RoutePath', totalDistanceKm?: number | null, totalTimeSeconds?: number | null, stages?: Array<{ __typename?: 'RouteStage', fromUuid?: string | null, fromName?: string | null, fromLat?: number | null, fromLon?: number | null, toUuid?: string | null, toName?: string | null, toLat?: number | null, toLon?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null } | null> | null }> };
|
||||||
|
|
||||||
export type NearestSuppliersQueryVariables = Exact<{
|
export type NearestSuppliersQueryVariables = Exact<{
|
||||||
lat: Scalars['Float']['input'];
|
lat: Scalars['Float']['input'];
|
||||||
@@ -461,7 +461,7 @@ export type NearestSuppliersQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type NearestSuppliersQueryResult = { __typename?: 'Query', nearest_suppliers: Array<{ __typename?: 'Supplier', uuid?: string | null }> };
|
export type NearestSuppliersQueryResult = { __typename?: 'Query', nearestSuppliers: Array<{ __typename?: 'Supplier', uuid?: string | null }> };
|
||||||
|
|
||||||
export type ProductsListQueryVariables = Exact<{
|
export type ProductsListQueryVariables = Exact<{
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
@@ -473,7 +473,7 @@ export type ProductsListQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ProductsListQueryResult = { __typename?: 'Query', products_list: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, offers_count?: number | null }> };
|
export type ProductsListQueryResult = { __typename?: 'Query', productsList: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, offersCount?: number | null }> };
|
||||||
|
|
||||||
export type SuppliersListQueryVariables = Exact<{
|
export type SuppliersListQueryVariables = Exact<{
|
||||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||||
@@ -486,17 +486,17 @@ export type SuppliersListQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type SuppliersListQueryResult = { __typename?: 'Query', suppliers_list: Array<{ __typename?: 'Supplier', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null }> };
|
export type SuppliersListQueryResult = { __typename?: 'Query', suppliersList: Array<{ __typename?: 'Supplier', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null }> };
|
||||||
|
|
||||||
|
|
||||||
export const GetAutoRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"auto_route"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"from_lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"from_lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"to_lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"to_lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distance_km"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetAutoRouteQueryResult, GetAutoRouteQueryVariables>;
|
export const GetAutoRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetAutoRouteQueryResult, GetAutoRouteQueryVariables>;
|
||||||
export const GetClusteredNodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetClusteredNodes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"zoom"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"nodeType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clustered_nodes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}},{"kind":"Argument","name":{"kind":"Name","value":"zoom"},"value":{"kind":"Variable","name":{"kind":"Name","value":"zoom"}}},{"kind":"Argument","name":{"kind":"Name","value":"transport_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"node_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"nodeType"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"expansion_zoom"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode<GetClusteredNodesQueryResult, GetClusteredNodesQueryVariables>;
|
export const GetClusteredNodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetClusteredNodes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"zoom"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"nodeType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clusteredNodes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}},{"kind":"Argument","name":{"kind":"Name","value":"zoom"},"value":{"kind":"Variable","name":{"kind":"Name","value":"zoom"}}},{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"nodeType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"nodeType"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"expansionZoom"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode<GetClusteredNodesQueryResult, GetClusteredNodesQueryVariables>;
|
||||||
export const GetHubCountriesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetHubCountries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hub_countries"}}]}}]} as unknown as DocumentNode<GetHubCountriesQueryResult, GetHubCountriesQueryVariables>;
|
export const GetHubCountriesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetHubCountries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hubCountries"}}]}}]} as unknown as DocumentNode<GetHubCountriesQueryResult, GetHubCountriesQueryVariables>;
|
||||||
export const GetNodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"country_code"}},{"kind":"Field","name":{"kind":"Name","value":"transport_types"}}]}}]}}]} as unknown as DocumentNode<GetNodeQueryResult, GetNodeQueryVariables>;
|
export const GetNodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}}]}}]} as unknown as DocumentNode<GetNodeQueryResult, GetNodeQueryVariables>;
|
||||||
export const GetRailRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRailRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rail_route"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"from_lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"from_lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"to_lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"to_lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distance_km"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetRailRouteQueryResult, GetRailRouteQueryVariables>;
|
export const GetRailRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRailRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"railRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetRailRouteQueryResult, GetRailRouteQueryVariables>;
|
||||||
export const HubsListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"HubsList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hubs_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"transport_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"country_code"}},{"kind":"Field","name":{"kind":"Name","value":"transport_types"}}]}}]}}]} as unknown as DocumentNode<HubsListQueryResult, HubsListQueryVariables>;
|
export const HubsListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"HubsList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hubsList"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}}]}}]} as unknown as DocumentNode<HubsListQueryResult, HubsListQueryVariables>;
|
||||||
export const NearestHubsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestHubs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearest_hubs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"product_uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"country_code"}},{"kind":"Field","name":{"kind":"Name","value":"transport_types"}}]}}]}}]} as unknown as DocumentNode<NearestHubsQueryResult, NearestHubsQueryVariables>;
|
export const NearestHubsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestHubs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearestHubs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}}]}}]} as unknown as DocumentNode<NearestHubsQueryResult, NearestHubsQueryVariables>;
|
||||||
export const NearestOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"hubUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearest_offers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"product_uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"hub_uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"hubUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"product_uuid"}},{"kind":"Field","name":{"kind":"Name","value":"product_name"}},{"kind":"Field","name":{"kind":"Name","value":"supplier_uuid"}},{"kind":"Field","name":{"kind":"Name","value":"supplier_name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"country_code"}},{"kind":"Field","name":{"kind":"Name","value":"price_per_unit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"distance_km"}},{"kind":"Field","name":{"kind":"Name","value":"routes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total_distance_km"}},{"kind":"Field","name":{"kind":"Name","value":"total_time_seconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from_uuid"}},{"kind":"Field","name":{"kind":"Name","value":"from_name"}},{"kind":"Field","name":{"kind":"Name","value":"from_lat"}},{"kind":"Field","name":{"kind":"Name","value":"from_lon"}},{"kind":"Field","name":{"kind":"Name","value":"to_uuid"}},{"kind":"Field","name":{"kind":"Name","value":"to_name"}},{"kind":"Field","name":{"kind":"Name","value":"to_lat"}},{"kind":"Field","name":{"kind":"Name","value":"to_lon"}},{"kind":"Field","name":{"kind":"Name","value":"distance_km"}},{"kind":"Field","name":{"kind":"Name","value":"travel_time_seconds"}},{"kind":"Field","name":{"kind":"Name","value":"transport_type"}}]}}]}}]}}]}}]} as unknown as DocumentNode<NearestOffersQueryResult, NearestOffersQueryVariables>;
|
export const NearestOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"hubUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearestOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"hubUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"hubUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"supplierUuid"}},{"kind":"Field","name":{"kind":"Name","value":"supplierName"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"routes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalDistanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"totalTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fromUuid"}},{"kind":"Field","name":{"kind":"Name","value":"fromName"}},{"kind":"Field","name":{"kind":"Name","value":"fromLat"}},{"kind":"Field","name":{"kind":"Name","value":"fromLon"}},{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLat"}},{"kind":"Field","name":{"kind":"Name","value":"toLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]}}]} as unknown as DocumentNode<NearestOffersQueryResult, NearestOffersQueryVariables>;
|
||||||
export const NearestSuppliersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestSuppliers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearest_suppliers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"product_uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}}]}}]}}]} as unknown as DocumentNode<NearestSuppliersQueryResult, NearestSuppliersQueryVariables>;
|
export const NearestSuppliersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"NearestSuppliers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"radius"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nearestSuppliers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"lat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lat"}}},{"kind":"Argument","name":{"kind":"Name","value":"lon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lon"}}},{"kind":"Argument","name":{"kind":"Name","value":"radius"},"value":{"kind":"Variable","name":{"kind":"Name","value":"radius"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}}]}}]}}]} as unknown as DocumentNode<NearestSuppliersQueryResult, NearestSuppliersQueryVariables>;
|
||||||
export const ProductsListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProductsList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"products_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"offers_count"}}]}}]}}]} as unknown as DocumentNode<ProductsListQueryResult, ProductsListQueryVariables>;
|
export const ProductsListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProductsList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"productsList"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}}]}}]}}]} as unknown as DocumentNode<ProductsListQueryResult, ProductsListQueryVariables>;
|
||||||
export const SuppliersListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SuppliersList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"suppliers_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}}]}}]} as unknown as DocumentNode<SuppliersListQueryResult, SuppliersListQueryVariables>;
|
export const SuppliersListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SuppliersList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"west"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"south"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"east"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"north"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"suppliersList"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"west"},"value":{"kind":"Variable","name":{"kind":"Name","value":"west"}}},{"kind":"Argument","name":{"kind":"Name","value":"south"},"value":{"kind":"Variable","name":{"kind":"Name","value":"south"}}},{"kind":"Argument","name":{"kind":"Name","value":"east"},"value":{"kind":"Variable","name":{"kind":"Name","value":"east"}}},{"kind":"Argument","name":{"kind":"Name","value":"north"},"value":{"kind":"Variable","name":{"kind":"Name","value":"north"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}}]}}]} as unknown as DocumentNode<SuppliersListQueryResult, SuppliersListQueryVariables>;
|
||||||
@@ -4,8 +4,8 @@ import { HubsListDocument, GetHubCountriesDocument, NearestHubsDocument } from '
|
|||||||
const PAGE_SIZE = 500
|
const PAGE_SIZE = 500
|
||||||
|
|
||||||
// Type from codegen - exported for use in pages
|
// Type from codegen - exported for use in pages
|
||||||
export type CatalogHubItem = NonNullable<NonNullable<HubsListQueryResult['hubs_list']>[number]>
|
export type CatalogHubItem = NonNullable<NonNullable<HubsListQueryResult['hubsList']>[number]>
|
||||||
export type CatalogNearestHubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearest_hubs']>[number]>
|
export type CatalogNearestHubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearestHubs']>[number]>
|
||||||
|
|
||||||
// Internal aliases
|
// Internal aliases
|
||||||
type HubItem = CatalogHubItem
|
type HubItem = CatalogHubItem
|
||||||
@@ -75,7 +75,7 @@ export function useCatalogHubs() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
const next = (data?.nearest_hubs || []).filter((h): h is NearestHubItem => h !== null)
|
const next = (data?.nearestHubs || []).filter((h): h is NearestHubItem => h !== null)
|
||||||
items.value = next
|
items.value = next
|
||||||
total.value = next.length
|
total.value = next.length
|
||||||
isInitialized.value = true
|
isInitialized.value = true
|
||||||
@@ -103,7 +103,7 @@ export function useCatalogHubs() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
const next = (data?.hubs_list || []).filter((h): h is HubItem => h !== null)
|
const next = (data?.hubsList || []).filter((h): h is HubItem => h !== null)
|
||||||
items.value = replace ? next : items.value.concat(next)
|
items.value = replace ? next : items.value.concat(next)
|
||||||
// hubsList doesn't return total count, estimate from fetched items
|
// hubsList doesn't return total count, estimate from fetched items
|
||||||
if (replace) {
|
if (replace) {
|
||||||
@@ -120,7 +120,7 @@ export function useCatalogHubs() {
|
|||||||
const loadCountries = async () => {
|
const loadCountries = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await execute(GetHubCountriesDocument, {}, 'public', 'geo')
|
const data = await execute(GetHubCountriesDocument, {}, 'public', 'geo')
|
||||||
countries.value = (data?.hub_countries || []).filter((c): c is string => c !== null)
|
countries.value = (data?.hubCountries || []).filter((c): c is string => c !== null)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Failed to load hub countries', e)
|
console.error('Failed to load hub countries', e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import {
|
|||||||
type NodeEntity = NonNullable<GetNodeQueryResult['node']>
|
type NodeEntity = NonNullable<GetNodeQueryResult['node']>
|
||||||
type OfferEntity = NonNullable<GetOfferQueryResult['getOffer']>
|
type OfferEntity = NonNullable<GetOfferQueryResult['getOffer']>
|
||||||
type SupplierProfile = NonNullable<GetSupplierProfileQueryResult['getSupplierProfile']>
|
type SupplierProfile = NonNullable<GetSupplierProfileQueryResult['getSupplierProfile']>
|
||||||
type HubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearest_hubs']>[number]>
|
type HubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearestHubs']>[number]>
|
||||||
type OfferItem = NonNullable<NonNullable<NearestOffersQueryResult['nearest_offers']>[number]>
|
type OfferItem = NonNullable<NonNullable<NearestOffersQueryResult['nearestOffers']>[number]>
|
||||||
|
|
||||||
// Product type (aggregated from offers)
|
// Product type (aggregated from offers)
|
||||||
export interface InfoProductItem {
|
export interface InfoProductItem {
|
||||||
@@ -136,27 +136,27 @@ export function useCatalogInfo() {
|
|||||||
const productsMap = new Map<string, InfoProductItem>()
|
const productsMap = new Map<string, InfoProductItem>()
|
||||||
const suppliersMap = new Map<string, { uuid: string; name: string; latitude?: number | null; longitude?: number | null }>()
|
const suppliersMap = new Map<string, { uuid: string; name: string; latitude?: number | null; longitude?: number | null }>()
|
||||||
|
|
||||||
offersData?.nearest_offers?.forEach(offer => {
|
offersData?.nearestOffers?.forEach(offer => {
|
||||||
if (!offer) return
|
if (!offer) return
|
||||||
// Products
|
// Products
|
||||||
if (offer.product_uuid && offer.product_name) {
|
if (offer.productUuid && offer.productName) {
|
||||||
const existing = productsMap.get(offer.product_uuid)
|
const existing = productsMap.get(offer.productUuid)
|
||||||
if (existing) {
|
if (existing) {
|
||||||
existing.offersCount = (existing.offersCount || 0) + 1
|
existing.offersCount = (existing.offersCount || 0) + 1
|
||||||
} else {
|
} else {
|
||||||
productsMap.set(offer.product_uuid, {
|
productsMap.set(offer.productUuid, {
|
||||||
uuid: offer.product_uuid,
|
uuid: offer.productUuid,
|
||||||
name: offer.product_name,
|
name: offer.productName,
|
||||||
offersCount: 1
|
offersCount: 1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppliers (extract from offers)
|
// Suppliers (extract from offers)
|
||||||
if (offer.supplier_uuid && !suppliersMap.has(offer.supplier_uuid)) {
|
if (offer.supplierUuid && !suppliersMap.has(offer.supplierUuid)) {
|
||||||
suppliersMap.set(offer.supplier_uuid, {
|
suppliersMap.set(offer.supplierUuid, {
|
||||||
uuid: offer.supplier_uuid,
|
uuid: offer.supplierUuid,
|
||||||
name: offer.supplier_name || 'Supplier',
|
name: offer.supplierName || 'Supplier',
|
||||||
latitude: offer.latitude,
|
latitude: offer.latitude,
|
||||||
longitude: offer.longitude
|
longitude: offer.longitude
|
||||||
})
|
})
|
||||||
@@ -264,7 +264,7 @@ export function useCatalogInfo() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
).then(hubsData => {
|
).then(hubsData => {
|
||||||
relatedHubs.value = (hubsData?.nearest_hubs || []).filter((h): h is HubItem => h !== null)
|
relatedHubs.value = (hubsData?.nearestHubs || []).filter((h): h is HubItem => h !== null)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
isLoadingHubs.value = false
|
isLoadingHubs.value = false
|
||||||
})
|
})
|
||||||
@@ -314,7 +314,7 @@ export function useCatalogInfo() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
).then(hubsData => {
|
).then(hubsData => {
|
||||||
relatedHubs.value = (hubsData?.nearest_hubs || []).filter((h): h is HubItem => h !== null)
|
relatedHubs.value = (hubsData?.nearestHubs || []).filter((h): h is HubItem => h !== null)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
isLoadingHubs.value = false
|
isLoadingHubs.value = false
|
||||||
})
|
})
|
||||||
@@ -374,14 +374,14 @@ export function useCatalogInfo() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Offers already include routes from backend
|
// Offers already include routes from backend
|
||||||
relatedOffers.value = (offersData?.nearest_offers || []).filter((o): o is OfferItem => o !== null)
|
relatedOffers.value = (offersData?.nearestOffers || []).filter((o): o is OfferItem => o !== null)
|
||||||
isLoadingOffers.value = false
|
isLoadingOffers.value = false
|
||||||
|
|
||||||
// Extract unique suppliers from offers (use supplier_uuid from offers)
|
// Extract unique suppliers from offers (use supplierUuid from offers)
|
||||||
const supplierUuids = new Set<string>()
|
const supplierUuids = new Set<string>()
|
||||||
relatedOffers.value.forEach(offer => {
|
relatedOffers.value.forEach(offer => {
|
||||||
if (offer.supplier_uuid) {
|
if (offer.supplierUuid) {
|
||||||
supplierUuids.add(offer.supplier_uuid)
|
supplierUuids.add(offer.supplierUuid)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ export function useCatalogInfo() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
const hub = (hubsData?.nearest_hubs || []).find((h): h is HubItem => h !== null)
|
const hub = (hubsData?.nearestHubs || []).find((h): h is HubItem => h !== null)
|
||||||
if (hub?.uuid) {
|
if (hub?.uuid) {
|
||||||
hubUuid = hub.uuid
|
hubUuid = hub.uuid
|
||||||
if (!relatedHubs.value.length) {
|
if (!relatedHubs.value.length) {
|
||||||
@@ -461,10 +461,10 @@ export function useCatalogInfo() {
|
|||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
|
|
||||||
relatedOffers.value = (offersData?.nearest_offers || []).filter((o): o is OfferItem => {
|
relatedOffers.value = (offersData?.nearestOffers || []).filter((o): o is OfferItem => {
|
||||||
if (!o) return false
|
if (!o) return false
|
||||||
if (!supplier.uuid) return true
|
if (!supplier.uuid) return true
|
||||||
return o.supplier_uuid === supplier.uuid
|
return o.supplierUuid === supplier.uuid
|
||||||
})
|
})
|
||||||
isLoadingOffers.value = false
|
isLoadingOffers.value = false
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import {
|
|||||||
} from '~/composables/graphql/public/exchange-generated'
|
} from '~/composables/graphql/public/exchange-generated'
|
||||||
|
|
||||||
// Type from codegen
|
// Type from codegen
|
||||||
type ProductItem = NonNullable<NonNullable<ProductsListQueryResult['products_list']>[number]>
|
type ProductItem = NonNullable<NonNullable<ProductsListQueryResult['productsList']>[number]>
|
||||||
type OfferItem = NonNullable<NonNullable<NearestOffersQueryResult['nearest_offers']>[number]>
|
type OfferItem = NonNullable<NonNullable<NearestOffersQueryResult['nearestOffers']>[number]>
|
||||||
|
|
||||||
// Product aggregated from offers
|
// Product aggregated from offers
|
||||||
interface AggregatedProduct {
|
interface AggregatedProduct {
|
||||||
@@ -92,16 +92,16 @@ export function useCatalogProducts() {
|
|||||||
|
|
||||||
// Group offers by product
|
// Group offers by product
|
||||||
const productsMap = new Map<string, AggregatedProduct>()
|
const productsMap = new Map<string, AggregatedProduct>()
|
||||||
offersData?.nearest_offers?.forEach((offer) => {
|
offersData?.nearestOffers?.forEach((offer) => {
|
||||||
if (!offer?.product_uuid) return
|
if (!offer?.productUuid) return
|
||||||
if (!productsMap.has(offer.product_uuid)) {
|
if (!productsMap.has(offer.productUuid)) {
|
||||||
productsMap.set(offer.product_uuid, {
|
productsMap.set(offer.productUuid, {
|
||||||
uuid: offer.product_uuid,
|
uuid: offer.productUuid,
|
||||||
name: offer.product_name,
|
name: offer.productName,
|
||||||
offersCount: 0
|
offersCount: 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
productsMap.get(offer.product_uuid)!.offersCount++
|
productsMap.get(offer.productUuid)!.offersCount++
|
||||||
})
|
})
|
||||||
items.value = Array.from(productsMap.values()) as ProductItem[]
|
items.value = Array.from(productsMap.values()) as ProductItem[]
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ export function useCatalogProducts() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
items.value = (data?.products_list || []).filter((p): p is ProductItem => p !== null)
|
items.value = (data?.productsList || []).filter((p): p is ProductItem => p !== null)
|
||||||
}
|
}
|
||||||
|
|
||||||
isInitialized.value = true
|
isInitialized.value = true
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { SuppliersListDocument, NearestSuppliersDocument } from '~/composables/g
|
|||||||
const PAGE_SIZE = 500
|
const PAGE_SIZE = 500
|
||||||
|
|
||||||
// Types from codegen
|
// Types from codegen
|
||||||
type SupplierItem = NonNullable<NonNullable<SuppliersListQueryResult['suppliers_list']>[number]>
|
type SupplierItem = NonNullable<NonNullable<SuppliersListQueryResult['suppliersList']>[number]>
|
||||||
type NearestSupplierItem = NonNullable<NonNullable<NearestSuppliersQueryResult['nearest_suppliers']>[number]>
|
type NearestSupplierItem = NonNullable<NonNullable<NearestSuppliersQueryResult['nearestSuppliers']>[number]>
|
||||||
|
|
||||||
// Shared state across list and map views
|
// Shared state across list and map views
|
||||||
const items = ref<Array<SupplierItem | NearestSupplierItem>>([])
|
const items = ref<Array<SupplierItem | NearestSupplierItem>>([])
|
||||||
@@ -41,7 +41,7 @@ export function useCatalogSuppliers() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
items.value = (data?.nearest_suppliers || []).filter((s): s is NearestSupplierItem => s !== null)
|
items.value = (data?.nearestSuppliers || []).filter((s): s is NearestSupplierItem => s !== null)
|
||||||
total.value = items.value.length
|
total.value = items.value.length
|
||||||
isInitialized.value = true
|
isInitialized.value = true
|
||||||
return
|
return
|
||||||
@@ -63,7 +63,7 @@ export function useCatalogSuppliers() {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
const next = (data?.suppliers_list || []).filter((s): s is SupplierItem => s !== null)
|
const next = (data?.suppliersList || []).filter((s): s is SupplierItem => s !== null)
|
||||||
|
|
||||||
items.value = replace ? next : items.value.concat(next)
|
items.value = replace ? next : items.value.concat(next)
|
||||||
// suppliersList doesn't return total count, estimate from fetched items
|
// suppliersList doesn't return total count, estimate from fetched items
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export function useClusteredNodes(
|
|||||||
fetchPolicy: 'network-only'
|
fetchPolicy: 'network-only'
|
||||||
})
|
})
|
||||||
|
|
||||||
clusteredNodes.value = (data?.clustered_nodes ?? []).filter(Boolean) as ClusterPoint[]
|
clusteredNodes.value = (data?.clusteredNodes ?? []).filter(Boolean) as ClusterPoint[]
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to fetch clustered nodes:', error)
|
console.error('Failed to fetch clustered nodes:', error)
|
||||||
clusteredNodes.value = []
|
clusteredNodes.value = []
|
||||||
|
|||||||
@@ -152,12 +152,12 @@ try {
|
|||||||
|
|
||||||
// Group offers by product
|
// Group offers by product
|
||||||
const productsMap = new Map<string, { uuid: string; name: string }>()
|
const productsMap = new Map<string, { uuid: string; name: string }>()
|
||||||
offersData.value?.nearest_offers?.forEach((offer) => {
|
offersData.value?.nearestOffers?.forEach((offer) => {
|
||||||
if (offer?.product_uuid) {
|
if (offer?.productUuid) {
|
||||||
if (!productsMap.has(offer.product_uuid)) {
|
if (!productsMap.has(offer.productUuid)) {
|
||||||
productsMap.set(offer.product_uuid, {
|
productsMap.set(offer.productUuid, {
|
||||||
uuid: offer.product_uuid,
|
uuid: offer.productUuid,
|
||||||
name: offer.product_name || ''
|
name: offer.productName || ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ import { GetOffersDocument, type GetOffersQueryVariables } from '~/composables/g
|
|||||||
import { GetNodeDocument, NearestOffersDocument, type NearestOffersQueryResult } from '~/composables/graphql/public/geo-generated'
|
import { GetNodeDocument, NearestOffersDocument, type NearestOffersQueryResult } from '~/composables/graphql/public/geo-generated'
|
||||||
import type { MapBounds } from '~/components/catalog/CatalogMap.vue'
|
import type { MapBounds } from '~/components/catalog/CatalogMap.vue'
|
||||||
|
|
||||||
type NearestOffer = NonNullable<NearestOffersQueryResult['nearest_offers'][number]>
|
type NearestOffer = NonNullable<NearestOffersQueryResult['nearestOffers'][number]>
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'topnav'
|
layout: 'topnav'
|
||||||
@@ -433,7 +433,7 @@ const searchOfferPoints = computed(() =>
|
|||||||
.filter((offer) => offer.latitude != null && offer.longitude != null)
|
.filter((offer) => offer.latitude != null && offer.longitude != null)
|
||||||
.map((offer) => ({
|
.map((offer) => ({
|
||||||
uuid: offer.uuid,
|
uuid: offer.uuid,
|
||||||
name: offer.product_name || '',
|
name: offer.productName || '',
|
||||||
latitude: Number(offer.latitude),
|
latitude: Number(offer.latitude),
|
||||||
longitude: Number(offer.longitude),
|
longitude: Number(offer.longitude),
|
||||||
type: 'offer' as const
|
type: 'offer' as const
|
||||||
@@ -548,7 +548,7 @@ const loadExploreOffers = async () => {
|
|||||||
'public',
|
'public',
|
||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
exploreOffers.value = (geoData?.nearest_offers || []).filter((o): o is NearestOffer => o !== null)
|
exploreOffers.value = (geoData?.nearestOffers || []).filter((o): o is NearestOffer => o !== null)
|
||||||
} finally {
|
} finally {
|
||||||
exploreOffersLoading.value = false
|
exploreOffersLoading.value = false
|
||||||
}
|
}
|
||||||
@@ -570,7 +570,7 @@ const mapItems = computed((): MapItemWithCoords[] => {
|
|||||||
.filter((offer) => offer.uuid && offer.latitude != null && offer.longitude != null)
|
.filter((offer) => offer.uuid && offer.latitude != null && offer.longitude != null)
|
||||||
.map((offer) => ({
|
.map((offer) => ({
|
||||||
uuid: offer.uuid,
|
uuid: offer.uuid,
|
||||||
name: offer.product_name || '',
|
name: offer.productName || '',
|
||||||
latitude: Number(offer.latitude),
|
latitude: Number(offer.latitude),
|
||||||
longitude: Number(offer.longitude)
|
longitude: Number(offer.longitude)
|
||||||
}))
|
}))
|
||||||
@@ -718,17 +718,17 @@ const onSearch = async () => {
|
|||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
|
|
||||||
let nearest = (geoData?.nearest_offers || []).filter((o): o is NearestOffer => o !== null)
|
let nearest = (geoData?.nearestOffers || []).filter((o): o is NearestOffer => o !== null)
|
||||||
if (supplierId.value) {
|
if (supplierId.value) {
|
||||||
nearest = nearest.filter(o => o?.supplier_uuid === supplierId.value)
|
nearest = nearest.filter(o => o?.supplierUuid === supplierId.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
offers.value = nearest
|
offers.value = nearest
|
||||||
quoteCalculations.value = buildCalculationsFromOffers(nearest)
|
quoteCalculations.value = buildCalculationsFromOffers(nearest)
|
||||||
|
|
||||||
const first = offers.value[0]
|
const first = offers.value[0]
|
||||||
if (first?.product_name) {
|
if (first?.productName) {
|
||||||
setLabel('product', productId.value, first.product_name)
|
setLabel('product', productId.value, first.productName)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
offers.value = []
|
offers.value = []
|
||||||
@@ -774,8 +774,8 @@ const onSearch = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Select offer - navigate to detail page
|
// Select offer - navigate to detail page
|
||||||
const onSelectOffer = (offer: { uuid: string; product_uuid?: string | null; productUuid?: string | null }) => {
|
const onSelectOffer = (offer: { uuid: string; productUuid?: string | null }) => {
|
||||||
const productUuid = offer.product_uuid || offer.productUuid
|
const productUuid = offer.productUuid
|
||||||
if (offer.uuid && productUuid) {
|
if (offer.uuid && productUuid) {
|
||||||
router.push(localePath(`/catalog/offers/${productUuid}?offer=${offer.uuid}`))
|
router.push(localePath(`/catalog/offers/${productUuid}?offer=${offer.uuid}`))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,15 +78,15 @@
|
|||||||
@click="onSelectOffer(offer)"
|
@click="onSelectOffer(offer)"
|
||||||
>
|
>
|
||||||
<OfferResultCard
|
<OfferResultCard
|
||||||
:supplier-name="offer.supplier_name"
|
:supplier-name="offer.supplierName"
|
||||||
:location-name="offer.country || ''"
|
:location-name="offer.country || ''"
|
||||||
:product-name="offer.product_name"
|
:product-name="offer.productName"
|
||||||
:price-per-unit="offer.price_per_unit ? Number(offer.price_per_unit) : null"
|
:price-per-unit="offer.pricePerUnit ? Number(offer.pricePerUnit) : null"
|
||||||
:quantity="offer.quantity"
|
:quantity="offer.quantity"
|
||||||
:currency="offer.currency"
|
:currency="offer.currency"
|
||||||
:unit="offer.unit"
|
:unit="offer.unit"
|
||||||
:stages="getOfferStages(offer)"
|
:stages="getOfferStages(offer)"
|
||||||
:total-time-seconds="offer.routes?.[0]?.total_time_seconds ?? null"
|
:total-time-seconds="offer.routes?.[0]?.totalTimeSeconds ?? null"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GetNodeDocument, NearestOffersDocument, type NearestOffersQueryResult } from '~/composables/graphql/public/geo-generated'
|
import { GetNodeDocument, NearestOffersDocument, type NearestOffersQueryResult } from '~/composables/graphql/public/geo-generated'
|
||||||
|
|
||||||
type NearestOffer = NonNullable<NearestOffersQueryResult['nearest_offers'][number]>
|
type NearestOffer = NonNullable<NearestOffersQueryResult['nearestOffers'][number]>
|
||||||
|
|
||||||
definePageMeta({ layout: 'topnav' })
|
definePageMeta({ layout: 'topnav' })
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ const relatedPoints = computed(() => {
|
|||||||
.forEach(o => {
|
.forEach(o => {
|
||||||
points.push({
|
points.push({
|
||||||
uuid: o.uuid,
|
uuid: o.uuid,
|
||||||
name: o.product_name || '',
|
name: o.productName || '',
|
||||||
latitude: Number(o.latitude),
|
latitude: Number(o.latitude),
|
||||||
longitude: Number(o.longitude),
|
longitude: Number(o.longitude),
|
||||||
type: 'offer',
|
type: 'offer',
|
||||||
@@ -167,7 +167,7 @@ const onMapSelect = (uuid: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onSelectOffer = (offer: NearestOffer) => {
|
const onSelectOffer = (offer: NearestOffer) => {
|
||||||
const productUuid = offer.product_uuid || offer.productUuid
|
const productUuid = offer.productUuid
|
||||||
if (offer.uuid && productUuid) {
|
if (offer.uuid && productUuid) {
|
||||||
router.push(localePath(`/catalog/offers/${productUuid}?offer=${offer.uuid}`))
|
router.push(localePath(`/catalog/offers/${productUuid}?offer=${offer.uuid}`))
|
||||||
}
|
}
|
||||||
@@ -179,10 +179,10 @@ const getOfferStages = (offer: NearestOffer) => {
|
|||||||
return r.stages
|
return r.stages
|
||||||
.filter((s): s is NonNullable<typeof s> => s !== null)
|
.filter((s): s is NonNullable<typeof s> => s !== null)
|
||||||
.map(s => ({
|
.map(s => ({
|
||||||
transportType: s.transport_type,
|
transportType: s.transportType,
|
||||||
distanceKm: s.distance_km,
|
distanceKm: s.distanceKm,
|
||||||
travelTimeSeconds: s.travel_time_seconds,
|
travelTimeSeconds: s.travelTimeSeconds,
|
||||||
fromName: s.from_name,
|
fromName: s.fromName,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ const searchOffers = async () => {
|
|||||||
'geo'
|
'geo'
|
||||||
)
|
)
|
||||||
|
|
||||||
offers.value = (data?.nearest_offers || []).filter((o): o is NearestOffer => o !== null)
|
offers.value = (data?.nearestOffers || []).filter((o): o is NearestOffer => o !== null)
|
||||||
} finally {
|
} finally {
|
||||||
offersLoading.value = false
|
offersLoading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
query GetAutoRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
|
query GetAutoRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
|
||||||
auto_route(from_lat: $fromLat, from_lon: $fromLon, to_lat: $toLat, to_lon: $toLon) {
|
autoRoute(fromLat: $fromLat, fromLon: $fromLon, toLat: $toLat, toLon: $toLon) {
|
||||||
distance_km
|
distanceKm
|
||||||
geometry
|
geometry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,20 @@ query GetClusteredNodes(
|
|||||||
$transportType: String
|
$transportType: String
|
||||||
$nodeType: String
|
$nodeType: String
|
||||||
) {
|
) {
|
||||||
clustered_nodes(
|
clusteredNodes(
|
||||||
west: $west
|
west: $west
|
||||||
south: $south
|
south: $south
|
||||||
east: $east
|
east: $east
|
||||||
north: $north
|
north: $north
|
||||||
zoom: $zoom
|
zoom: $zoom
|
||||||
transport_type: $transportType
|
transportType: $transportType
|
||||||
node_type: $nodeType
|
nodeType: $nodeType
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
latitude
|
latitude
|
||||||
longitude
|
longitude
|
||||||
count
|
count
|
||||||
expansion_zoom
|
expansionZoom
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
query GetHubCountries {
|
query GetHubCountries {
|
||||||
hub_countries
|
hubCountries
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ query GetNode($uuid: String!) {
|
|||||||
latitude
|
latitude
|
||||||
longitude
|
longitude
|
||||||
country
|
country
|
||||||
country_code
|
countryCode
|
||||||
transport_types
|
transportTypes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
query GetRailRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
|
query GetRailRoute($fromLat: Float!, $fromLon: Float!, $toLat: Float!, $toLon: Float!) {
|
||||||
rail_route(from_lat: $fromLat, from_lon: $fromLon, to_lat: $toLat, to_lon: $toLon) {
|
railRoute(fromLat: $fromLat, fromLon: $fromLon, toLat: $toLat, toLon: $toLon) {
|
||||||
distance_km
|
distanceKm
|
||||||
geometry
|
geometry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
query HubsList($limit: Int, $offset: Int, $country: String, $transportType: String, $west: Float, $south: Float, $east: Float, $north: Float) {
|
query HubsList($limit: Int, $offset: Int, $country: String, $transportType: String, $west: Float, $south: Float, $east: Float, $north: Float) {
|
||||||
hubs_list(limit: $limit, offset: $offset, country: $country, transport_type: $transportType, west: $west, south: $south, east: $east, north: $north) {
|
hubsList(limit: $limit, offset: $offset, country: $country, transportType: $transportType, west: $west, south: $south, east: $east, north: $north) {
|
||||||
uuid
|
uuid
|
||||||
name
|
name
|
||||||
latitude
|
latitude
|
||||||
longitude
|
longitude
|
||||||
country
|
country
|
||||||
country_code
|
countryCode
|
||||||
transport_types
|
transportTypes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
query NearestHubs($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
|
query NearestHubs($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
|
||||||
nearest_hubs(
|
nearestHubs(
|
||||||
lat: $lat
|
lat: $lat
|
||||||
lon: $lon
|
lon: $lon
|
||||||
radius: $radius
|
radius: $radius
|
||||||
product_uuid: $productUuid
|
productUuid: $productUuid
|
||||||
limit: $limit
|
limit: $limit
|
||||||
) {
|
) {
|
||||||
uuid
|
uuid
|
||||||
@@ -11,7 +11,7 @@ query NearestHubs($lat: Float!, $lon: Float!, $radius: Float, $productUuid: Stri
|
|||||||
latitude
|
latitude
|
||||||
longitude
|
longitude
|
||||||
country
|
country
|
||||||
country_code
|
countryCode
|
||||||
transport_types
|
transportTypes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
query NearestOffers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String, $limit: Int) {
|
query NearestOffers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $hubUuid: String, $limit: Int) {
|
||||||
nearest_offers(lat: $lat, lon: $lon, radius: $radius, product_uuid: $productUuid, hub_uuid: $hubUuid, limit: $limit) {
|
nearestOffers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, hubUuid: $hubUuid, limit: $limit) {
|
||||||
uuid
|
uuid
|
||||||
product_uuid
|
productUuid
|
||||||
product_name
|
productName
|
||||||
supplier_uuid
|
supplierUuid
|
||||||
supplier_name
|
supplierName
|
||||||
latitude
|
latitude
|
||||||
longitude
|
longitude
|
||||||
country
|
country
|
||||||
country_code
|
countryCode
|
||||||
price_per_unit
|
pricePerUnit
|
||||||
currency
|
currency
|
||||||
quantity
|
quantity
|
||||||
unit
|
unit
|
||||||
distance_km
|
distanceKm
|
||||||
routes {
|
routes {
|
||||||
total_distance_km
|
totalDistanceKm
|
||||||
total_time_seconds
|
totalTimeSeconds
|
||||||
stages {
|
stages {
|
||||||
from_uuid
|
fromUuid
|
||||||
from_name
|
fromName
|
||||||
from_lat
|
fromLat
|
||||||
from_lon
|
fromLon
|
||||||
to_uuid
|
toUuid
|
||||||
to_name
|
toName
|
||||||
to_lat
|
toLat
|
||||||
to_lon
|
toLon
|
||||||
distance_km
|
distanceKm
|
||||||
travel_time_seconds
|
travelTimeSeconds
|
||||||
transport_type
|
transportType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
query NearestSuppliers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
|
query NearestSuppliers($lat: Float!, $lon: Float!, $radius: Float, $productUuid: String, $limit: Int) {
|
||||||
nearest_suppliers(lat: $lat, lon: $lon, radius: $radius, product_uuid: $productUuid, limit: $limit) {
|
nearestSuppliers(lat: $lat, lon: $lon, radius: $radius, productUuid: $productUuid, limit: $limit) {
|
||||||
uuid
|
uuid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
query ProductsList($limit: Int, $offset: Int, $west: Float, $south: Float, $east: Float, $north: Float) {
|
query ProductsList($limit: Int, $offset: Int, $west: Float, $south: Float, $east: Float, $north: Float) {
|
||||||
products_list(limit: $limit, offset: $offset, west: $west, south: $south, east: $east, north: $north) {
|
productsList(limit: $limit, offset: $offset, west: $west, south: $south, east: $east, north: $north) {
|
||||||
uuid
|
uuid
|
||||||
name
|
name
|
||||||
offers_count
|
offersCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
query SuppliersList($limit: Int, $offset: Int, $country: String, $west: Float, $south: Float, $east: Float, $north: Float) {
|
query SuppliersList($limit: Int, $offset: Int, $country: String, $west: Float, $south: Float, $east: Float, $north: Float) {
|
||||||
suppliers_list(limit: $limit, offset: $offset, country: $country, west: $west, south: $south, east: $east, north: $north) {
|
suppliersList(limit: $limit, offset: $offset, country: $country, west: $west, south: $south, east: $east, north: $north) {
|
||||||
uuid
|
uuid
|
||||||
name
|
name
|
||||||
latitude
|
latitude
|
||||||
|
|||||||
Reference in New Issue
Block a user