diff --git a/app/components/CalcResultContent.vue b/app/components/CalcResultContent.vue index b65962c..a567288 100644 --- a/app/components/CalcResultContent.vue +++ b/app/components/CalcResultContent.vue @@ -85,7 +85,7 @@ interface RoutePathType { stages?: (RouteStage | null)[] } import { GetOfferDocument, GetSupplierProfileByTeamDocument, type GetOfferQueryResult, type GetSupplierProfileByTeamQueryResult } from '~/composables/graphql/public/exchange-generated' -import type { OfferWithRouteType, RouteStageType } from '~/composables/graphql/public/geo-generated' +import type { OfferWithRoute, RouteStage } from '~/composables/graphql/public/geo-generated' const route = useRoute() const localePath = useLocalePath() @@ -152,17 +152,17 @@ const fetchOffersByHub = async () => { 'geo' ) - const offers = offersResponse?.nearestOffers || [] + const offers = offersResponse?.nearest_offers || [] // Offers already include routes from backend const offersWithRoutes = offers - .filter((offer): offer is NonNullable => offer !== null) + .filter((offer): offer is NonNullable => offer !== null) .map((offer) => ({ sourceUuid: offer.uuid, - sourceName: offer.productName, + sourceName: offer.product_name, sourceLat: offer.latitude, sourceLon: offer.longitude, - distanceKm: offer.distanceKm, + distanceKm: offer.distance_km, routes: offer.routes || [] })) @@ -207,12 +207,12 @@ const getRouteStages = (option: ProductRouteOption) => { const route = option.routes?.[0] if (!route?.stages) return [] return route.stages - .filter((stage): stage is NonNullable => stage !== null) + .filter((stage): stage is NonNullable => stage !== null) .map((stage) => ({ - transportType: stage.transportType, - distanceKm: stage.distanceKm, - travelTimeSeconds: stage.travelTimeSeconds, - fromName: stage.fromName + transportType: stage.transport_type, + distanceKm: stage.distance_km, + travelTimeSeconds: stage.travel_time_seconds, + fromName: stage.from_name })) } diff --git a/app/components/LocationsContent.vue b/app/components/LocationsContent.vue index ff4b0f1..9cdb766 100644 --- a/app/components/LocationsContent.vue +++ b/app/components/LocationsContent.vue @@ -71,7 +71,7 @@ diff --git a/app/components/catalog/QuotePanel.vue b/app/components/catalog/QuotePanel.vue index ccae353..01c1d0d 100644 --- a/app/components/catalog/QuotePanel.vue +++ b/app/components/catalog/QuotePanel.vue @@ -37,15 +37,15 @@ > @@ -58,15 +58,15 @@ @click="emit('select-offer', offer)" > @@ -78,24 +78,23 @@ diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index 2e0f138..a8a8f4a 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -336,15 +336,12 @@ const clusterSupplierUuid = computed(() => props.clusterSupplierUuid ?? undefine const { clusteredNodes, fetchClusters, loading: singleClusterLoading, clearNodes } = useClusteredNodes( undefined, activeClusterNodeType, - clusterProductUuid, - clusterHubUuid, - clusterSupplierUuid ) // Server-side clustering (typed mode) -const offerClusters = useClusteredNodes(undefined, ref('offer'), clusterProductUuid, clusterHubUuid, clusterSupplierUuid) -const hubClusters = useClusteredNodes(undefined, ref('logistics'), clusterProductUuid, clusterHubUuid, clusterSupplierUuid) -const supplierClusters = useClusteredNodes(undefined, ref('supplier'), clusterProductUuid, clusterHubUuid, clusterSupplierUuid) +const offerClusters = useClusteredNodes(undefined, ref('offer')) +const hubClusters = useClusteredNodes(undefined, ref('logistics')) +const supplierClusters = useClusteredNodes(undefined, ref('supplier')) const clusteredPointsByType = computed(() => ({ offer: offerClusters.clusteredNodes.value, diff --git a/app/composables/graphql/public/exchange-generated.ts b/app/composables/graphql/public/exchange-generated.ts index 2a821e8..ed212f2 100644 --- a/app/composables/graphql/public/exchange-generated.ts +++ b/app/composables/graphql/public/exchange-generated.ts @@ -13,96 +13,61 @@ export type Scalars = { Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } - Date: { input: string; output: string; } - DateTime: { input: string; output: string; } - Decimal: { input: string; output: string; } }; -export type OfferType = { - __typename?: 'OfferType'; - categoryName: Scalars['String']['output']; - createdAt: Scalars['DateTime']['output']; +export type Offer = { + __typename?: 'Offer'; + categoryName?: Maybe; + createdAt: Scalars['String']['output']; currency: Scalars['String']['output']; - description: Scalars['String']['output']; - id: Scalars['ID']['output']; - locationCountry: Scalars['String']['output']; - locationCountryCode: Scalars['String']['output']; + description?: Maybe; + locationCountry?: Maybe; + locationCountryCode?: Maybe; locationLatitude?: Maybe; locationLongitude?: Maybe; - locationName: Scalars['String']['output']; - locationUuid: Scalars['String']['output']; - pricePerUnit?: Maybe; + locationName?: Maybe; + locationUuid?: Maybe; + pricePerUnit: Scalars['Float']['output']; productName: Scalars['String']['output']; productUuid: Scalars['String']['output']; - quantity: Scalars['Decimal']['output']; - status: OffersOfferStatusChoices; + quantity: Scalars['Float']['output']; + status: Scalars['String']['output']; teamUuid: Scalars['String']['output']; - terminusDocumentId: Scalars['String']['output']; - terminusSchemaId: Scalars['String']['output']; unit: Scalars['String']['output']; - updatedAt: Scalars['DateTime']['output']; + updatedAt: Scalars['String']['output']; uuid: Scalars['String']['output']; - validUntil?: Maybe; - workflowError: Scalars['String']['output']; - workflowStatus: OffersOfferWorkflowStatusChoices; + validUntil?: Maybe; }; -/** An enumeration. */ -export enum OffersOfferStatusChoices { - /** Активно */ - Active = 'ACTIVE', - /** ΠžΡ‚ΠΌΠ΅Π½Π΅Π½ΠΎ */ - Cancelled = 'CANCELLED', - /** Π—Π°ΠΊΡ€Ρ‹Ρ‚ΠΎ */ - Closed = 'CLOSED', - /** Π§Π΅Ρ€Π½ΠΎΠ²ΠΈΠΊ */ - Draft = 'DRAFT' -} - -/** An enumeration. */ -export enum OffersOfferWorkflowStatusChoices { - /** АктивСн */ - Active = 'ACTIVE', - /** Ошибка */ - Error = 'ERROR', - /** ΠžΠΆΠΈΠ΄Π°Π΅Ρ‚ ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ */ - Pending = 'PENDING' -} - export type Product = { __typename?: 'Product'; - categoryId?: Maybe; + categoryId?: Maybe; categoryName?: Maybe; name?: Maybe; terminusSchemaId?: Maybe; uuid?: Maybe; }; -/** Public schema - no authentication required */ -export type PublicQuery = { - __typename?: 'PublicQuery'; - /** Get products that have active offers */ +export type Query = { + __typename?: 'Query'; getAvailableProducts?: Maybe>>; - getOffer?: Maybe; - getOffers?: Maybe>>; + getOffer?: Maybe; + getOffers?: Maybe>>; getOffersCount?: Maybe; getProducts?: Maybe>>; - getSupplierProfile?: Maybe; - /** Get supplier profile by team UUID */ - getSupplierProfileByTeam?: Maybe; - getSupplierProfiles?: Maybe>>; + getSupplierProfile?: Maybe; + getSupplierProfileByTeam?: Maybe; + getSupplierProfiles?: Maybe>>; getSupplierProfilesCount?: Maybe; }; -/** Public schema - no authentication required */ -export type PublicQueryGetOfferArgs = { +export type QueryGetOfferArgs = { uuid: Scalars['String']['input']; }; -/** Public schema - no authentication required */ -export type PublicQueryGetOffersArgs = { +export type QueryGetOffersArgs = { categoryName?: InputMaybe; limit?: InputMaybe; locationUuid?: InputMaybe; @@ -113,8 +78,7 @@ export type PublicQueryGetOffersArgs = { }; -/** Public schema - no authentication required */ -export type PublicQueryGetOffersCountArgs = { +export type QueryGetOffersCountArgs = { categoryName?: InputMaybe; locationUuid?: InputMaybe; productUuid?: InputMaybe; @@ -123,20 +87,17 @@ export type PublicQueryGetOffersCountArgs = { }; -/** Public schema - no authentication required */ -export type PublicQueryGetSupplierProfileArgs = { +export type QueryGetSupplierProfileArgs = { uuid: Scalars['String']['input']; }; -/** Public schema - no authentication required */ -export type PublicQueryGetSupplierProfileByTeamArgs = { +export type QueryGetSupplierProfileByTeamArgs = { teamUuid: Scalars['String']['input']; }; -/** Public schema - no authentication required */ -export type PublicQueryGetSupplierProfilesArgs = { +export type QueryGetSupplierProfilesArgs = { country?: InputMaybe; isVerified?: InputMaybe; limit?: InputMaybe; @@ -144,51 +105,46 @@ export type PublicQueryGetSupplierProfilesArgs = { }; -/** Public schema - no authentication required */ -export type PublicQueryGetSupplierProfilesCountArgs = { +export type QueryGetSupplierProfilesCountArgs = { country?: InputMaybe; isVerified?: InputMaybe; }; -/** ΠŸΡ€ΠΎΡ„ΠΈΠ»ΡŒ поставщика Π½Π° Π±ΠΈΡ€ΠΆΠ΅ */ -export type SupplierProfileType = { - __typename?: 'SupplierProfileType'; - country: Scalars['String']['output']; +export type SupplierProfile = { + __typename?: 'SupplierProfile'; + country?: Maybe; countryCode?: Maybe; - createdAt: Scalars['DateTime']['output']; - description: Scalars['String']['output']; - id: Scalars['ID']['output']; + description?: Maybe; isActive: Scalars['Boolean']['output']; isVerified: Scalars['Boolean']['output']; - kycProfileUuid: Scalars['String']['output']; + kycProfileUuid?: Maybe; latitude?: Maybe; - logoUrl: Scalars['String']['output']; + logoUrl?: Maybe; longitude?: Maybe; name: Scalars['String']['output']; offersCount?: Maybe; teamUuid: Scalars['String']['output']; - updatedAt: Scalars['DateTime']['output']; uuid: Scalars['String']['output']; }; export type GetAvailableProductsQueryVariables = Exact<{ [key: string]: never; }>; -export type GetAvailableProductsQueryResult = { __typename?: 'PublicQuery', getAvailableProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; +export type GetAvailableProductsQueryResult = { __typename?: 'Query', getAvailableProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; export type GetLocationOffersQueryVariables = Exact<{ locationUuid: Scalars['String']['input']; }>; -export type GetLocationOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; +export type GetLocationOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; export type GetOfferQueryVariables = Exact<{ uuid: Scalars['String']['input']; }>; -export type GetOfferQueryResult = { __typename?: 'PublicQuery', getOffer?: { __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null }; +export type GetOfferQueryResult = { __typename?: 'Query', getOffer?: { __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null }; export type GetOffersQueryVariables = Exact<{ productUuid?: InputMaybe; @@ -200,47 +156,47 @@ export type GetOffersQueryVariables = Exact<{ }>; -export type GetOffersQueryResult = { __typename?: 'PublicQuery', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; +export type GetOffersQueryResult = { __typename?: 'Query', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; export type GetProductQueryVariables = Exact<{ uuid: Scalars['String']['input']; }>; -export type GetProductQueryResult = { __typename?: 'PublicQuery', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; +export type GetProductQueryResult = { __typename?: 'Query', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; export type GetProductOffersQueryVariables = Exact<{ productUuid: Scalars['String']['input']; }>; -export type GetProductOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; +export type GetProductOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; export type GetProductsQueryVariables = Exact<{ [key: string]: never; }>; -export type GetProductsQueryResult = { __typename?: 'PublicQuery', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; +export type GetProductsQueryResult = { __typename?: 'Query', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null }; export type GetSupplierOffersQueryVariables = Exact<{ teamUuid: Scalars['String']['input']; }>; -export type GetSupplierOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; +export type GetSupplierOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null }; export type GetSupplierProfileQueryVariables = Exact<{ uuid: Scalars['String']['input']; }>; -export type GetSupplierProfileQueryResult = { __typename?: 'PublicQuery', getSupplierProfile?: { __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, kycProfileUuid: string, name: string, description: string, country: string, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null }; +export type GetSupplierProfileQueryResult = { __typename?: 'Query', getSupplierProfile?: { __typename?: 'SupplierProfile', uuid: string, teamUuid: string, kycProfileUuid?: string | null, name: string, description?: string | null, country?: string | null, logoUrl?: string | null, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null }; export type GetSupplierProfileByTeamQueryVariables = Exact<{ teamUuid: Scalars['String']['input']; }>; -export type GetSupplierProfileByTeamQueryResult = { __typename?: 'PublicQuery', getSupplierProfileByTeam?: { __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, kycProfileUuid: string, name: string, description: string, country: string, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null } | null }; +export type GetSupplierProfileByTeamQueryResult = { __typename?: 'Query', getSupplierProfileByTeam?: { __typename?: 'SupplierProfile', uuid: string, teamUuid: string, kycProfileUuid?: string | null, name: string, description?: string | null, country?: string | null, logoUrl?: string | null, isVerified: boolean, isActive: boolean, offersCount?: number | null } | null }; export type GetSupplierProfilesQueryVariables = Exact<{ country?: InputMaybe; @@ -249,7 +205,7 @@ export type GetSupplierProfilesQueryVariables = Exact<{ }>; -export type GetSupplierProfilesQueryResult = { __typename?: 'PublicQuery', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, countryCode?: string | null, logoUrl: string, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null }; +export type GetSupplierProfilesQueryResult = { __typename?: 'Query', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfile', uuid: string, teamUuid: string, name: string, description?: string | null, country?: string | null, countryCode?: string | null, logoUrl?: string | null, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null }; export const GetAvailableProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode; diff --git a/app/composables/graphql/public/geo-generated.ts b/app/composables/graphql/public/geo-generated.ts index b90b16a..e1fbc9d 100644 --- a/app/composables/graphql/public/geo-generated.ts +++ b/app/composables/graphql/public/geo-generated.ts @@ -13,292 +13,228 @@ export type Scalars = { Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } - JSONString: { input: Record; output: Record; } + JSON: { input: Record; output: Record; } }; -/** Cluster or individual point for map display. */ -export type ClusterPointType = { - __typename?: 'ClusterPointType'; - /** 1 for single point, >1 for cluster */ +export type ClusterPoint = { + __typename?: 'ClusterPoint'; count?: Maybe; - /** Zoom level to expand cluster */ - expansionZoom?: Maybe; - /** UUID for points, 'cluster-N' for clusters */ + expansion_zoom?: Maybe; id?: Maybe; latitude?: Maybe; longitude?: Maybe; - /** Node name (only for single points) */ name?: Maybe; }; -/** Edge between two nodes (route). */ -export type EdgeType = { - __typename?: 'EdgeType'; - distanceKm?: Maybe; - toLatitude?: Maybe; - toLongitude?: Maybe; - toName?: Maybe; - toUuid?: Maybe; - transportType?: Maybe; - travelTimeSeconds?: Maybe; +export type Edge = { + __typename?: 'Edge'; + distance_km?: Maybe; + to_latitude?: Maybe; + to_longitude?: Maybe; + to_name?: Maybe; + to_uuid?: Maybe; + transport_type?: Maybe; + travel_time_seconds?: Maybe; }; -/** Auto + rail edges for a node, rail uses nearest rail node. */ -export type NodeConnectionsType = { - __typename?: 'NodeConnectionsType'; - autoEdges?: Maybe>>; - hub?: Maybe; - railEdges?: Maybe>>; - railNode?: Maybe; -}; - -/** Logistics node with edges to neighbors. */ -export type NodeType = { - __typename?: 'NodeType'; +export type Node = { + __typename?: 'Node'; country?: Maybe; - countryCode?: Maybe; - distanceKm?: Maybe; - edges?: Maybe>>; + country_code?: Maybe; + distance_km?: Maybe; + edges?: Maybe>>; latitude?: Maybe; longitude?: Maybe; name?: Maybe; - syncedAt?: Maybe; - transportTypes?: Maybe>>; + synced_at?: Maybe; + transport_types?: Maybe>>; uuid?: Maybe; }; -/** Calculation result that may include one or multiple offers. */ -export type OfferCalculationType = { - __typename?: 'OfferCalculationType'; - offers?: Maybe>>; +export type NodeConnections = { + __typename?: 'NodeConnections'; + auto_edges?: Maybe>>; + hub?: Maybe; + rail_edges?: Maybe>>; + rail_node?: Maybe; }; -/** Offer node with location and product info. */ -export type OfferNodeType = { - __typename?: 'OfferNodeType'; +export type OfferNode = { + __typename?: 'OfferNode'; country?: Maybe; - countryCode?: Maybe; + country_code?: Maybe; currency?: Maybe; - distanceKm?: Maybe; + distance_km?: Maybe; latitude?: Maybe; longitude?: Maybe; - pricePerUnit?: Maybe; - productName?: Maybe; - productUuid?: Maybe; + price_per_unit?: Maybe; + product_name?: Maybe; + product_uuid?: Maybe; quantity?: Maybe; - supplierName?: Maybe; - supplierUuid?: Maybe; + supplier_name?: Maybe; + supplier_uuid?: Maybe; unit?: Maybe; uuid?: Maybe; }; -/** Offer with route information to destination. */ -export type OfferWithRouteType = { - __typename?: 'OfferWithRouteType'; +export type OfferWithRoute = { + __typename?: 'OfferWithRoute'; country?: Maybe; - countryCode?: Maybe; + country_code?: Maybe; currency?: Maybe; - distanceKm?: Maybe; + distance_km?: Maybe; latitude?: Maybe; longitude?: Maybe; - pricePerUnit?: Maybe; - productName?: Maybe; - productUuid?: Maybe; + price_per_unit?: Maybe; + product_name?: Maybe; + product_uuid?: Maybe; quantity?: Maybe; - routes?: Maybe>>; - supplierName?: Maybe; - supplierUuid?: Maybe; + routes?: Maybe>>; + supplier_name?: Maybe; + supplier_uuid?: Maybe; unit?: Maybe; uuid?: Maybe; }; -/** Route options for a product source to the destination. */ -export type ProductRouteOptionType = { - __typename?: 'ProductRouteOptionType'; - distanceKm?: Maybe; - routes?: Maybe>>; - sourceLat?: Maybe; - sourceLon?: Maybe; - sourceName?: Maybe; - sourceUuid?: Maybe; -}; - -/** Unique product from offers. */ -export type ProductType = { - __typename?: 'ProductType'; +export type Product = { + __typename?: 'Product'; name?: Maybe; - /** Number of offers for this product */ - offersCount?: Maybe; + offers_count?: Maybe; uuid?: Maybe; }; -/** Root query. */ +export type ProductRouteOption = { + __typename?: 'ProductRouteOption'; + distance_km?: Maybe; + routes?: Maybe>>; + source_lat?: Maybe; + source_lon?: Maybe; + source_name?: Maybe; + source_uuid?: Maybe; +}; + export type Query = { __typename?: 'Query'; - /** Get auto route between two points via GraphHopper */ - autoRoute?: Maybe; - /** Get clustered nodes for map display (server-side clustering) */ - clusteredNodes?: Maybe>>; - /** List of countries that have logistics hubs */ - hubCountries?: Maybe>>; - /** Get hubs where a product is available nearby */ - hubsForProduct?: Maybe>>; - /** Get paginated list of logistics hubs */ - hubsList?: Maybe>>; - /** Get nearest hubs to an offer location */ - hubsNearOffer?: Maybe>>; - /** Find nearest hubs to coordinates (optionally filtered by product) */ - nearestHubs?: Maybe>>; - /** Find nearest logistics nodes to given coordinates */ - nearestNodes?: Maybe>>; - /** Find nearest offers to coordinates with optional routes to hub */ - nearestOffers?: Maybe>>; - /** Find nearest suppliers to coordinates (optionally filtered by product) */ - nearestSuppliers?: Maybe>>; - /** Get node by UUID with all edges to neighbors */ - node?: Maybe; - /** Get auto + rail edges for a node (rail uses nearest rail node) */ - nodeConnections?: Maybe; - /** Get all nodes (without edges for performance) */ - nodes?: Maybe>>; - /** Get total count of nodes (with optional transport/country/bounds filter) */ - nodesCount?: Maybe; - /** Get all offers for a product */ - offersByProduct?: Maybe>>; - /** Get offers from a supplier for a specific product */ - offersBySupplierProduct?: Maybe>>; - /** Get offers for a product with routes to hub (auto β†’ rail* β†’ auto) */ - offersForHub?: Maybe>>; - /** Get unique products from all offers */ - products?: Maybe>>; - /** Get products offered by a supplier */ - productsBySupplier?: Maybe>>; - /** Get paginated list of products from graph */ - productsList?: Maybe>>; - /** Get products available near a hub */ - productsNearHub?: Maybe>>; - /** Get quote calculations (single offer or split offers) */ - quoteCalculations?: Maybe>>; - /** Get rail route between two points via OpenRailRouting */ - railRoute?: Maybe; - /** Get route from offer to target coordinates (finds nearest hub to coordinate) */ - routeToCoordinate?: Maybe; - /** Get unique suppliers from all offers */ - suppliers?: Maybe>>; - /** Get suppliers that offer a specific product */ - suppliersForProduct?: Maybe>>; - /** Get paginated list of suppliers from graph */ - suppliersList?: Maybe>>; + auto_route?: Maybe; + clustered_nodes: Array; + hub_countries: Array; + hubs_for_product: Array; + hubs_list: Array; + hubs_near_offer: Array; + nearest_hubs: Array; + nearest_nodes: Array; + nearest_offers: Array; + nearest_suppliers: Array; + node?: Maybe; + node_connections?: Maybe; + nodes: Array; + nodes_count: Scalars['Int']['output']; + offer_to_hub?: Maybe; + offers_by_hub: Array; + offers_by_product: Array; + offers_by_supplier_product: Array; + products: Array; + products_by_supplier: Array; + products_list: Array; + products_near_hub: Array; + rail_route?: Maybe; + route_to_coordinate?: Maybe; + suppliers: Array; + suppliers_for_product: Array; + suppliers_list: Array; }; -/** Root query. */ -export type QueryAutoRouteArgs = { - fromLat: Scalars['Float']['input']; - fromLon: Scalars['Float']['input']; - toLat: Scalars['Float']['input']; - toLon: Scalars['Float']['input']; +export type QueryAuto_RouteArgs = { + from_lat: Scalars['Float']['input']; + from_lon: Scalars['Float']['input']; + to_lat: Scalars['Float']['input']; + to_lon: Scalars['Float']['input']; }; -/** Root query. */ -export type QueryClusteredNodesArgs = { +export type QueryClustered_NodesArgs = { east: Scalars['Float']['input']; - hubUuid?: InputMaybe; - nodeType?: InputMaybe; + node_type?: InputMaybe; north: Scalars['Float']['input']; - productUuid?: InputMaybe; south: Scalars['Float']['input']; - supplierUuid?: InputMaybe; - transportType?: InputMaybe; + transport_type?: InputMaybe; west: Scalars['Float']['input']; zoom: Scalars['Int']['input']; }; -/** Root query. */ -export type QueryHubsForProductArgs = { - productUuid: Scalars['String']['input']; - radiusKm?: InputMaybe; +export type QueryHubs_For_ProductArgs = { + product_uuid: Scalars['String']['input']; + radius_km?: InputMaybe; }; -/** Root query. */ -export type QueryHubsListArgs = { +export type QueryHubs_ListArgs = { country?: InputMaybe; east?: InputMaybe; limit?: InputMaybe; north?: InputMaybe; offset?: InputMaybe; south?: InputMaybe; - transportType?: InputMaybe; + transport_type?: InputMaybe; west?: InputMaybe; }; -/** Root query. */ -export type QueryHubsNearOfferArgs = { +export type QueryHubs_Near_OfferArgs = { limit?: InputMaybe; - offerUuid: Scalars['String']['input']; + offer_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QueryNearestHubsArgs = { +export type QueryNearest_HubsArgs = { lat: Scalars['Float']['input']; limit?: InputMaybe; lon: Scalars['Float']['input']; - productUuid?: InputMaybe; - radius?: InputMaybe; - sourceUuid?: InputMaybe; - useGraph?: InputMaybe; -}; - - -/** Root query. */ -export type QueryNearestNodesArgs = { - lat: Scalars['Float']['input']; - limit?: InputMaybe; - lon: Scalars['Float']['input']; -}; - - -/** Root query. */ -export type QueryNearestOffersArgs = { - hubUuid?: InputMaybe; - lat: Scalars['Float']['input']; - limit?: InputMaybe; - lon: Scalars['Float']['input']; - productUuid?: InputMaybe; + product_uuid?: InputMaybe; radius?: InputMaybe; }; -/** Root query. */ -export type QueryNearestSuppliersArgs = { +export type QueryNearest_NodesArgs = { lat: Scalars['Float']['input']; limit?: InputMaybe; lon: Scalars['Float']['input']; - productUuid?: InputMaybe; +}; + + +export type QueryNearest_OffersArgs = { + hub_uuid?: InputMaybe; + lat: Scalars['Float']['input']; + limit?: InputMaybe; + lon: Scalars['Float']['input']; + product_uuid?: InputMaybe; + radius?: InputMaybe; +}; + + +export type QueryNearest_SuppliersArgs = { + lat: Scalars['Float']['input']; + limit?: InputMaybe; + lon: Scalars['Float']['input']; + product_uuid?: InputMaybe; radius?: InputMaybe; }; -/** Root query. */ export type QueryNodeArgs = { uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QueryNodeConnectionsArgs = { - limitAuto?: InputMaybe; - limitRail?: InputMaybe; +export type QueryNode_ConnectionsArgs = { + limit_auto?: InputMaybe; + limit_rail?: InputMaybe; uuid: Scalars['String']['input']; }; -/** Root query. */ export type QueryNodesArgs = { country?: InputMaybe; east?: InputMaybe; @@ -307,51 +243,51 @@ export type QueryNodesArgs = { offset?: InputMaybe; search?: InputMaybe; south?: InputMaybe; - transportType?: InputMaybe; + transport_type?: InputMaybe; west?: InputMaybe; }; -/** Root query. */ -export type QueryNodesCountArgs = { +export type QueryNodes_CountArgs = { country?: InputMaybe; east?: InputMaybe; north?: InputMaybe; south?: InputMaybe; - transportType?: InputMaybe; + transport_type?: InputMaybe; west?: InputMaybe; }; -/** Root query. */ -export type QueryOffersByProductArgs = { - productUuid: Scalars['String']['input']; +export type QueryOffer_To_HubArgs = { + hub_uuid: Scalars['String']['input']; + offer_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QueryOffersBySupplierProductArgs = { - productUuid: Scalars['String']['input']; - supplierUuid: Scalars['String']['input']; -}; - - -/** Root query. */ -export type QueryOffersForHubArgs = { - hubUuid: Scalars['String']['input']; +export type QueryOffers_By_HubArgs = { + hub_uuid: Scalars['String']['input']; limit?: InputMaybe; - productUuid: Scalars['String']['input']; + product_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QueryProductsBySupplierArgs = { - supplierUuid: Scalars['String']['input']; +export type QueryOffers_By_ProductArgs = { + product_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QueryProductsListArgs = { +export type QueryOffers_By_Supplier_ProductArgs = { + product_uuid: Scalars['String']['input']; + supplier_uuid: Scalars['String']['input']; +}; + + +export type QueryProducts_By_SupplierArgs = { + supplier_uuid: Scalars['String']['input']; +}; + + +export type QueryProducts_ListArgs = { east?: InputMaybe; limit?: InputMaybe; north?: InputMaybe; @@ -361,50 +297,33 @@ export type QueryProductsListArgs = { }; -/** Root query. */ -export type QueryProductsNearHubArgs = { - hubUuid: Scalars['String']['input']; - radiusKm?: InputMaybe; +export type QueryProducts_Near_HubArgs = { + hub_uuid: Scalars['String']['input']; + radius_km?: InputMaybe; }; -/** Root query. */ -export type QueryQuoteCalculationsArgs = { - hubUuid?: InputMaybe; - lat: Scalars['Float']['input']; - limit?: InputMaybe; - lon: Scalars['Float']['input']; - productUuid?: InputMaybe; - quantity?: InputMaybe; - radius?: InputMaybe; +export type QueryRail_RouteArgs = { + from_lat: Scalars['Float']['input']; + from_lon: Scalars['Float']['input']; + to_lat: Scalars['Float']['input']; + to_lon: Scalars['Float']['input']; }; -/** Root query. */ -export type QueryRailRouteArgs = { - fromLat: Scalars['Float']['input']; - fromLon: Scalars['Float']['input']; - toLat: Scalars['Float']['input']; - toLon: Scalars['Float']['input']; -}; - - -/** Root query. */ -export type QueryRouteToCoordinateArgs = { +export type QueryRoute_To_CoordinateArgs = { lat: Scalars['Float']['input']; lon: Scalars['Float']['input']; - offerUuid: Scalars['String']['input']; + offer_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QuerySuppliersForProductArgs = { - productUuid: Scalars['String']['input']; +export type QuerySuppliers_For_ProductArgs = { + product_uuid: Scalars['String']['input']; }; -/** Root query. */ -export type QuerySuppliersListArgs = { +export type QuerySuppliers_ListArgs = { country?: InputMaybe; east?: InputMaybe; limit?: InputMaybe; @@ -414,42 +333,37 @@ export type QuerySuppliersListArgs = { west?: InputMaybe; }; -/** Complete route through graph with multiple stages. */ -export type RoutePathType = { - __typename?: 'RoutePathType'; - stages?: Maybe>>; - totalDistanceKm?: Maybe; - totalTimeSeconds?: Maybe; +export type Route = { + __typename?: 'Route'; + distance_km?: Maybe; + geometry?: Maybe; }; -/** Single stage in a multi-hop route. */ -export type RouteStageType = { - __typename?: 'RouteStageType'; - distanceKm?: Maybe; - fromLat?: Maybe; - fromLon?: Maybe; - fromName?: Maybe; - fromUuid?: Maybe; - toLat?: Maybe; - toLon?: Maybe; - toName?: Maybe; - toUuid?: Maybe; - transportType?: Maybe; - travelTimeSeconds?: Maybe; +export type RoutePath = { + __typename?: 'RoutePath'; + stages?: Maybe>>; + total_distance_km?: Maybe; + total_time_seconds?: Maybe; }; -/** Route between two points with geometry. */ -export type RouteType = { - __typename?: 'RouteType'; - distanceKm?: Maybe; - /** GeoJSON LineString coordinates */ - geometry?: Maybe; +export type RouteStage = { + __typename?: 'RouteStage'; + distance_km?: Maybe; + from_lat?: Maybe; + from_lon?: Maybe; + from_name?: Maybe; + from_uuid?: Maybe; + to_lat?: Maybe; + to_lon?: Maybe; + to_name?: Maybe; + to_uuid?: Maybe; + transport_type?: Maybe; + travel_time_seconds?: Maybe; }; -/** Unique supplier from offers. */ -export type SupplierType = { - __typename?: 'SupplierType'; - distanceKm?: Maybe; +export type Supplier = { + __typename?: 'Supplier'; + distance_km?: Maybe; latitude?: Maybe; longitude?: Maybe; name?: Maybe; @@ -464,7 +378,7 @@ export type GetAutoRouteQueryVariables = Exact<{ }>; -export type GetAutoRouteQueryResult = { __typename?: 'Query', autoRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: Record | null } | null }; +export type GetAutoRouteQueryResult = { __typename?: 'Query', auto_route?: { __typename?: 'Route', distance_km?: number | null, geometry?: Record | null } | null }; export type GetClusteredNodesQueryVariables = Exact<{ west: Scalars['Float']['input']; @@ -474,25 +388,22 @@ export type GetClusteredNodesQueryVariables = Exact<{ zoom: Scalars['Int']['input']; transportType?: InputMaybe; nodeType?: InputMaybe; - productUuid?: InputMaybe; - hubUuid?: InputMaybe; - supplierUuid?: InputMaybe; }>; -export type GetClusteredNodesQueryResult = { __typename?: 'Query', clusteredNodes?: Array<{ __typename?: 'ClusterPointType', id?: string | null, latitude?: number | null, longitude?: number | null, count?: number | null, expansionZoom?: number | null, name?: string | null } | null> | null }; +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 GetHubCountriesQueryVariables = Exact<{ [key: string]: never; }>; -export type GetHubCountriesQueryResult = { __typename?: 'Query', hubCountries?: Array | null }; +export type GetHubCountriesQueryResult = { __typename?: 'Query', hub_countries: Array }; export type GetNodeQueryVariables = Exact<{ uuid: Scalars['String']['input']; }>; -export type GetNodeQueryResult = { __typename?: 'Query', node?: { __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array | 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, country_code?: string | null, transport_types?: Array | null } | null }; export type GetRailRouteQueryVariables = Exact<{ fromLat: Scalars['Float']['input']; @@ -502,7 +413,7 @@ export type GetRailRouteQueryVariables = Exact<{ }>; -export type GetRailRouteQueryResult = { __typename?: 'Query', railRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: Record | null } | null }; +export type GetRailRouteQueryResult = { __typename?: 'Query', rail_route?: { __typename?: 'Route', distance_km?: number | null, geometry?: Record | null } | null }; export type HubsListQueryVariables = Exact<{ limit?: InputMaybe; @@ -516,7 +427,7 @@ export type HubsListQueryVariables = Exact<{ }>; -export type HubsListQueryResult = { __typename?: 'Query', hubsList?: Array<{ __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array | null } | null> | null }; +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 | null }> }; export type NearestHubsQueryVariables = Exact<{ lat: Scalars['Float']['input']; @@ -524,11 +435,10 @@ export type NearestHubsQueryVariables = Exact<{ radius?: InputMaybe; productUuid?: InputMaybe; limit?: InputMaybe; - useGraph?: InputMaybe; }>; -export type NearestHubsQueryResult = { __typename?: 'Query', nearestHubs?: Array<{ __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, transportTypes?: Array | null } | null> | null }; +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 | null }> }; export type NearestOffersQueryVariables = Exact<{ lat: Scalars['Float']['input']; @@ -540,7 +450,7 @@ export type NearestOffersQueryVariables = Exact<{ }>; -export type NearestOffersQueryResult = { __typename?: 'Query', nearestOffers?: Array<{ __typename?: 'OfferWithRouteType', 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?: 'RoutePathType', totalDistanceKm?: number | null, totalTimeSeconds?: number | null, stages?: Array<{ __typename?: 'RouteStageType', 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 } | null> | null }; +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 NearestSuppliersQueryVariables = Exact<{ lat: Scalars['Float']['input']; @@ -551,7 +461,7 @@ export type NearestSuppliersQueryVariables = Exact<{ }>; -export type NearestSuppliersQueryResult = { __typename?: 'Query', nearestSuppliers?: Array<{ __typename?: 'SupplierType', uuid?: string | null } | null> | null }; +export type NearestSuppliersQueryResult = { __typename?: 'Query', nearest_suppliers: Array<{ __typename?: 'Supplier', uuid?: string | null }> }; export type ProductsListQueryVariables = Exact<{ limit?: InputMaybe; @@ -563,20 +473,7 @@ export type ProductsListQueryVariables = Exact<{ }>; -export type ProductsListQueryResult = { __typename?: 'Query', productsList?: Array<{ __typename?: 'ProductType', uuid?: string | null, name?: string | null, offersCount?: number | null } | null> | null }; - -export type QuoteCalculationsQueryVariables = Exact<{ - lat: Scalars['Float']['input']; - lon: Scalars['Float']['input']; - radius?: InputMaybe; - productUuid?: InputMaybe; - hubUuid?: InputMaybe; - quantity?: InputMaybe; - limit?: InputMaybe; -}>; - - -export type QuoteCalculationsQueryResult = { __typename?: 'Query', quoteCalculations?: Array<{ __typename?: 'OfferCalculationType', offers?: Array<{ __typename?: 'OfferWithRouteType', 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?: 'RoutePathType', totalDistanceKm?: number | null, totalTimeSeconds?: number | null, stages?: Array<{ __typename?: 'RouteStageType', 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 } | null> | null } | null> | null }; +export type ProductsListQueryResult = { __typename?: 'Query', products_list: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, offers_count?: number | null }> }; export type SuppliersListQueryVariables = Exact<{ limit?: InputMaybe; @@ -589,18 +486,17 @@ export type SuppliersListQueryVariables = Exact<{ }>; -export type SuppliersListQueryResult = { __typename?: 'Query', suppliersList?: Array<{ __typename?: 'SupplierType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null } | null> | null }; +export type SuppliersListQueryResult = { __typename?: 'Query', suppliers_list: 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":"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; -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"}}},{"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":"supplierUuid"}},"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"}}},{"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":"supplierUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"supplierUuid"}}}],"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; -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; -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; -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; -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; -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"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"useGraph"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"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"}}},{"kind":"Argument","name":{"kind":"Name","value":"useGraph"},"value":{"kind":"Variable","name":{"kind":"Name","value":"useGraph"}}}],"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; -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; -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; -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; -export const QuoteCalculationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"QuoteCalculations"},"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":"quantity"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"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":"quoteCalculations"},"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":"quantity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quantity"}}},{"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":"offers"},"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; -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; \ No newline at end of file +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; +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; +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; +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; +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; +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; +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; +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; +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; +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; +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; \ No newline at end of file diff --git a/app/composables/graphql/public/kyc-generated.ts b/app/composables/graphql/public/kyc-generated.ts index 626e6ec..bd9da02 100644 --- a/app/composables/graphql/public/kyc-generated.ts +++ b/app/composables/graphql/public/kyc-generated.ts @@ -13,12 +13,10 @@ export type Scalars = { Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } - DateTime: { input: string; output: string; } }; -/** Full company data (requires auth). */ -export type CompanyFullType = { - __typename?: 'CompanyFullType'; +export type CompanyFull = { + __typename?: 'CompanyFull'; activities?: Maybe>>; address?: Maybe; capital?: Maybe; @@ -26,45 +24,35 @@ export type CompanyFullType = { director?: Maybe; inn?: Maybe; isActive?: Maybe; - lastUpdated?: Maybe; + lastUpdated?: Maybe; name?: Maybe; ogrn?: Maybe; registrationYear?: Maybe; sources?: Maybe>>; }; -/** Public company data (teaser). */ -export type CompanyTeaserType = { - __typename?: 'CompanyTeaserType'; - /** Company type: ООО, АО, ИП, etc. */ +export type CompanyTeaser = { + __typename?: 'CompanyTeaser'; companyType?: Maybe; - /** Is company active */ isActive?: Maybe; - /** Year of registration */ registrationYear?: Maybe; - /** Number of data sources */ sourcesCount?: Maybe; }; -/** Public queries - no authentication required. */ -export type PublicQuery = { - __typename?: 'PublicQuery'; - health?: Maybe; - /** Get full KYC profile data by UUID (requires auth) */ - kycProfileFull?: Maybe; - /** Get public KYC profile teaser data by UUID */ - kycProfileTeaser?: Maybe; +export type Query = { + __typename?: 'Query'; + health: Scalars['String']['output']; + kycProfileFull?: Maybe; + kycProfileTeaser?: Maybe; }; -/** Public queries - no authentication required. */ -export type PublicQueryKycProfileFullArgs = { +export type QueryKycProfileFullArgs = { profileUuid: Scalars['String']['input']; }; -/** Public queries - no authentication required. */ -export type PublicQueryKycProfileTeaserArgs = { +export type QueryKycProfileTeaserArgs = { profileUuid: Scalars['String']['input']; }; @@ -73,14 +61,14 @@ export type GetKycProfileFullQueryVariables = Exact<{ }>; -export type GetKycProfileFullQueryResult = { __typename?: 'PublicQuery', kycProfileFull?: { __typename?: 'CompanyFullType', inn?: string | null, ogrn?: string | null, name?: string | null, companyType?: string | null, registrationYear?: number | null, isActive?: boolean | null, address?: string | null, director?: string | null, capital?: string | null, activities?: Array | null, sources?: Array | null, lastUpdated?: string | null } | null }; +export type GetKycProfileFullQueryResult = { __typename?: 'Query', kycProfileFull?: { __typename?: 'CompanyFull', inn?: string | null, ogrn?: string | null, name?: string | null, companyType?: string | null, registrationYear?: number | null, isActive?: boolean | null, address?: string | null, director?: string | null, capital?: string | null, activities?: Array | null, sources?: Array | null, lastUpdated?: string | null } | null }; export type GetKycProfileTeaserQueryVariables = Exact<{ profileUuid: Scalars['String']['input']; }>; -export type GetKycProfileTeaserQueryResult = { __typename?: 'PublicQuery', kycProfileTeaser?: { __typename?: 'CompanyTeaserType', companyType?: string | null, registrationYear?: number | null, isActive?: boolean | null, sourcesCount?: number | null } | null }; +export type GetKycProfileTeaserQueryResult = { __typename?: 'Query', kycProfileTeaser?: { __typename?: 'CompanyTeaser', companyType?: string | null, registrationYear?: number | null, isActive?: boolean | null, sourcesCount?: number | null } | null }; export const GetKycProfileFullDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetKycProfileFull"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"profileUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kycProfileFull"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"profileUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"profileUuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inn"}},{"kind":"Field","name":{"kind":"Name","value":"ogrn"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"companyType"}},{"kind":"Field","name":{"kind":"Name","value":"registrationYear"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"director"}},{"kind":"Field","name":{"kind":"Name","value":"capital"}},{"kind":"Field","name":{"kind":"Name","value":"activities"}},{"kind":"Field","name":{"kind":"Name","value":"sources"}},{"kind":"Field","name":{"kind":"Name","value":"lastUpdated"}}]}}]}}]} as unknown as DocumentNode; diff --git a/app/composables/useCatalogHubs.ts b/app/composables/useCatalogHubs.ts index 6e0db38..fdf827d 100644 --- a/app/composables/useCatalogHubs.ts +++ b/app/composables/useCatalogHubs.ts @@ -4,8 +4,8 @@ import { HubsListDocument, GetHubCountriesDocument, NearestHubsDocument } from ' const PAGE_SIZE = 500 // Type from codegen - exported for use in pages -export type CatalogHubItem = NonNullable[number]> -export type CatalogNearestHubItem = NonNullable[number]> +export type CatalogHubItem = NonNullable[number]> +export type CatalogNearestHubItem = NonNullable[number]> // Internal aliases type HubItem = CatalogHubItem @@ -75,7 +75,7 @@ export function useCatalogHubs() { 'public', 'geo' ) - const next = (data?.nearestHubs || []).filter((h): h is NearestHubItem => h !== null) + const next = (data?.nearest_hubs || []).filter((h): h is NearestHubItem => h !== null) items.value = next total.value = next.length isInitialized.value = true @@ -103,7 +103,7 @@ export function useCatalogHubs() { 'public', 'geo' ) - const next = (data?.hubsList || []).filter((h): h is HubItem => h !== null) + const next = (data?.hubs_list || []).filter((h): h is HubItem => h !== null) items.value = replace ? next : items.value.concat(next) // hubsList doesn't return total count, estimate from fetched items if (replace) { @@ -120,7 +120,7 @@ export function useCatalogHubs() { const loadCountries = async () => { try { const data = await execute(GetHubCountriesDocument, {}, 'public', 'geo') - countries.value = (data?.hubCountries || []).filter((c): c is string => c !== null) + countries.value = (data?.hub_countries || []).filter((c): c is string => c !== null) } catch (e) { console.error('Failed to load hub countries', e) } diff --git a/app/composables/useCatalogInfo.ts b/app/composables/useCatalogInfo.ts index 30d57db..4c23eee 100644 --- a/app/composables/useCatalogInfo.ts +++ b/app/composables/useCatalogInfo.ts @@ -23,8 +23,8 @@ import { type NodeEntity = NonNullable type OfferEntity = NonNullable type SupplierProfile = NonNullable -type HubItem = NonNullable[number]> -type OfferItem = NonNullable[number]> +type HubItem = NonNullable[number]> +type OfferItem = NonNullable[number]> // Product type (aggregated from offers) export interface InfoProductItem { @@ -136,27 +136,27 @@ export function useCatalogInfo() { const productsMap = new Map() const suppliersMap = new Map() - offersData?.nearestOffers?.forEach(offer => { + offersData?.nearest_offers?.forEach(offer => { if (!offer) return // Products - if (offer.productUuid && offer.productName) { - const existing = productsMap.get(offer.productUuid) + if (offer.product_uuid && offer.product_name) { + const existing = productsMap.get(offer.product_uuid) if (existing) { existing.offersCount = (existing.offersCount || 0) + 1 } else { - productsMap.set(offer.productUuid, { - uuid: offer.productUuid, - name: offer.productName, + productsMap.set(offer.product_uuid, { + uuid: offer.product_uuid, + name: offer.product_name, offersCount: 1 }) } } // Suppliers (extract from offers) - if (offer.supplierUuid && !suppliersMap.has(offer.supplierUuid)) { - suppliersMap.set(offer.supplierUuid, { - uuid: offer.supplierUuid, - name: offer.supplierName || 'Supplier', + if (offer.supplier_uuid && !suppliersMap.has(offer.supplier_uuid)) { + suppliersMap.set(offer.supplier_uuid, { + uuid: offer.supplier_uuid, + name: offer.supplier_name || 'Supplier', latitude: offer.latitude, longitude: offer.longitude }) @@ -264,7 +264,7 @@ export function useCatalogInfo() { 'public', 'geo' ).then(hubsData => { - relatedHubs.value = (hubsData?.nearestHubs || []).filter((h): h is HubItem => h !== null) + relatedHubs.value = (hubsData?.nearest_hubs || []).filter((h): h is HubItem => h !== null) }).finally(() => { isLoadingHubs.value = false }) @@ -314,7 +314,7 @@ export function useCatalogInfo() { 'public', 'geo' ).then(hubsData => { - relatedHubs.value = (hubsData?.nearestHubs || []).filter((h): h is HubItem => h !== null) + relatedHubs.value = (hubsData?.nearest_hubs || []).filter((h): h is HubItem => h !== null) }).finally(() => { isLoadingHubs.value = false }) @@ -374,14 +374,14 @@ export function useCatalogInfo() { ) // Offers already include routes from backend - relatedOffers.value = (offersData?.nearestOffers || []).filter((o): o is OfferItem => o !== null) + relatedOffers.value = (offersData?.nearest_offers || []).filter((o): o is OfferItem => o !== null) isLoadingOffers.value = false - // Extract unique suppliers from offers (use supplierUuid from offers) + // Extract unique suppliers from offers (use supplier_uuid from offers) const supplierUuids = new Set() relatedOffers.value.forEach(offer => { - if (offer.supplierUuid) { - supplierUuids.add(offer.supplierUuid) + if (offer.supplier_uuid) { + supplierUuids.add(offer.supplier_uuid) } }) @@ -438,7 +438,7 @@ export function useCatalogInfo() { 'public', 'geo' ) - const hub = (hubsData?.nearestHubs || []).find((h): h is HubItem => h !== null) + const hub = (hubsData?.nearest_hubs || []).find((h): h is HubItem => h !== null) if (hub?.uuid) { hubUuid = hub.uuid if (!relatedHubs.value.length) { @@ -461,10 +461,10 @@ export function useCatalogInfo() { 'geo' ) - relatedOffers.value = (offersData?.nearestOffers || []).filter((o): o is OfferItem => { + relatedOffers.value = (offersData?.nearest_offers || []).filter((o): o is OfferItem => { if (!o) return false if (!supplier.uuid) return true - return o.supplierUuid === supplier.uuid + return o.supplier_uuid === supplier.uuid }) isLoadingOffers.value = false } finally { diff --git a/app/composables/useCatalogProducts.ts b/app/composables/useCatalogProducts.ts index 7255a07..7d4ce5b 100644 --- a/app/composables/useCatalogProducts.ts +++ b/app/composables/useCatalogProducts.ts @@ -9,8 +9,8 @@ import { } from '~/composables/graphql/public/exchange-generated' // Type from codegen -type ProductItem = NonNullable[number]> -type OfferItem = NonNullable[number]> +type ProductItem = NonNullable[number]> +type OfferItem = NonNullable[number]> // Product aggregated from offers interface AggregatedProduct { @@ -92,16 +92,16 @@ export function useCatalogProducts() { // Group offers by product const productsMap = new Map() - offersData?.nearestOffers?.forEach((offer) => { - if (!offer?.productUuid) return - if (!productsMap.has(offer.productUuid)) { - productsMap.set(offer.productUuid, { - uuid: offer.productUuid, - name: offer.productName, + offersData?.nearest_offers?.forEach((offer) => { + if (!offer?.product_uuid) return + if (!productsMap.has(offer.product_uuid)) { + productsMap.set(offer.product_uuid, { + uuid: offer.product_uuid, + name: offer.product_name, offersCount: 0 }) } - productsMap.get(offer.productUuid)!.offersCount++ + productsMap.get(offer.product_uuid)!.offersCount++ }) items.value = Array.from(productsMap.values()) as ProductItem[] } @@ -121,7 +121,7 @@ export function useCatalogProducts() { 'public', 'geo' ) - items.value = (data?.productsList || []).filter((p): p is ProductItem => p !== null) + items.value = (data?.products_list || []).filter((p): p is ProductItem => p !== null) } isInitialized.value = true diff --git a/app/composables/useCatalogSuppliers.ts b/app/composables/useCatalogSuppliers.ts index a9c4c06..0e57fee 100644 --- a/app/composables/useCatalogSuppliers.ts +++ b/app/composables/useCatalogSuppliers.ts @@ -4,8 +4,8 @@ import { SuppliersListDocument, NearestSuppliersDocument } from '~/composables/g const PAGE_SIZE = 500 // Types from codegen -type SupplierItem = NonNullable[number]> -type NearestSupplierItem = NonNullable[number]> +type SupplierItem = NonNullable[number]> +type NearestSupplierItem = NonNullable[number]> // Shared state across list and map views const items = ref>([]) @@ -41,7 +41,7 @@ export function useCatalogSuppliers() { 'public', 'geo' ) - items.value = (data?.nearestSuppliers || []).filter((s): s is NearestSupplierItem => s !== null) + items.value = (data?.nearest_suppliers || []).filter((s): s is NearestSupplierItem => s !== null) total.value = items.value.length isInitialized.value = true return @@ -63,7 +63,7 @@ export function useCatalogSuppliers() { 'public', 'geo' ) - const next = (data?.suppliersList || []).filter((s): s is SupplierItem => s !== null) + const next = (data?.suppliers_list || []).filter((s): s is SupplierItem => s !== null) items.value = replace ? next : items.value.concat(next) // suppliersList doesn't return total count, estimate from fetched items diff --git a/app/composables/useClusteredNodes.ts b/app/composables/useClusteredNodes.ts index bf6b039..6cf8f1d 100644 --- a/app/composables/useClusteredNodes.ts +++ b/app/composables/useClusteredNodes.ts @@ -1,5 +1,5 @@ import { GetClusteredNodesDocument } from './graphql/public/geo-generated' -import type { ClusterPointType } from './graphql/public/geo-generated' +import type { ClusterPoint } from './graphql/public/geo-generated' export interface MapBounds { west: number @@ -12,13 +12,10 @@ export interface MapBounds { export function useClusteredNodes( transportType?: Ref, nodeType?: Ref, - productUuid?: Ref, - hubUuid?: Ref, - supplierUuid?: Ref ) { const { client } = useApolloClient('publicGeo') - const clusteredNodes = ref([]) + const clusteredNodes = ref([]) const loading = ref(false) const fetchClusters = async (bounds: MapBounds) => { @@ -34,14 +31,11 @@ export function useClusteredNodes( zoom: Math.floor(bounds.zoom), transportType: transportType?.value, nodeType: nodeType?.value, - productUuid: productUuid?.value, - hubUuid: hubUuid?.value, - supplierUuid: supplierUuid?.value }, fetchPolicy: 'network-only' }) - clusteredNodes.value = (data?.clusteredNodes ?? []).filter(Boolean) as ClusterPointType[] + clusteredNodes.value = (data?.clustered_nodes ?? []).filter(Boolean) as ClusterPoint[] } catch (error) { console.error('Failed to fetch clustered nodes:', error) clusteredNodes.value = [] diff --git a/app/pages/catalog/hubs/[id]/index.vue b/app/pages/catalog/hubs/[id]/index.vue index 7fd08b3..fd5b454 100644 --- a/app/pages/catalog/hubs/[id]/index.vue +++ b/app/pages/catalog/hubs/[id]/index.vue @@ -44,7 +44,7 @@