diff --git a/cypress/e2e/stop-registry/hybridStop.cy.ts b/cypress/e2e/stop-registry/hybridStop.cy.ts index bdbde97ec7..85cc651e23 100644 --- a/cypress/e2e/stop-registry/hybridStop.cy.ts +++ b/cypress/e2e/stop-registry/hybridStop.cy.ts @@ -6,7 +6,14 @@ import { StopRegistryTransportModeType, } from '@hsl/jore4-test-db-manager/dist/CypressSpecExports'; import { Tag } from '../../enums'; -import { MapPage, StopDetailsPage, Toast } from '../../pageObjects'; +import { + FilterPanel, + MapPage, + StopDetailsPage, + StopSearchResultsPage, + Toast, +} from '../../pageObjects'; +import { StopTransportModeIcon } from '../../pageObjects/stop-registry/StopTransportModeIcon'; import { InsertedStopRegistryIds } from '../utils'; // Test labels @@ -134,96 +141,185 @@ describe( }); it('Should change the stop state of a mirrored quay', () => { - // Step 1: Create a bus stop on the map - MapPage.map.visit({ - zoom: 16, - lat: testCoordinates.lat, - lng: testCoordinates.lng, - }); + cy.section('Create a bus stop on the map', () => { + MapPage.map.visit({ + zoom: 16, + lat: testCoordinates.lat, + lng: testCoordinates.lng, + }); - MapPage.createStopAtLocation({ - stopFormInfo: { - publicCode: busStopLabel, - stopPlace: busAreaCode, - validityStartISODate: '2024-01-01', - priority: Priority.Standard, - reasonForChange: 'E2E test', - }, - clickRelativePoint: { - xPercentage: 40, - yPercentage: 55, - }, - vehicleMode: ReusableComponentsVehicleModeEnum.Bus, + MapPage.createStopAtLocation({ + stopFormInfo: { + publicCode: busStopLabel, + stopPlace: busAreaCode, + validityStartISODate: '2024-01-01', + priority: Priority.Standard, + reasonForChange: 'E2E test', + }, + clickRelativePoint: { + xPercentage: 40, + yPercentage: 55, + }, + vehicleMode: ReusableComponentsVehicleModeEnum.Bus, + }); + + MapPage.gqlStopShouldBeCreatedSuccessfully(); + MapPage.checkStopSubmitSuccessToast(); }); - MapPage.gqlStopShouldBeCreatedSuccessfully(); - MapPage.checkStopSubmitSuccessToast(); + cy.section('Navigate to stop details and make it hybrid', () => { + StopDetailsPage.visit(busStopLabel); + StopDetailsPage.page().shouldBeVisible(); - // Step 2: Navigate to stop details and make it hybrid - StopDetailsPage.visit(busStopLabel); - StopDetailsPage.page().shouldBeVisible(); + StopDetailsPage.titleRow.actionsMenuButton().click(); + StopDetailsPage.titleRow.actionsMenuMakeHybridButton().click(); - StopDetailsPage.titleRow.actionsMenuButton().click(); - StopDetailsPage.titleRow.actionsMenuMakeHybridButton().click(); + StopDetailsPage.makeHybridModal.modal().shouldBeVisible(); + StopDetailsPage.makeHybridModal.transportModeDropdown().click(); + cy.get('[role="option"]').contains('Raitiovaunu').click(); - StopDetailsPage.makeHybridModal.modal().shouldBeVisible(); - StopDetailsPage.makeHybridModal.transportModeDropdown().click(); - cy.get('[role="option"]').contains('Raitiovaunu').click(); + StopDetailsPage.makeHybridModal.stopAreaInput().type(tramAreaCode); + StopDetailsPage.makeHybridModal.stopAreaOption(tramAreaCode).click(); + StopDetailsPage.makeHybridModal.confirmButton().click(); - StopDetailsPage.makeHybridModal.stopAreaInput().type(tramAreaCode); - StopDetailsPage.makeHybridModal.stopAreaOption(tramAreaCode).click(); - StopDetailsPage.makeHybridModal.confirmButton().click(); - - Toast.expectSuccessToast('Yhteiskäyttöpysäkki luotu onnistuneesti'); - - // Step 3: Open mirrored quay edit mode - StopDetailsPage.mirroredQuayDetails.cards().should('exist'); - StopDetailsPage.mirroredQuayDetails - .cards() - .first() - .within(() => { - StopDetailsPage.mirroredQuayDetails.getEditButton().click(); - }); - - // Step 4: Change stop state to "Pois käytöstä" - StopDetailsPage.mirroredQuayDetails - .cards() - .first() - .within(() => { - StopDetailsPage.mirroredQuayDetails - .getStopStateDropdownButton() - .click(); - }); + Toast.expectSuccessToast('Yhteiskäyttöpysäkki luotu onnistuneesti'); + }); - StopDetailsPage.mirroredQuayDetails - .getStopStateDropdownOptions() - .contains('Pois käytöstä') - .click(); + cy.section( + 'Verify the Details page lists correct Transport Mode icons', + () => { + StopTransportModeIcon.assertTransportModeIcons({ + inUse: [ + StopRegistryTransportModeType.Bus, + StopRegistryTransportModeType.Tram, + ], + }); + }, + ); + + cy.section('Ensure the stop shows correctly on the map', () => { + StopDetailsPage.titleRow.openOnMapButton().click(); + MapPage.map.waitForLoadToComplete(); + + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, true); + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Tram, true); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .shouldBeVisible() + .and('have.attr', 'data-transport-modes', 'bus,tram'); + + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, false); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .shouldBeVisible(); + + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, true); + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Tram, false); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .shouldBeVisible(); + + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, false); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .should('not.exist'); + }); - // Step 5: Fill in reason for change and save - StopDetailsPage.mirroredQuayDetails - .cards() - .first() - .within(() => { - StopDetailsPage.mirroredQuayDetails.reasonForChange - .getReasonForChangeInput() - .type('E2E tilan muutos'); + cy.section('Mark the tram stop to be out of use', () => { + MapPage.getCloseButton().click(); + StopDetailsPage.mirroredQuayDetails.cards().should('exist'); + StopDetailsPage.mirroredQuayDetails + .cards() + .first() + .within(() => { + StopDetailsPage.mirroredQuayDetails.getEditButton().click(); + }); + + StopDetailsPage.mirroredQuayDetails + .cards() + .first() + .within(() => { + StopDetailsPage.mirroredQuayDetails + .getStopStateDropdownButton() + .click(); + }); + + StopDetailsPage.mirroredQuayDetails + .getStopStateDropdownOptions() + .contains('Pois käytöstä') + .click(); + + StopDetailsPage.mirroredQuayDetails + .cards() + .first() + .within(() => { + StopDetailsPage.mirroredQuayDetails.reasonForChange + .getReasonForChangeInput() + .type('E2E tilan muutos'); + + StopDetailsPage.mirroredQuayDetails.getSaveButton().click(); + }); + + Toast.expectSuccessToast(); + }); - StopDetailsPage.mirroredQuayDetails.getSaveButton().click(); + cy.section('Verify the stop state is updated on the page', () => { + StopDetailsPage.mirroredQuayDetails + .cards() + .first() + .within(() => { + cy.getByTestId('BasicDetailsSection::stopState').should( + 'contain', + 'Pois käytöstä', + ); + }); + + StopTransportModeIcon.assertTransportModeIcons({ + inUse: [StopRegistryTransportModeType.Bus], + outOfUse: [StopRegistryTransportModeType.Tram], }); + }); - Toast.expectSuccessToast(); + cy.section('Ensure the updated stop shows correctly on the map', () => { + StopDetailsPage.titleRow.openOnMapButton().click(); + MapPage.map.waitForLoadToComplete(); + + // Show as bus + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, true); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .shouldBeVisible() + .and('have.attr', 'data-transport-modes', 'bus'); + + // Does still also show under tram stops (it's just out of use) + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Bus, false); + FilterPanel.setShowStops(ReusableComponentsVehicleModeEnum.Tram, true); + MapPage.map + .getStopByStopLabelAndPriority(busStopLabel, Priority.Standard) + .shouldBeVisible(); + }); - // Step 6: Verify the stop state is updated in the view card - StopDetailsPage.mirroredQuayDetails - .cards() - .first() - .within(() => { - cy.getByTestId('BasicDetailsSection::stopState').should( - 'contain', - 'Pois käytöstä', - ); - }); + cy.section( + 'Ensure the updated stop shows correctly on the search', + () => { + cy.visit({ + url: '/stop-registry/search', + qs: { query: busStopLabel }, + }); + + StopSearchResultsPage.getContainer().should('be.visible'); + + // Ordered by label. + StopSearchResultsPage.getResultRows() + .first() + .within(() => { + StopTransportModeIcon.assertTransportModeIcons({ + inUse: [StopRegistryTransportModeType.Bus], + outOfUse: [StopRegistryTransportModeType.Tram], + }); + }); + }, + ); }); }, ); diff --git a/cypress/e2e/stop-registry/stopDetails.cy.ts b/cypress/e2e/stop-registry/stopDetails.cy.ts index 15c0198e41..574a9f18da 100644 --- a/cypress/e2e/stop-registry/stopDetails.cy.ts +++ b/cypress/e2e/stop-registry/stopDetails.cy.ts @@ -48,6 +48,7 @@ import { Toast, } from '../../pageObjects'; import { StopVersionForm } from '../../pageObjects/stop-registry/stop-details/StopVersionForm'; +import { StopTransportModeIcon } from '../../pageObjects/stop-registry/StopTransportModeIcon'; import { UUID } from '../../types'; import { SupportedResources, insertToDbHelper } from '../../utils'; import { expectGraphQLCallToSucceed } from '../../utils/assertions'; @@ -716,6 +717,9 @@ describe('Stop details', { tags: [Tag.StopRegistry] }, () => { StopDetailsPage.headerSummaryRow .stopState() .should('have.text', 'Pois käytöstä'); + StopTransportModeIcon.assertTransportModeIcons({ + outOfUse: ['TrunkLine'], + }); StopDetailsPage.basicDetails.getEditButton().click(); diff --git a/cypress/pageObjects/map/FilterPanel.ts b/cypress/pageObjects/map/FilterPanel.ts index 898fdd2a12..b22c910776 100644 --- a/cypress/pageObjects/map/FilterPanel.ts +++ b/cypress/pageObjects/map/FilterPanel.ts @@ -2,11 +2,25 @@ import { ReusableComponentsVehicleModeEnum } from '@hsl/jore4-test-db-manager/di import { capitalizeFirstLetter } from '../../e2e/utils'; export class FilterPanel { + static getToggle(vehicleMode: ReusableComponentsVehicleModeEnum) { + return cy.getByTestId( + `FilterPanel::toggleShowAll${capitalizeFirstLetter(vehicleMode)}Stops`, + ); + } + static toggleShowStops(vehicleMode: ReusableComponentsVehicleModeEnum) { - return cy - .getByTestId( - `FilterPanel::toggleShowAll${capitalizeFirstLetter(vehicleMode)}Stops`, - ) - .click(); + FilterPanel.getToggle(vehicleMode).click(); + } + + static setShowStops( + vehicleMode: ReusableComponentsVehicleModeEnum, + shouldBeActive: boolean, + ) { + FilterPanel.getToggle(vehicleMode).then((toggle) => { + const isActive = toggle.attr('aria-pressed') === 'true'; + if (isActive !== shouldBeActive) { + FilterPanel.toggleShowStops(vehicleMode); + } + }); } } diff --git a/cypress/pageObjects/stop-registry/StopTransportModeIcon.ts b/cypress/pageObjects/stop-registry/StopTransportModeIcon.ts new file mode 100644 index 0000000000..2daf626603 --- /dev/null +++ b/cypress/pageObjects/stop-registry/StopTransportModeIcon.ts @@ -0,0 +1,84 @@ +import { StopRegistryTransportModeType } from '@hsl/jore4-test-db-manager/dist/CypressSpecExports'; + +const knownModes = Object.values(StopRegistryTransportModeType).sort(); + +type ExtendedTransportMode = + | StopRegistryTransportModeType + | 'TrunkLine' + | 'SpeedTram'; + +type ModesByStatus = { + readonly inUse?: ReadonlyArray; + readonly outOfUse?: ReadonlyArray; +}; + +function extendedToBaseMode( + extendedMode: ExtendedTransportMode, +): StopRegistryTransportModeType { + if (extendedMode === 'TrunkLine') { + return StopRegistryTransportModeType.Bus; + } + + if (extendedMode === 'SpeedTram') { + return StopRegistryTransportModeType.Tram; + } + + return extendedMode; +} + +export class StopTransportModeIcon { + static getUnknown() { + return cy.getByTestId('StopTransportModeIcon::unknown'); + } + + static getIcons() { + return cy.getByTestId('StopTransportModeIcon::icon'); + } + + static getByTransportMode(mode: StopRegistryTransportModeType) { + return StopTransportModeIcon.getIcons().filter( + `[data-transport-mode="${mode}"]`, + ); + } + + static assertTransportModeIcons({ + inUse = [], + outOfUse = [], + }: ModesByStatus) { + StopTransportModeIcon.getUnknown().should('not.exist'); + + const listedModes = inUse.concat(outOfUse); + const listedBaseModes = listedModes.map(extendedToBaseMode); + const baseModesInUse = inUse.map(extendedToBaseMode); + + knownModes.forEach((mode) => { + if (!listedBaseModes.includes(mode)) { + StopTransportModeIcon.getByTransportMode(mode).should('not.exist'); + } else { + StopTransportModeIcon.getByTransportMode(mode) + .shouldBeVisible() + .and( + 'have.attr', + 'data-active', + baseModesInUse.includes(mode).toString(), + ) + .and( + 'have.attr', + 'data-trunk-line', + ( + mode === StopRegistryTransportModeType.Bus && + listedModes.includes('TrunkLine') + ).toString(), + ) + .and( + 'have.attr', + 'data-speed-tram', + ( + mode === StopRegistryTransportModeType.Tram && + listedModes.includes('SpeedTram') + ).toString(), + ); + } + }); + } +} diff --git a/cypress/pageObjects/stop-registry/stop-details/StopTitleRow.ts b/cypress/pageObjects/stop-registry/stop-details/StopTitleRow.ts index 1991132f77..b17c94bb20 100644 --- a/cypress/pageObjects/stop-registry/stop-details/StopTitleRow.ts +++ b/cypress/pageObjects/stop-registry/stop-details/StopTitleRow.ts @@ -8,7 +8,7 @@ export class StopTitleRow { } static openOnMapButton() { - return cy.getByTestId('StopTitleRow::StopTitleRow::openOnMapButton'); + return cy.getByTestId('StopTitleRow::openOnMapButton'); } static actionsMenuButton() { diff --git a/test-db-manager/src/generated/graphql.ts b/test-db-manager/src/generated/graphql.ts index 6582a10894..2cf1242b80 100644 --- a/test-db-manager/src/generated/graphql.ts +++ b/test-db-manager/src/generated/graphql.ts @@ -40992,6 +40992,7 @@ export type StopsDatabaseQuayMutationResponse = { export type StopsDatabaseQuayNewestVersion = { __typename?: 'stops_database_quay_newest_version'; accessibility_assessment_id?: Maybe; + active_transport_modes?: Maybe; all_areas_wheelchair_accessible?: Maybe; centroid?: Maybe; changed?: Maybe; @@ -41005,7 +41006,7 @@ export type StopsDatabaseQuayNewestVersion = { /** An object relationship */ equipments?: Maybe; from_date?: Maybe; - functional_area?: Maybe; + functional_area?: Maybe; id?: Maybe; /** An array relationship */ info_spot_locations: Array; @@ -41022,7 +41023,7 @@ export type StopsDatabaseQuayNewestVersion = { place_equipments_id?: Maybe; polygon_id?: Maybe; postal_code?: Maybe; - priority?: Maybe; + priority?: Maybe; private_code_type?: Maybe; private_code_value?: Maybe; public_code?: Maybe; @@ -41039,6 +41040,7 @@ export type StopsDatabaseQuayNewestVersion = { short_name_value?: Maybe; site_ref?: Maybe; site_ref_version?: Maybe; + speed_tram_stop?: Maybe; /** An object relationship */ stopPlaceParent?: Maybe; stop_owner?: Maybe; @@ -41054,13 +41056,21 @@ export type StopsDatabaseQuayNewestVersion = { timing_place?: Maybe; timing_place_id?: Maybe; to_date?: Maybe; - validity_end?: Maybe; - validity_start?: Maybe; + transport_modes?: Maybe; + trunk_line_stop?: Maybe; + validity_end?: Maybe; + validity_start?: Maybe; version?: Maybe; version_comment?: Maybe; }; +/** columns and relationships of "quay_newest_version" */ +export type StopsDatabaseQuayNewestVersionActiveTransportModesArgs = { + path?: InputMaybe; +}; + + /** columns and relationships of "quay_newest_version" */ export type StopsDatabaseQuayNewestVersionInfoSpotLocationsArgs = { distinct_on?: InputMaybe>; @@ -41120,6 +41130,12 @@ export type StopsDatabaseQuayNewestVersionQuayKeyValuesAggregateArgs = { where?: InputMaybe; }; + +/** columns and relationships of "quay_newest_version" */ +export type StopsDatabaseQuayNewestVersionTransportModesArgs = { + path?: InputMaybe; +}; + /** aggregated selection of "quay_newest_version" */ export type StopsDatabaseQuayNewestVersionAggregate = { __typename?: 'stops_database_quay_newest_version_aggregate'; @@ -41156,9 +41172,11 @@ export type StopsDatabaseQuayNewestVersionAvgFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41170,6 +41188,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { _not?: InputMaybe; _or?: InputMaybe>; accessibility_assessment_id?: InputMaybe; + active_transport_modes?: InputMaybe; all_areas_wheelchair_accessible?: InputMaybe; centroid?: InputMaybe; changed?: InputMaybe; @@ -41182,7 +41201,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { ely_code?: InputMaybe; equipments?: InputMaybe; from_date?: InputMaybe; - functional_area?: InputMaybe; + functional_area?: InputMaybe; id?: InputMaybe; info_spot_locations?: InputMaybe; info_spot_locations_aggregate?: InputMaybe; @@ -41197,7 +41216,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { place_equipments_id?: InputMaybe; polygon_id?: InputMaybe; postal_code?: InputMaybe; - priority?: InputMaybe; + priority?: InputMaybe; private_code_type?: InputMaybe; private_code_value?: InputMaybe; public_code?: InputMaybe; @@ -41209,6 +41228,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { short_name_value?: InputMaybe; site_ref?: InputMaybe; site_ref_version?: InputMaybe; + speed_tram_stop?: InputMaybe; stopPlaceParent?: InputMaybe; stop_owner?: InputMaybe; stop_place?: InputMaybe; @@ -41220,8 +41240,10 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { street_address?: InputMaybe; timing_place_id?: InputMaybe; to_date?: InputMaybe; - validity_end?: InputMaybe; - validity_start?: InputMaybe; + transport_modes?: InputMaybe; + trunk_line_stop?: InputMaybe; + validity_end?: InputMaybe; + validity_start?: InputMaybe; version?: InputMaybe; version_comment?: InputMaybe; }; @@ -41239,7 +41261,7 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { description_value?: Maybe; ely_code?: Maybe; from_date?: Maybe; - functional_area?: Maybe; + functional_area?: Maybe; id?: Maybe; label_lang?: Maybe; label_value?: Maybe; @@ -41252,7 +41274,7 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { place_equipments_id?: Maybe; polygon_id?: Maybe; postal_code?: Maybe; - priority?: Maybe; + priority?: Maybe; private_code_type?: Maybe; private_code_value?: Maybe; public_code?: Maybe; @@ -41268,8 +41290,8 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { street_address?: Maybe; timing_place_id?: Maybe; to_date?: Maybe; - validity_end?: Maybe; - validity_start?: Maybe; + validity_end?: Maybe; + validity_start?: Maybe; version?: Maybe; version_comment?: Maybe; }; @@ -41287,7 +41309,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { description_value?: Maybe; ely_code?: Maybe; from_date?: Maybe; - functional_area?: Maybe; + functional_area?: Maybe; id?: Maybe; label_lang?: Maybe; label_value?: Maybe; @@ -41300,7 +41322,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { place_equipments_id?: Maybe; polygon_id?: Maybe; postal_code?: Maybe; - priority?: Maybe; + priority?: Maybe; private_code_type?: Maybe; private_code_value?: Maybe; public_code?: Maybe; @@ -41316,8 +41338,8 @@ export type StopsDatabaseQuayNewestVersionMinFields = { street_address?: Maybe; timing_place_id?: Maybe; to_date?: Maybe; - validity_end?: Maybe; - validity_start?: Maybe; + validity_end?: Maybe; + validity_start?: Maybe; version?: Maybe; version_comment?: Maybe; }; @@ -41325,6 +41347,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { /** Ordering options when selecting data from "quay_newest_version". */ export type StopsDatabaseQuayNewestVersionOrderBy = { accessibility_assessment_id?: InputMaybe; + active_transport_modes?: InputMaybe; all_areas_wheelchair_accessible?: InputMaybe; centroid?: InputMaybe; changed?: InputMaybe; @@ -41361,6 +41384,7 @@ export type StopsDatabaseQuayNewestVersionOrderBy = { short_name_value?: InputMaybe; site_ref?: InputMaybe; site_ref_version?: InputMaybe; + speed_tram_stop?: InputMaybe; stopPlaceParent?: InputMaybe; stop_owner?: InputMaybe; stop_place?: InputMaybe; @@ -41372,6 +41396,8 @@ export type StopsDatabaseQuayNewestVersionOrderBy = { street_address?: InputMaybe; timing_place_id?: InputMaybe; to_date?: InputMaybe; + transport_modes?: InputMaybe; + trunk_line_stop?: InputMaybe; validity_end?: InputMaybe; validity_start?: InputMaybe; version?: InputMaybe; @@ -41383,6 +41409,8 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ AccessibilityAssessmentId = 'accessibility_assessment_id', /** column name */ + ActiveTransportModes = 'active_transport_modes', + /** column name */ AllAreasWheelchairAccessible = 'all_areas_wheelchair_accessible', /** column name */ Centroid = 'centroid', @@ -41447,6 +41475,8 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ SiteRefVersion = 'site_ref_version', /** column name */ + SpeedTramStop = 'speed_tram_stop', + /** column name */ StopOwner = 'stop_owner', /** column name */ StopPlaceId = 'stop_place_id', @@ -41463,6 +41493,10 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ ToDate = 'to_date', /** column name */ + TransportModes = 'transport_modes', + /** column name */ + TrunkLineStop = 'trunk_line_stop', + /** column name */ ValidityEnd = 'validity_end', /** column name */ ValidityStart = 'validity_start', @@ -41478,9 +41512,11 @@ export type StopsDatabaseQuayNewestVersionStddevFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41492,9 +41528,11 @@ export type StopsDatabaseQuayNewestVersionStddevPopFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41506,9 +41544,11 @@ export type StopsDatabaseQuayNewestVersionStddevSampFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41525,6 +41565,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorInput = { /** Initial value of the column from where the streaming should start */ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { accessibility_assessment_id?: InputMaybe; + active_transport_modes?: InputMaybe; all_areas_wheelchair_accessible?: InputMaybe; centroid?: InputMaybe; changed?: InputMaybe; @@ -41536,7 +41577,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { description_value?: InputMaybe; ely_code?: InputMaybe; from_date?: InputMaybe; - functional_area?: InputMaybe; + functional_area?: InputMaybe; id?: InputMaybe; label_lang?: InputMaybe; label_value?: InputMaybe; @@ -41549,7 +41590,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { place_equipments_id?: InputMaybe; polygon_id?: InputMaybe; postal_code?: InputMaybe; - priority?: InputMaybe; + priority?: InputMaybe; private_code_type?: InputMaybe; private_code_value?: InputMaybe; public_code?: InputMaybe; @@ -41557,6 +41598,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { short_name_value?: InputMaybe; site_ref?: InputMaybe; site_ref_version?: InputMaybe; + speed_tram_stop?: InputMaybe; stop_owner?: InputMaybe; stop_place_id?: InputMaybe; stop_place_netex_id?: InputMaybe; @@ -41565,8 +41607,10 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { street_address?: InputMaybe; timing_place_id?: InputMaybe; to_date?: InputMaybe; - validity_end?: InputMaybe; - validity_start?: InputMaybe; + transport_modes?: InputMaybe; + trunk_line_stop?: InputMaybe; + validity_end?: InputMaybe; + validity_start?: InputMaybe; version?: InputMaybe; version_comment?: InputMaybe; }; @@ -41577,9 +41621,11 @@ export type StopsDatabaseQuayNewestVersionSumFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41591,9 +41637,11 @@ export type StopsDatabaseQuayNewestVersionVarPopFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41605,9 +41653,11 @@ export type StopsDatabaseQuayNewestVersionVarSampFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; @@ -41619,9 +41669,11 @@ export type StopsDatabaseQuayNewestVersionVarianceFields = { accessibility_assessment_id?: Maybe; compass_bearing?: Maybe; covered?: Maybe; + functional_area?: Maybe; id?: Maybe; place_equipments_id?: Maybe; polygon_id?: Maybe; + priority?: Maybe; stop_place_id?: Maybe; stop_place_version?: Maybe; version?: Maybe; diff --git a/ui/graphql.schema.json b/ui/graphql.schema.json index 00cbadae10..7469b3d109 100644 --- a/ui/graphql.schema.json +++ b/ui/graphql.schema.json @@ -278622,6 +278622,31 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "active_transport_modes", + "description": null, + "args": [ + { + "name": "path", + "description": "JSON select path", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "jsonb", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "all_areas_wheelchair_accessible", "description": null, @@ -278772,7 +278797,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "float8", "ofType": null }, "isDeprecated": false, @@ -279122,7 +279147,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, "isDeprecated": false, @@ -279612,6 +279637,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "speed_tram_stop", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stopPlaceParent", "description": "An object relationship", @@ -279756,13 +279793,50 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transport_modes", + "description": null, + "args": [ + { + "name": "path", + "description": "JSON select path", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "jsonb", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trunk_line_stop", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "validity_end", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -279774,7 +279848,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -280081,6 +280155,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -280117,6 +280203,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -280230,6 +280328,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "active_transport_modes", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "jsonb_comparison_exp", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "all_areas_wheelchair_accessible", "description": null, @@ -280379,7 +280489,7 @@ "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "String_comparison_exp", + "name": "float8_comparison_exp", "ofType": null }, "defaultValue": null, @@ -280559,7 +280669,7 @@ "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "String_comparison_exp", + "name": "Int_comparison_exp", "ofType": null }, "defaultValue": null, @@ -280698,6 +280808,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "speed_tram_stop", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Boolean_comparison_exp", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stopPlaceParent", "description": null, @@ -280830,12 +280952,36 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transport_modes", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "jsonb_comparison_exp", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trunk_line_stop", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Boolean_comparison_exp", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "validity_end", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "String_comparison_exp", + "name": "date_comparison_exp", "ofType": null }, "defaultValue": null, @@ -280847,7 +280993,7 @@ "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "String_comparison_exp", + "name": "date_comparison_exp", "ofType": null }, "defaultValue": null, @@ -281015,7 +281161,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "float8", "ofType": null }, "isDeprecated": false, @@ -281171,7 +281317,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, "isDeprecated": false, @@ -281363,7 +281509,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -281375,7 +281521,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -281543,7 +281689,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "float8", "ofType": null }, "isDeprecated": false, @@ -281699,7 +281845,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, "isDeprecated": false, @@ -281891,7 +282037,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -281903,7 +282049,7 @@ "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "isDeprecated": false, @@ -281958,6 +282104,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "active_transport_modes", + "description": null, + "type": { + "kind": "ENUM", + "name": "order_by", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "all_areas_wheelchair_accessible", "description": null, @@ -282390,6 +282548,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "speed_tram_stop", + "description": null, + "type": { + "kind": "ENUM", + "name": "order_by", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stopPlaceParent", "description": null, @@ -282522,6 +282692,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transport_modes", + "description": null, + "type": { + "kind": "ENUM", + "name": "order_by", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trunk_line_stop", + "description": null, + "type": { + "kind": "ENUM", + "name": "order_by", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "validity_end", "description": null, @@ -282590,6 +282784,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "active_transport_modes", + "description": "column name", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "all_areas_wheelchair_accessible", "description": "column name", @@ -282782,6 +282982,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "speed_tram_stop", + "description": "column name", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_owner", "description": "column name", @@ -282830,6 +283036,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transport_modes", + "description": "column name", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trunk_line_stop", + "description": "column name", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "validity_end", "description": "column name", @@ -282899,6 +283117,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -282935,6 +283165,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -283019,6 +283261,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -283055,6 +283309,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -283139,6 +283405,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -283175,6 +283453,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -283276,6 +283566,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "active_transport_modes", + "description": null, + "type": { + "kind": "SCALAR", + "name": "jsonb", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "all_areas_wheelchair_accessible", "description": null, @@ -283413,7 +283715,7 @@ "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "float8", "ofType": null }, "defaultValue": null, @@ -283569,7 +283871,7 @@ "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, "defaultValue": null, @@ -283660,6 +283962,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "speed_tram_stop", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_owner", "description": null, @@ -283756,12 +284070,36 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transport_modes", + "description": null, + "type": { + "kind": "SCALAR", + "name": "jsonb", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "trunk_line_stop", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "validity_end", "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "defaultValue": null, @@ -283773,7 +284111,7 @@ "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "date", "ofType": null }, "defaultValue": null, @@ -283851,6 +284189,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "float8", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -283887,6 +284237,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -283971,6 +284333,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -284007,6 +284381,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -284091,6 +284477,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -284127,6 +284525,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, @@ -284211,6 +284621,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "functional_area", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -284247,6 +284669,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stop_place_id", "description": null, diff --git a/ui/src/components/forms/stop/utils/useGetStopInfoForEditingOnMap.ts b/ui/src/components/forms/stop/utils/useGetStopInfoForEditingOnMap.ts index 2fdddb75a2..b4b34a2716 100644 --- a/ui/src/components/forms/stop/utils/useGetStopInfoForEditingOnMap.ts +++ b/ui/src/components/forms/stop/utils/useGetStopInfoForEditingOnMap.ts @@ -153,8 +153,8 @@ function parseResult( timingPlaceId: timingPlaceInfo?.id ?? null, priority: Number(requireValue(rawQuay.priority)), - validityStart: requireValue(rawQuay.validityStart), - validityEnd: rawQuay.validityEnd ?? undefined, + validityStart: requireValue(rawQuay.validityStart).toISODate(), + validityEnd: rawQuay.validityEnd?.toISODate(), indefinite: !rawQuay.validityEnd, keyValues: rawQuay.keyValues.map((rawKeyValue) => ({ diff --git a/ui/src/components/map/StopSelection/SelectedStop.tsx b/ui/src/components/map/StopSelection/SelectedStop.tsx index 82c3dc7742..d2c0eb3d85 100644 --- a/ui/src/components/map/StopSelection/SelectedStop.tsx +++ b/ui/src/components/map/StopSelection/SelectedStop.tsx @@ -6,7 +6,7 @@ import { CloseIconButton } from '../../../uiComponents'; const testIds = { stop: ( publicCode: string | null | undefined, - priority: string | null | undefined, + priority: Priority | null | undefined, ) => `Map::StopSelection::Stop::${publicCode ?? ''}${priority ? `-${priority}` : ''}`, removeButton: 'Map::StopSelection::RemoveSelection', @@ -20,7 +20,7 @@ const knownPriorityIconsClasses: Readonly> = { [Priority.Standard]: `${baseIconClasses} text-light-grey icon-placeholder-dot`, }; -function getPriorityIconClasses(rawPriority?: string | null): string { +function getPriorityIconClasses(rawPriority?: Priority | null): string { if (rawPriority) { return knownPriorityIconsClasses[rawPriority] ?? baseIconClasses; } diff --git a/ui/src/components/map/markers/StopMarker.tsx b/ui/src/components/map/markers/StopMarker.tsx index bd5b151640..312df3304c 100644 --- a/ui/src/components/map/markers/StopMarker.tsx +++ b/ui/src/components/map/markers/StopMarker.tsx @@ -1,4 +1,5 @@ import { FC, MouseEventHandler, useEffect, useState } from 'react'; +import { StopRegistryTransportModeType } from '../../../generated/graphql'; import { MapStop } from '../types'; const testIds = { @@ -19,11 +20,15 @@ type StopMarkerBaseProps = { readonly size?: number; readonly borderWidth?: number; readonly fillColor?: string; + readonly secondaryFillColor?: string | null; readonly borderColor?: string; readonly strokeDashArray?: number; readonly centerDot?: boolean; readonly inSelection?: boolean; readonly showLabel?: boolean; + readonly transportModes?: ReadonlyArray; + readonly trunkLine?: boolean; + readonly speedTram?: boolean; }; type ExistingStopMarkerSpecialProps = { @@ -47,6 +52,7 @@ type StopMarkerProps = PlaceholderStopMarkerProps | ExistingStopMarkerProps; export const StopMarker: FC = ({ testId, fillColor = 'white', + secondaryFillColor = null, borderColor = 'black', strokeDashArray = 0, centerDot = false, @@ -55,6 +61,9 @@ export const StopMarker: FC = ({ onResolveTitle, stop, showLabel = false, + transportModes = [], + trunkLine = false, + speedTram = false, }) => { const [isMouseHovering, setIsMouseHovering] = useState(false); const [promisedTitle, setPromisedTitle] = useState( @@ -105,6 +114,9 @@ export const StopMarker: FC = ({ onClick={onClick ? () => onClick(stop) : undefined} aria-label={stop?.label} data-testid={testId} + data-transport-modes={transportModes.join(',')} + data-trunk-line={trunkLine} + data-speed-tram={speedTram} > = ({ strokeWidth={1} fill={fillColor} /> + + {secondaryFillColor && ( + + )} + {!inSelection && (centerDot || isMouseHovering) && ( )} diff --git a/ui/src/components/map/queries/useGetMapStops.ts b/ui/src/components/map/queries/useGetMapStops.ts index 894a653f5b..4c7fdc5af1 100644 --- a/ui/src/components/map/queries/useGetMapStops.ts +++ b/ui/src/components/map/queries/useGetMapStops.ts @@ -11,7 +11,7 @@ import { Viewport } from '../../../redux/types'; import { parseDate } from '../../../time'; import { Priority } from '../../../types/enums'; import { StopPlaceState } from '../../../types/stop-registry'; -import { parseVehicleMode } from '../../../utils'; +import { parseStopRegistryTransportModeJsonArray } from '../../../utils'; import { useMapDataLayerSimpleQueryLoader } from '../../common/hooks/useLoader'; import { filtersAndResultSelectionToQueryVariables } from '../../stop-registry/search/by-stop/filtersToQueryVariables'; import { mapCompactOrNull } from '../../stop-registry/utils'; @@ -43,10 +43,10 @@ const GQL_GET_MAP_STOPS = gql` centroid functional_area - stop_place { - id - transport_mode - } + transport_modes + active_transport_modes + trunk_line_stop + speed_tram_stop } `; @@ -115,9 +115,6 @@ function mapRawStopToMapStop( return null; } - const vehicleMode = - parseVehicleMode(rawStop.stop_place?.transport_mode) ?? undefined; - return { label: rawStop.label, location: rawStop.centroid, @@ -127,8 +124,15 @@ function mapRawStopToMapStop( validity_start: parseDate(rawStop.validity_start), validity_end: parseDate(rawStop.validity_end), functional_area: parseValidNumber(rawStop.functional_area), - vehicle_mode: vehicleMode, stop_state: rawStop.stop_state as StopPlaceState, + transport_modes: parseStopRegistryTransportModeJsonArray( + rawStop.transport_modes, + ), + active_transport_modes: parseStopRegistryTransportModeJsonArray( + rawStop.active_transport_modes, + ), + trunk_line_stop: !!rawStop.trunk_line_stop, + speed_tram_stop: !!rawStop.speed_tram_stop, }; } diff --git a/ui/src/components/map/stops/EditStopLayer.tsx b/ui/src/components/map/stops/EditStopLayer.tsx index a8da4cdb9c..58367971ca 100644 --- a/ui/src/components/map/stops/EditStopLayer.tsx +++ b/ui/src/components/map/stops/EditStopLayer.tsx @@ -21,7 +21,11 @@ import { toggleStopSelectionAction, } from '../../../redux'; import { EnrichedStopPlace, Point } from '../../../types'; -import { parseVehicleMode, showSuccessToast } from '../../../utils'; +import { + mapVehicleModeToTransportMode, + parseVehicleMode, + showSuccessToast, +} from '../../../utils'; import { useMapDataLayerLoader } from '../../common/hooks'; import { StopFormState, @@ -279,7 +283,9 @@ export const EditStopLayer = forwardRef( latitude={draftLocation.latitude} mapStopViewState={mapStopViewState} selected - vehicleMode={draftVehicleMode} + activeTransportModes={[ + mapVehicleModeToTransportMode(draftVehicleMode), + ]} /> )} diff --git a/ui/src/components/map/stops/Stop.tsx b/ui/src/components/map/stops/Stop.tsx index c6af002f80..68d535719d 100644 --- a/ui/src/components/map/stops/Stop.tsx +++ b/ui/src/components/map/stops/Stop.tsx @@ -1,7 +1,7 @@ import type { PointLike } from 'maplibre-gl'; import { FC } from 'react'; import { Marker } from 'react-map-gl/maplibre'; -import { ReusableComponentsVehicleModeEnum } from '../../../generated/graphql'; +import { StopRegistryTransportModeType } from '../../../generated/graphql'; import { theme } from '../../../generated/theme'; import { MapEntityEditorViewState } from '../../../redux'; import { StopMarker } from '../markers'; @@ -13,6 +13,38 @@ const { colors } = theme; // Needed to align the stop correctly, when the stop label is or isn't shown. const offset: PointLike = [-13, 0]; +function determineTransportModeColor( + mode: StopRegistryTransportModeType, + isTrunkLineStop: boolean, + isSpeedTramStop: boolean, +) { + if (mode === StopRegistryTransportModeType.Bus) { + return isTrunkLineStop ? colors.hslTrunkLineOrange : colors.tweakedBrand; + } + + if (mode === StopRegistryTransportModeType.Tram) { + return isSpeedTramStop + ? colors.hslSpeedTramTurquoise + : colors.hslTramDarkGreen; + } + + if (mode === StopRegistryTransportModeType.Metro) { + return colors.hslMetroOrange; + } + + if (mode === StopRegistryTransportModeType.Water) { + return colors.hslFerryBlue; + } + + if (mode === StopRegistryTransportModeType.Rail) { + return colors.hslFerryBlue; + } + + throw new Error( + `No color specified for StopRegistryTransportModeType(${mode})!`, + ); +} + /** Stop map markers border color is determined in this function. There are * different aspects which are affecting this determination. These are * * isPlaceholder: when moving a stop we have a placeholder for the stop's @@ -28,7 +60,9 @@ function determineBorderColor( asMemberStop: boolean, isSelected: boolean, isPlaceholder: boolean, - stopVehicleMode: ReusableComponentsVehicleModeEnum | undefined, + activeTransportModes: ReadonlyArray, + isTrunkLineStop: boolean, + isSpeedTramStop: boolean, inSelection: boolean, ) { if (inSelection) { @@ -51,8 +85,13 @@ function determineBorderColor( return colors.selectedMapItem; } - if (stopVehicleMode) { - return colors.stops[stopVehicleMode] ?? colors.hslDark80; + const primaryMode = activeTransportModes.at(0); + if (primaryMode) { + return determineTransportModeColor( + primaryMode, + isTrunkLineStop, + isSpeedTramStop, + ); } return colors.hslDark80; @@ -63,18 +102,43 @@ function determineFillColor( isSelected: boolean, inSelection: boolean, shouldBeGray: boolean, + activeTransportModes: ReadonlyArray, ) { if (isSelected || asMemberStop || inSelection) { return 'white'; } - if (shouldBeGray) { + if (shouldBeGray || activeTransportModes.length === 0) { return colors.lightGrey; } return 'white'; } +function determineSecondaryFillColor( + asMemberStop: boolean, + isSelected: boolean, + inSelection: boolean, + activeTransportModes: ReadonlyArray, + isTrunkLineStop: boolean, + isSpeedTramStop: boolean, +) { + if (isSelected || asMemberStop || inSelection) { + return null; + } + + if (activeTransportModes.length >= 2) { + const secondaryMode = activeTransportModes[1]; + return determineTransportModeColor( + secondaryMode, + isTrunkLineStop, + isSpeedTramStop, + ); + } + + return null; +} + type BaseStopProps = { readonly longitude: number; readonly latitude: number; @@ -84,7 +148,9 @@ type BaseStopProps = { readonly mapStopViewState: MapEntityEditorViewState; readonly selected?: boolean; readonly testId?: string; - readonly vehicleMode?: ReusableComponentsVehicleModeEnum; + readonly activeTransportModes: ReadonlyArray; + readonly isTrunkLineStop?: boolean; + readonly isSpeedTramStop?: boolean; readonly shouldBeGray?: boolean; readonly showLabel?: boolean; }; @@ -114,7 +180,9 @@ export const Stop: FC = ({ mapStopViewState, selected = false, testId, - vehicleMode, + activeTransportModes, + isTrunkLineStop = false, + isSpeedTramStop = false, shouldBeGray = false, onClick, onResolveTitle, @@ -130,7 +198,9 @@ export const Stop: FC = ({ asMemberStop, selected, isPlaceholder, - vehicleMode, + activeTransportModes, + isTrunkLineStop, + isSpeedTramStop, inSelection, ); @@ -139,6 +209,16 @@ export const Stop: FC = ({ selected, inSelection, shouldBeGray, + activeTransportModes, + ); + + const secondaryFillColor = determineSecondaryFillColor( + asMemberStop, + selected, + inSelection, + activeTransportModes, + isTrunkLineStop, + isSpeedTramStop, ); return ( @@ -153,11 +233,15 @@ export const Stop: FC = ({ testId={testId} borderColor={iconBorderColor} fillColor={iconFillColor} + secondaryFillColor={secondaryFillColor} borderWidth={3} strokeDashArray={isPlaceholder ? 2 : 0} centerDot={selected} inSelection={inSelection} showLabel={showLabel} + transportModes={activeTransportModes} + trunkLine={isTrunkLineStop} + speedTram={isSpeedTramStop} // eslint-disable-next-line react/jsx-props-no-spreading {...(stop ? ({ diff --git a/ui/src/components/map/stops/Stops.tsx b/ui/src/components/map/stops/Stops.tsx index 4652c6cf64..e34ab1b713 100644 --- a/ui/src/components/map/stops/Stops.tsx +++ b/ui/src/components/map/stops/Stops.tsx @@ -116,12 +116,9 @@ export const StopsImpl: ForwardRefRenderFunction = ( const { setIsLoading: setIsLoadingSaveStop } = useLoader(Operation.SaveStop); - const { getStopVehicleMode, getStopHighlighted, getStopShouldBeGray } = + const { getStopHighlighted, getStopShouldBeGray } = useMapStops(displayedRouteIds); - const filterStopsByVehicleMode = useFilterStopsByVehicleMode( - getStopVehicleMode, - showRoute, - ); + const filterStopsByVehicleMode = useFilterStopsByVehicleMode(showRoute); const { setLoadingState: setFetchStopsLoadingState } = useLoader( Operation.FetchStops, @@ -253,7 +250,9 @@ export const StopsImpl: ForwardRefRenderFunction = ( ? testIds.memberStop(item.label) : testIds.stopMarker(item.label, item.priority) } - vehicleMode={getStopVehicleMode(item)} + activeTransportModes={item.active_transport_modes} + isTrunkLineStop={item.trunk_line_stop} + isSpeedTramStop={item.speed_tram_stop} shouldBeGray={getStopShouldBeGray(item)} /> ); diff --git a/ui/src/components/map/stops/hooks/useFilterStopsByVehicleMode.ts b/ui/src/components/map/stops/hooks/useFilterStopsByVehicleMode.ts index 1d2e26aac1..8c7e406beb 100644 --- a/ui/src/components/map/stops/hooks/useFilterStopsByVehicleMode.ts +++ b/ui/src/components/map/stops/hooks/useFilterStopsByVehicleMode.ts @@ -1,45 +1,40 @@ import { useCallback } from 'react'; -import { ReusableComponentsVehicleModeEnum } from '../../../../generated/graphql'; +import { StopRegistryTransportModeType } from '../../../../generated/graphql'; import { useAppSelector } from '../../../../hooks'; import { FilterType, selectMapFilter } from '../../../../redux'; -import { parseVehicleMode } from '../../../../utils'; import { MapStop } from '../../types'; import { useVisibleRouteStops } from './useVisibleRouteStops'; -export function useFilterStopsByVehicleMode( - getStopVehicleMode: ( - stop: MapStop, - ) => ReusableComponentsVehicleModeEnum | undefined, - showRoute: boolean, -) { +export function useFilterStopsByVehicleMode(showRoute: boolean) { const { stopFilters } = useAppSelector(selectMapFilter); const { visibleRouteStopLabels } = useVisibleRouteStops(); return useCallback( (stops: ReadonlyArray): ReadonlyArray => stops.filter((stop) => { - const vehicleMode = parseVehicleMode(getStopVehicleMode(stop)); const isStopInVisibleRoutes = showRoute && visibleRouteStopLabels.includes(stop.label); - if (vehicleMode === ReusableComponentsVehicleModeEnum.Bus) { - return ( - stopFilters[FilterType.ShowAllBusStops] || isStopInVisibleRoutes - ); + if (isStopInVisibleRoutes) { + return true; } - if (vehicleMode === ReusableComponentsVehicleModeEnum.Tram) { - return ( - stopFilters[FilterType.ShowAllTramStops] || isStopInVisibleRoutes - ); + if ( + stop.transport_modes.includes(StopRegistryTransportModeType.Bus) && + stopFilters[FilterType.ShowAllBusStops] + ) { + return true; } - return ( - stopFilters[FilterType.ShowAllBusStops] || - stopFilters[FilterType.ShowAllTramStops] || - isStopInVisibleRoutes - ); + if ( + stop.transport_modes.includes(StopRegistryTransportModeType.Tram) && + stopFilters[FilterType.ShowAllTramStops] + ) { + return true; + } + + return false; }), - [getStopVehicleMode, showRoute, stopFilters, visibleRouteStopLabels], + [showRoute, stopFilters, visibleRouteStopLabels], ); } diff --git a/ui/src/components/map/stops/hooks/useMapStops.ts b/ui/src/components/map/stops/hooks/useMapStops.ts index 22a9dedf78..570061000f 100644 --- a/ui/src/components/map/stops/hooks/useMapStops.ts +++ b/ui/src/components/map/stops/hooks/useMapStops.ts @@ -14,7 +14,6 @@ import { selectSelectedStopId, } from '../../../../redux'; import { Priority } from '../../../../types/enums'; -import { StopPlaceState } from '../../../../types/stop-registry'; import { filterHighestPriorityCurrentStops, isCurrentEntity, @@ -103,17 +102,9 @@ export const useMapStops = (displayedRouteIds: ReadonlyArray) => { [editedRouteIncludedStops, stopLabelToVehicleMode], ); - const getStopVehicleMode = useCallback( - (stop: MapStop): ReusableComponentsVehicleModeEnum | undefined => - stop.vehicle_mode ?? stopLabelToVehicleMode[stop.label], - [stopLabelToVehicleMode], - ); - const getStopShouldBeGray = useCallback( (stop: MapStop): boolean => (!!selectedRouteId && !usedStopLabels.includes(stop.label)) || - (stop.stop_state !== null && - stop.stop_state !== StopPlaceState.InOperation) || !isCurrentEntity(observationDate, stop), [selectedRouteId, observationDate, usedStopLabels], ); @@ -133,5 +124,5 @@ export const useMapStops = (displayedRouteIds: ReadonlyArray) => { [highlightedStopIds, selectedStopId, selectedStopAreaId], ); - return { getStopVehicleMode, getStopHighlighted, getStopShouldBeGray }; + return { getStopHighlighted, getStopShouldBeGray }; }; diff --git a/ui/src/components/map/types/MapStop.ts b/ui/src/components/map/types/MapStop.ts index 1896651ee7..169bf4b57e 100644 --- a/ui/src/components/map/types/MapStop.ts +++ b/ui/src/components/map/types/MapStop.ts @@ -1,5 +1,5 @@ import type { Point } from 'geojson'; -import { ReusableComponentsVehicleModeEnum } from '../../../generated/graphql'; +import { StopRegistryTransportModeType } from '../../../generated/graphql'; import { FilterableStopInfo } from '../../../types'; import { StopPlaceState } from '../../../types/stop-registry'; @@ -8,6 +8,9 @@ export type MapStop = FilterableStopInfo & { readonly netex_id: string; readonly stop_place_netex_id: string; readonly functional_area: number | null; - readonly vehicle_mode?: ReusableComponentsVehicleModeEnum; readonly stop_state: StopPlaceState; + readonly transport_modes: ReadonlyArray; + readonly active_transport_modes: ReadonlyArray; + readonly trunk_line_stop: boolean; + readonly speed_tram_stop: boolean; }; diff --git a/ui/src/components/stop-registry/components/StopTableRow/components/LabelAndTimingPlaceTd.tsx b/ui/src/components/stop-registry/components/StopTableRow/components/LabelAndTimingPlaceTd.tsx index 270029ad77..33d8a25bcc 100644 --- a/ui/src/components/stop-registry/components/StopTableRow/components/LabelAndTimingPlaceTd.tsx +++ b/ui/src/components/stop-registry/components/StopTableRow/components/LabelAndTimingPlaceTd.tsx @@ -2,11 +2,9 @@ import { DateTime } from 'luxon'; import { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; -import { twJoin } from 'tailwind-merge'; -import { mapStopRegistryTransportModeTypeToUiName } from '../../../../../i18n/uiNameMappings'; import { Row } from '../../../../../layoutComponents'; import { Path, routeDetails } from '../../../../../router/routeDetails'; -import { getTransportModeIcon } from '../../../utils/getTransportModeIcon'; +import { StopTransportModeIcon } from '../../StopTransportModeIcon'; import { StopRowTdProps } from '../types'; const testIds = { @@ -23,20 +21,23 @@ export const LabelAndTimingPlaceTd: FC = ({ stop, }) => { const { t } = useTranslation(); - const transportModeIcon = getTransportModeIcon(stop.transportMode); return ( - + {stop.transportModes.map((mode) => ( + + ))} + DateTime.now().startOf('day'), []); + const validAfter = validityEnd ?? today; + const { data } = useDoesStopHaveNextValidAlternativeSuspenseQuery( isDraft || isEnding - ? { - variables: { - publicCode, - validAfter: mapToISODate(validityEnd ?? DateTime.now()), - validPriorities, - }, - } + ? { variables: { publicCode, validAfter, validPriorities } } : skipToken, ); diff --git a/ui/src/components/stop-registry/components/StopTableRow/queries/DataFragments.ts b/ui/src/components/stop-registry/components/StopTableRow/queries/DataFragments.ts index 0835048685..ec496db523 100644 --- a/ui/src/components/stop-registry/components/StopTableRow/queries/DataFragments.ts +++ b/ui/src/components/stop-registry/components/StopTableRow/queries/DataFragments.ts @@ -21,6 +21,11 @@ const GQL_STOP_TABLE_ROW_QUAY_DETAILS = gql` centroid description_value + transport_modes + active_transport_modes + speed_tram_stop + trunk_line_stop + stop_place { id name_value @@ -33,10 +38,6 @@ const GQL_STOP_TABLE_ROW_QUAY_DETAILS = gql` name_value } } - } - - stop_place_newest_version { - id TiamatStopPlace { ... on stop_registry_StopPlace { diff --git a/ui/src/components/stop-registry/components/StopTableRow/types/StopSearchRow.ts b/ui/src/components/stop-registry/components/StopTableRow/types/StopSearchRow.ts index 26b9e778e8..26c4840bcf 100644 --- a/ui/src/components/stop-registry/components/StopTableRow/types/StopSearchRow.ts +++ b/ui/src/components/stop-registry/components/StopTableRow/types/StopSearchRow.ts @@ -26,6 +26,11 @@ export type StopSearchRow = { readonly priority: Priority; readonly transportMode?: StopRegistryTransportModeType | null; + readonly transportModes: ReadonlyArray; + readonly activeTransportModes: ReadonlyArray; + readonly speedTramStop: boolean; + readonly trunkLineStop: boolean; + readonly replacesRailSign?: boolean; readonly electricity?: string | null; readonly shelter?: string | null; diff --git a/ui/src/components/stop-registry/components/StopTableRow/utils/mapQueryResultToStopSearchRow.ts b/ui/src/components/stop-registry/components/StopTableRow/utils/mapQueryResultToStopSearchRow.ts index 73acbe3a42..8df9241942 100644 --- a/ui/src/components/stop-registry/components/StopTableRow/utils/mapQueryResultToStopSearchRow.ts +++ b/ui/src/components/stop-registry/components/StopTableRow/utils/mapQueryResultToStopSearchRow.ts @@ -18,6 +18,7 @@ import { getStopPlacesFromQueryResult, isValidGeoJSONPoint, log, + parseStopRegistryTransportModeJsonArray, requireValue, } from '../../../../../utils'; import { parseStopRegistryTransportMode } from '../../../../../utils/stop-registry/transportMode'; @@ -141,7 +142,7 @@ function mapEquipmentDetails( | 'shelter' | 'accessibility' > { - const tiamatStopPlaces = quay.stop_place_newest_version?.TiamatStopPlace; + const tiamatStopPlaces = quay.stop_place?.TiamatStopPlace; const [stopPlace] = getStopPlacesFromQueryResult(tiamatStopPlaces); @@ -170,6 +171,14 @@ function mapQueryResultToStopSearchRowImpl( transportMode: parseStopRegistryTransportMode( quay.stop_place?.transport_mode, ), + transportModes: parseStopRegistryTransportModeJsonArray( + quay.transport_modes, + ), + activeTransportModes: parseStopRegistryTransportModeJsonArray( + quay.active_transport_modes, + ), + speedTramStop: !!quay.speed_tram_stop, + trunkLineStop: !!quay.trunk_line_stop, location: validateLocation(quay.centroid), @@ -235,7 +244,21 @@ function mapSingleTiamatStopAreaQuayToStopSearchRow< location: validateLocation(quay.geometry), description: quay.description?.value ?? null, - transportMode: stopArea.transportMode ?? null, + ...(stopArea.transportMode + ? { + transportMode: stopArea.transportMode, + transportModes: [stopArea.transportMode], + activeTransportModes: [stopArea.transportMode], + speedTramStop: false, + trunkLineStop: false, + } + : { + transportMode: null, + transportModes: [], + activeTransportModes: [], + speedTramStop: false, + trunkLineStop: false, + }), validityStart: requireValue( findKeyValueParsed(quay, KnownValueKey.ValidityStart, parseDate), diff --git a/ui/src/components/stop-registry/components/StopTransportModeIcon.tsx b/ui/src/components/stop-registry/components/StopTransportModeIcon.tsx new file mode 100644 index 0000000000..d9070434b0 --- /dev/null +++ b/ui/src/components/stop-registry/components/StopTransportModeIcon.tsx @@ -0,0 +1,58 @@ +import { FC } from 'react'; +import { useTranslation } from 'react-i18next'; +import { twJoin, twMerge } from 'tailwind-merge'; +import { StopRegistryTransportModeType } from '../../../generated/graphql'; +import { + getTransportModeIcon, + getTransportModeIconTitle, +} from '../utils/getTransportModeIcon'; + +const testIds = { + unknownType: 'StopTransportModeIcon::unknown', + icon: 'StopTransportModeIcon::icon', +}; + +type StopTransportModeIconProps = { + readonly className?: string; + readonly mode: StopRegistryTransportModeType | null | undefined; + readonly active: boolean; + readonly trunkLine: boolean; + readonly speedTram: boolean; +}; + +export const StopTransportModeIcon: FC = ({ + className, + mode, + active, + trunkLine, + speedTram, +}) => { + const { t } = useTranslation(); + + if (!mode) { + return ( + $.accessibility.stops.transportMode.unknownModeTitle)} + role="img" + data-testid={testIds.unknownType} + /> + ); + } + + return ( + + ); +}; diff --git a/ui/src/components/stop-registry/components/index.ts b/ui/src/components/stop-registry/components/index.ts index e9ee8b43b4..b031323700 100644 --- a/ui/src/components/stop-registry/components/index.ts +++ b/ui/src/components/stop-registry/components/index.ts @@ -2,3 +2,4 @@ export * from './MenuItems/OpenDetailsPage'; export * from './MenuItems/ShowOnMap'; export * from './LocatorActionButton'; export * from './StopTableRow'; +export * from './StopTransportModeIcon'; diff --git a/ui/src/components/stop-registry/search/by-stop/filtersToQueryVariables.ts b/ui/src/components/stop-registry/search/by-stop/filtersToQueryVariables.ts index cf611eb7de..0b76fba3a3 100644 --- a/ui/src/components/stop-registry/search/by-stop/filtersToQueryVariables.ts +++ b/ui/src/components/stop-registry/search/by-stop/filtersToQueryVariables.ts @@ -45,9 +45,7 @@ function buildSearchStopsQueryFilter( function buildElyNumberFilter( value: string, ): StopsDatabaseQuayNewestVersionBoolExp { - return { - ely_code: { _ilike: value }, - }; + return { ely_code: { _ilike: value } }; } function buildSearchStopsMunicipalityFilter({ @@ -69,11 +67,10 @@ function buildSearchStopsMunicipalityFilter({ function buildSearchStopsObservationDateFilter({ observationDate, }: StopSearchFilters): StopsDatabaseQuayNewestVersionBoolExp { - const dateString = observationDate.toISODate(); return { - validity_start: { _lte: dateString }, + validity_start: { _lte: observationDate }, _or: [ - { validity_end: { _gte: dateString } }, + { validity_end: { _gte: observationDate } }, { validity_end: { _is_null: true } }, ], }; @@ -85,13 +82,12 @@ function buildSearchStopsPriorityFilter({ const allSelected = knownPriorityValues.length === priorities.length && knownPriorityValues.every((prio) => priorities.includes(prio)); + if (allSelected) { return {}; } - return { - priority: { _in: priorities.map(String) }, - }; + return { priority: { _in: priorities } }; } function buildTransportationModeFilter({ @@ -102,11 +98,9 @@ function buildTransportationModeFilter({ } return { - stop_place: { - transport_mode: { - _in: transportationMode.map(toTiamatDBEnumCase), - }, - }, + _or: transportationMode.map(toTiamatDBEnumCase).map((mode) => ({ + transport_modes: { _contains: mode }, + })), }; } @@ -314,9 +308,7 @@ export function filtersAndResultSelectionToQueryVariables( if (excluded.length) { return buildSearchStopsGqlQueryVariables( filters, - { - _not: { netex_id: { _in: excluded } }, - }, + { _not: { netex_id: { _in: excluded } } }, ...extraConditions, ); } diff --git a/ui/src/components/stop-registry/stops/change-history/queries/useGetTodaysNameForQuay.ts b/ui/src/components/stop-registry/stops/change-history/queries/useGetTodaysNameForQuay.ts index 58336922b4..ce6c909387 100644 --- a/ui/src/components/stop-registry/stops/change-history/queries/useGetTodaysNameForQuay.ts +++ b/ui/src/components/stop-registry/stops/change-history/queries/useGetTodaysNameForQuay.ts @@ -11,8 +11,8 @@ import { TodaysName } from '../types'; const GQL_GET_TODAYS_NAME_FOR_QUAY = gql` query GetTodaysNameForQuay( $publicCode: String! - $priority: String! - $today: String! + $priority: Int! + $today: date! ) { stopsDb: stops_database { stop: stops_database_quay_newest_version( @@ -75,9 +75,9 @@ export function useGetTodaysNameForQuay( publicCode: string, priority: Priority, ) { - const today = DateTime.now().toISODate(); + const today = useMemo(() => DateTime.now().startOf('day'), []); const { data, ...rest } = useGetTodaysNameForQuayQuery({ - variables: { publicCode, today, priority: priority.toString() }, + variables: { publicCode, today, priority }, }); const rawStopPlace = data?.stopsDb?.stop?.at(0)?.stopPlace; diff --git a/ui/src/components/stop-registry/stops/stop-details/StopDetailsPage.tsx b/ui/src/components/stop-registry/stops/stop-details/StopDetailsPage.tsx index 4c98efdd82..2ad592fc48 100644 --- a/ui/src/components/stop-registry/stops/stop-details/StopDetailsPage.tsx +++ b/ui/src/components/stop-registry/stops/stop-details/StopDetailsPage.tsx @@ -1,5 +1,4 @@ -import compact from 'lodash/compact'; -import { FC, useContext, useMemo, useState } from 'react'; +import { FC, useContext, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { MdWarning } from 'react-icons/md'; import { Link } from 'react-router'; @@ -59,17 +58,12 @@ export const StopDetailsPage: FC = () => { const { stopDetails, loading, error, mirroredQuays } = useGetStopDetails(); - const mirroredTransportModes = useMemo( - () => compact(mirroredQuays.map((mq) => mq.stopPlace.transportMode)), - [mirroredQuays], - ); - return ( diff --git a/ui/src/components/stop-registry/stops/stop-details/title-row/StopTitleRow.tsx b/ui/src/components/stop-registry/stops/stop-details/title-row/StopTitleRow.tsx index 6809e64a4c..4b85691d86 100644 --- a/ui/src/components/stop-registry/stops/stop-details/title-row/StopTitleRow.tsx +++ b/ui/src/components/stop-registry/stops/stop-details/title-row/StopTitleRow.tsx @@ -1,12 +1,13 @@ import compact from 'lodash/compact'; +import sortBy from 'lodash/sortBy'; import uniq from 'lodash/uniq'; import { FC } from 'react'; -import { twJoin } from 'tailwind-merge'; import { StopRegistryTransportModeType } from '../../../../../generated/graphql'; import { StopWithDetails } from '../../../../../types'; import { StopPlaceState } from '../../../../../types/stop-registry'; import { PageTitle } from '../../../../common'; -import { getTransportModeIcon } from '../../../utils/getTransportModeIcon'; +import { StopTransportModeIcon } from '../../../components'; +import { MirroredQuayDetails } from '../useGetStopDetails'; import { ExtraActions } from './ExtraActions'; import { OpenOnMapButton } from './OpenOnMapButton'; import { StopTimetablesButton } from './StopTimetablesButton'; @@ -16,37 +17,65 @@ const testIds = { names: 'StopTitleRow::names', }; +type ModeStatus = { + readonly mode: StopRegistryTransportModeType | null; + readonly active: boolean; + readonly trunkLine: boolean; + readonly speedTram: boolean; +}; + +function getModeStatus( + stop: MirroredQuayDetails | StopWithDetails, +): ModeStatus { + const stopPlace = 'stopPlace' in stop ? stop.stopPlace : stop.stop_place; + + return { + mode: stopPlace?.transportMode ?? null, + active: stop.quay?.stopState === StopPlaceState.InOperation, + trunkLine: !!stop.quay?.stopType.trunkLineStop, + speedTram: !!stop.quay?.stopType.speedTramStop, + }; +} + +function resolveModes( + stopDetails: StopWithDetails | null, + mirroredQuays: ReadonlyArray, +): Array { + if (!stopDetails) { + return []; + } + + return sortBy( + [getModeStatus(stopDetails), ...mirroredQuays.map(getModeStatus)], + (status) => status.mode, + ); +} + type StopTitleRowProps = { readonly stopDetails: StopWithDetails | null; readonly label: string; - readonly mirroredTransportModes?: ReadonlyArray; + readonly mirroredQuays: ReadonlyArray; }; export const StopTitleRow: FC = ({ stopDetails, label, - mirroredTransportModes = [], + mirroredQuays, }) => { - const ownMode = stopDetails?.stop_place?.transportMode; - const allModes = uniq(compact([ownMode, ...mirroredTransportModes])); - return (
- {allModes.map((mode) => ( - - ))} + {resolveModes(stopDetails, mirroredQuays).map( + ({ mode, active, trunkLine, speedTram }) => ( + + ), + )} , ): number | null { - const today = DateTime.now().toISODate(); + const today = DateTime.now().startOf('day'); // prettier-ignore const quay = rawQuays.findLast((rawQuay) => diff --git a/ui/src/components/stop-registry/utils/getTransportModeIcon.ts b/ui/src/components/stop-registry/utils/getTransportModeIcon.ts index bff47749f6..65add27d20 100644 --- a/ui/src/components/stop-registry/utils/getTransportModeIcon.ts +++ b/ui/src/components/stop-registry/utils/getTransportModeIcon.ts @@ -1,3 +1,4 @@ +import { TFunction } from 'i18next'; import { twJoin } from 'tailwind-merge'; import { StopRegistryTransportModeType } from '../../../generated/graphql'; @@ -58,3 +59,50 @@ export function getTransportModeIcon( return twJoin('icon-bus-alt', getBusColor(active, trunkLine)); } } + +function getTransportModeTypeText( + t: TFunction, + mode: StopRegistryTransportModeType | null | undefined, + trunkLine: boolean, + speedTram: boolean, +) { + switch (mode) { + case StopRegistryTransportModeType.Tram: + return speedTram + ? t(($) => $.accessibility.stops.transportMode.type_speedTram) + : t(($) => $.accessibility.stops.transportMode.type_tram); + + case StopRegistryTransportModeType.Metro: + return t(($) => $.accessibility.stops.transportMode.type_metro); + + case StopRegistryTransportModeType.Water: + return t(($) => $.accessibility.stops.transportMode.type_water); + + case StopRegistryTransportModeType.Rail: + return t(($) => $.accessibility.stops.transportMode.type_rail); + + case StopRegistryTransportModeType.Bus: + default: + return trunkLine + ? t(($) => $.accessibility.stops.transportMode.type_trunkLine) + : t(($) => $.accessibility.stops.transportMode.type_bus); + } +} + +export function getTransportModeIconTitle( + t: TFunction, + mode: StopRegistryTransportModeType | null | undefined, + active: boolean = true, + trunkLine: boolean = false, + speedTram: boolean = false, +) { + const stopType = getTransportModeTypeText(t, mode, trunkLine, speedTram); + const stopTypeState = active + ? t(($) => $.accessibility.stops.transportMode.status_inUse) + : t(($) => $.accessibility.stops.transportMode.status_outOfUse); + + return t(($) => $.accessibility.stops.transportMode.stopIconTitle, { + stopType, + stopTypeState, + }); +} diff --git a/ui/src/generated/graphql.tsx b/ui/src/generated/graphql.tsx index 7bf746d094..66acf4863c 100644 --- a/ui/src/generated/graphql.tsx +++ b/ui/src/generated/graphql.tsx @@ -40995,6 +40995,7 @@ export type StopsDatabaseQuayMutationResponse = { export type StopsDatabaseQuayNewestVersion = { readonly __typename?: 'stops_database_quay_newest_version'; readonly accessibility_assessment_id?: Maybe; + readonly active_transport_modes?: Maybe; readonly all_areas_wheelchair_accessible?: Maybe; readonly centroid?: Maybe; readonly changed?: Maybe; @@ -41008,7 +41009,7 @@ export type StopsDatabaseQuayNewestVersion = { /** An object relationship */ readonly equipments?: Maybe; readonly from_date?: Maybe; - readonly functional_area?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; /** An array relationship */ readonly info_spot_locations: ReadonlyArray; @@ -41025,7 +41026,7 @@ export type StopsDatabaseQuayNewestVersion = { readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; readonly postal_code?: Maybe; - readonly priority?: Maybe; + readonly priority?: Maybe; readonly private_code_type?: Maybe; readonly private_code_value?: Maybe; readonly public_code?: Maybe; @@ -41042,6 +41043,7 @@ export type StopsDatabaseQuayNewestVersion = { readonly short_name_value?: Maybe; readonly site_ref?: Maybe; readonly site_ref_version?: Maybe; + readonly speed_tram_stop?: Maybe; /** An object relationship */ readonly stopPlaceParent?: Maybe; readonly stop_owner?: Maybe; @@ -41057,13 +41059,21 @@ export type StopsDatabaseQuayNewestVersion = { readonly timing_place?: Maybe; readonly timing_place_id?: Maybe; readonly to_date?: Maybe; - readonly validity_end?: Maybe; - readonly validity_start?: Maybe; + readonly transport_modes?: Maybe; + readonly trunk_line_stop?: Maybe; + readonly validity_end?: Maybe; + readonly validity_start?: Maybe; readonly version?: Maybe; readonly version_comment?: Maybe; }; +/** columns and relationships of "quay_newest_version" */ +export type StopsDatabaseQuayNewestVersionActiveTransportModesArgs = { + path?: InputMaybe; +}; + + /** columns and relationships of "quay_newest_version" */ export type StopsDatabaseQuayNewestVersionInfoSpotLocationsArgs = { distinct_on?: InputMaybe>; @@ -41123,6 +41133,12 @@ export type StopsDatabaseQuayNewestVersionQuayKeyValuesAggregateArgs = { where?: InputMaybe; }; + +/** columns and relationships of "quay_newest_version" */ +export type StopsDatabaseQuayNewestVersionTransportModesArgs = { + path?: InputMaybe; +}; + /** aggregated selection of "quay_newest_version" */ export type StopsDatabaseQuayNewestVersionAggregate = { readonly __typename?: 'stops_database_quay_newest_version_aggregate'; @@ -41159,9 +41175,11 @@ export type StopsDatabaseQuayNewestVersionAvgFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41173,6 +41191,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { readonly _not?: InputMaybe; readonly _or?: InputMaybe>; readonly accessibility_assessment_id?: InputMaybe; + readonly active_transport_modes?: InputMaybe; readonly all_areas_wheelchair_accessible?: InputMaybe; readonly centroid?: InputMaybe; readonly changed?: InputMaybe; @@ -41185,7 +41204,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { readonly ely_code?: InputMaybe; readonly equipments?: InputMaybe; readonly from_date?: InputMaybe; - readonly functional_area?: InputMaybe; + readonly functional_area?: InputMaybe; readonly id?: InputMaybe; readonly info_spot_locations?: InputMaybe; readonly info_spot_locations_aggregate?: InputMaybe; @@ -41200,7 +41219,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { readonly place_equipments_id?: InputMaybe; readonly polygon_id?: InputMaybe; readonly postal_code?: InputMaybe; - readonly priority?: InputMaybe; + readonly priority?: InputMaybe; readonly private_code_type?: InputMaybe; readonly private_code_value?: InputMaybe; readonly public_code?: InputMaybe; @@ -41212,6 +41231,7 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { readonly short_name_value?: InputMaybe; readonly site_ref?: InputMaybe; readonly site_ref_version?: InputMaybe; + readonly speed_tram_stop?: InputMaybe; readonly stopPlaceParent?: InputMaybe; readonly stop_owner?: InputMaybe; readonly stop_place?: InputMaybe; @@ -41223,8 +41243,10 @@ export type StopsDatabaseQuayNewestVersionBoolExp = { readonly street_address?: InputMaybe; readonly timing_place_id?: InputMaybe; readonly to_date?: InputMaybe; - readonly validity_end?: InputMaybe; - readonly validity_start?: InputMaybe; + readonly transport_modes?: InputMaybe; + readonly trunk_line_stop?: InputMaybe; + readonly validity_end?: InputMaybe; + readonly validity_start?: InputMaybe; readonly version?: InputMaybe; readonly version_comment?: InputMaybe; }; @@ -41242,7 +41264,7 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { readonly description_value?: Maybe; readonly ely_code?: Maybe; readonly from_date?: Maybe; - readonly functional_area?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly label_lang?: Maybe; readonly label_value?: Maybe; @@ -41255,7 +41277,7 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; readonly postal_code?: Maybe; - readonly priority?: Maybe; + readonly priority?: Maybe; readonly private_code_type?: Maybe; readonly private_code_value?: Maybe; readonly public_code?: Maybe; @@ -41271,8 +41293,8 @@ export type StopsDatabaseQuayNewestVersionMaxFields = { readonly street_address?: Maybe; readonly timing_place_id?: Maybe; readonly to_date?: Maybe; - readonly validity_end?: Maybe; - readonly validity_start?: Maybe; + readonly validity_end?: Maybe; + readonly validity_start?: Maybe; readonly version?: Maybe; readonly version_comment?: Maybe; }; @@ -41290,7 +41312,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { readonly description_value?: Maybe; readonly ely_code?: Maybe; readonly from_date?: Maybe; - readonly functional_area?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly label_lang?: Maybe; readonly label_value?: Maybe; @@ -41303,7 +41325,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; readonly postal_code?: Maybe; - readonly priority?: Maybe; + readonly priority?: Maybe; readonly private_code_type?: Maybe; readonly private_code_value?: Maybe; readonly public_code?: Maybe; @@ -41319,8 +41341,8 @@ export type StopsDatabaseQuayNewestVersionMinFields = { readonly street_address?: Maybe; readonly timing_place_id?: Maybe; readonly to_date?: Maybe; - readonly validity_end?: Maybe; - readonly validity_start?: Maybe; + readonly validity_end?: Maybe; + readonly validity_start?: Maybe; readonly version?: Maybe; readonly version_comment?: Maybe; }; @@ -41328,6 +41350,7 @@ export type StopsDatabaseQuayNewestVersionMinFields = { /** Ordering options when selecting data from "quay_newest_version". */ export type StopsDatabaseQuayNewestVersionOrderBy = { readonly accessibility_assessment_id?: InputMaybe; + readonly active_transport_modes?: InputMaybe; readonly all_areas_wheelchair_accessible?: InputMaybe; readonly centroid?: InputMaybe; readonly changed?: InputMaybe; @@ -41364,6 +41387,7 @@ export type StopsDatabaseQuayNewestVersionOrderBy = { readonly short_name_value?: InputMaybe; readonly site_ref?: InputMaybe; readonly site_ref_version?: InputMaybe; + readonly speed_tram_stop?: InputMaybe; readonly stopPlaceParent?: InputMaybe; readonly stop_owner?: InputMaybe; readonly stop_place?: InputMaybe; @@ -41375,6 +41399,8 @@ export type StopsDatabaseQuayNewestVersionOrderBy = { readonly street_address?: InputMaybe; readonly timing_place_id?: InputMaybe; readonly to_date?: InputMaybe; + readonly transport_modes?: InputMaybe; + readonly trunk_line_stop?: InputMaybe; readonly validity_end?: InputMaybe; readonly validity_start?: InputMaybe; readonly version?: InputMaybe; @@ -41386,6 +41412,8 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ AccessibilityAssessmentId = 'accessibility_assessment_id', /** column name */ + ActiveTransportModes = 'active_transport_modes', + /** column name */ AllAreasWheelchairAccessible = 'all_areas_wheelchair_accessible', /** column name */ Centroid = 'centroid', @@ -41450,6 +41478,8 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ SiteRefVersion = 'site_ref_version', /** column name */ + SpeedTramStop = 'speed_tram_stop', + /** column name */ StopOwner = 'stop_owner', /** column name */ StopPlaceId = 'stop_place_id', @@ -41466,6 +41496,10 @@ export enum StopsDatabaseQuayNewestVersionSelectColumn { /** column name */ ToDate = 'to_date', /** column name */ + TransportModes = 'transport_modes', + /** column name */ + TrunkLineStop = 'trunk_line_stop', + /** column name */ ValidityEnd = 'validity_end', /** column name */ ValidityStart = 'validity_start', @@ -41481,9 +41515,11 @@ export type StopsDatabaseQuayNewestVersionStddevFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41495,9 +41531,11 @@ export type StopsDatabaseQuayNewestVersionStddevPopFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41509,9 +41547,11 @@ export type StopsDatabaseQuayNewestVersionStddevSampFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41528,6 +41568,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorInput = { /** Initial value of the column from where the streaming should start */ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { readonly accessibility_assessment_id?: InputMaybe; + readonly active_transport_modes?: InputMaybe; readonly all_areas_wheelchair_accessible?: InputMaybe; readonly centroid?: InputMaybe; readonly changed?: InputMaybe; @@ -41539,7 +41580,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { readonly description_value?: InputMaybe; readonly ely_code?: InputMaybe; readonly from_date?: InputMaybe; - readonly functional_area?: InputMaybe; + readonly functional_area?: InputMaybe; readonly id?: InputMaybe; readonly label_lang?: InputMaybe; readonly label_value?: InputMaybe; @@ -41552,7 +41593,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { readonly place_equipments_id?: InputMaybe; readonly polygon_id?: InputMaybe; readonly postal_code?: InputMaybe; - readonly priority?: InputMaybe; + readonly priority?: InputMaybe; readonly private_code_type?: InputMaybe; readonly private_code_value?: InputMaybe; readonly public_code?: InputMaybe; @@ -41560,6 +41601,7 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { readonly short_name_value?: InputMaybe; readonly site_ref?: InputMaybe; readonly site_ref_version?: InputMaybe; + readonly speed_tram_stop?: InputMaybe; readonly stop_owner?: InputMaybe; readonly stop_place_id?: InputMaybe; readonly stop_place_netex_id?: InputMaybe; @@ -41568,8 +41610,10 @@ export type StopsDatabaseQuayNewestVersionStreamCursorValueInput = { readonly street_address?: InputMaybe; readonly timing_place_id?: InputMaybe; readonly to_date?: InputMaybe; - readonly validity_end?: InputMaybe; - readonly validity_start?: InputMaybe; + readonly transport_modes?: InputMaybe; + readonly trunk_line_stop?: InputMaybe; + readonly validity_end?: InputMaybe; + readonly validity_start?: InputMaybe; readonly version?: InputMaybe; readonly version_comment?: InputMaybe; }; @@ -41580,9 +41624,11 @@ export type StopsDatabaseQuayNewestVersionSumFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41594,9 +41640,11 @@ export type StopsDatabaseQuayNewestVersionVarPopFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41608,9 +41656,11 @@ export type StopsDatabaseQuayNewestVersionVarSampFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -41622,9 +41672,11 @@ export type StopsDatabaseQuayNewestVersionVarianceFields = { readonly accessibility_assessment_id?: Maybe; readonly compass_bearing?: Maybe; readonly covered?: Maybe; + readonly functional_area?: Maybe; readonly id?: Maybe; readonly place_equipments_id?: Maybe; readonly polygon_id?: Maybe; + readonly priority?: Maybe; readonly stop_place_id?: Maybe; readonly stop_place_version?: Maybe; readonly version?: Maybe; @@ -70306,7 +70358,7 @@ export type GetStopInfoForEditingOnMapQuery = { readonly __typename?: 'stops_database_quay_newest_version', readonly id?: any | null, readonly centroid?: GeoJSON.Geometry | null, - readonly priority?: string | null, + readonly priority?: number | null, readonly netex_id?: string | null, readonly public_code?: string | null, readonly street_address?: string | null, @@ -70314,8 +70366,8 @@ export type GetStopInfoForEditingOnMapQuery = { readonly label?: string | null, readonly locationValue?: string | null, readonly locationLang?: string | null, - readonly validityStart?: string | null, - readonly validityEnd?: string | null, + readonly validityStart?: luxon.DateTime | null, + readonly validityEnd?: luxon.DateTime | null, readonly alternativeLocations: ReadonlyArray<{ readonly __typename?: 'stops_database_quay_alternative_names', readonly location: { @@ -70403,7 +70455,7 @@ export type StopSelectionInfoFragment = { readonly __typename?: 'stops_database_quay_newest_version', readonly netex_id?: string | null, readonly public_code?: string | null, - readonly priority?: string | null, + readonly priority?: number | null, readonly street_address?: string | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place_newest_version', @@ -70425,7 +70477,7 @@ export type GetStopSelectionInfoQuery = { readonly __typename?: 'stops_database_quay_newest_version', readonly netex_id?: string | null, readonly public_code?: string | null, - readonly priority?: string | null, + readonly priority?: number | null, readonly street_address?: string | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place_newest_version', @@ -70450,7 +70502,7 @@ export type GetStopSelectionInfoQuery = { readonly __typename?: 'stops_database_quay_newest_version', readonly netex_id?: string | null, readonly public_code?: string | null, - readonly priority?: string | null, + readonly priority?: number | null, readonly street_address?: string | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place_newest_version', @@ -70508,18 +70560,17 @@ export type GetMapStopsQuery = { readonly id?: any | null, readonly netex_id?: string | null, readonly stop_place_netex_id?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly stop_state?: string | null, readonly centroid?: GeoJSON.Geometry | null, - readonly functional_area?: string | null, - readonly label?: string | null, - readonly stop_place?: { - readonly __typename?: 'stops_database_stop_place', - readonly id: any, - readonly transport_mode?: string | null - } | null + readonly functional_area?: number | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly trunk_line_stop?: boolean | null, + readonly speed_tram_stop?: boolean | null, + readonly label?: string | null }> } | null }; @@ -70529,18 +70580,17 @@ export type MapStopMinimalDetailsFragment = { readonly id?: any | null, readonly netex_id?: string | null, readonly stop_place_netex_id?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly stop_state?: string | null, readonly centroid?: GeoJSON.Geometry | null, - readonly functional_area?: string | null, - readonly label?: string | null, - readonly stop_place?: { - readonly __typename?: 'stops_database_stop_place', - readonly id: any, - readonly transport_mode?: string | null - } | null + readonly functional_area?: number | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly trunk_line_stop?: boolean | null, + readonly speed_tram_stop?: boolean | null, + readonly label?: string | null }; export type GetStopTerminalsByLocationQueryVariables = Exact<{ @@ -72899,8 +72949,8 @@ export type FindQuaysByQueryQuery = { export type DoesStopHaveNextValidAlternativeQueryVariables = Exact<{ publicCode: Scalars['String']['input']; - validAfter: Scalars['String']['input']; - validPriorities: ReadonlyArray | Scalars['String']['input']; + validAfter: Scalars['date']['input']; + validPriorities: ReadonlyArray | Scalars['Int']['input']; }>; @@ -72933,11 +72983,15 @@ export type StopTableRowQuayDetailsFragment = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place', readonly id: any, @@ -72951,11 +73005,7 @@ export type StopTableRowQuayDetailsFragment = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -73274,11 +73324,15 @@ export type GetStopsByRouteIdQuery = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place', readonly id: any, @@ -73292,11 +73346,7 @@ export type GetStopsByRouteIdQuery = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -73369,11 +73419,15 @@ export type GetStopByRouteIdSearchResultFragment = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly stop_place?: { readonly __typename?: 'stops_database_stop_place', readonly id: any, @@ -73387,11 +73441,7 @@ export type GetStopByRouteIdSearchResultFragment = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -73518,11 +73568,15 @@ export type GetStopsByIdQuery = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly scheduled_stop_point_instance?: { readonly __typename?: 'service_pattern_scheduled_stop_point', readonly scheduled_stop_point_id: UUID, @@ -73545,11 +73599,7 @@ export type GetStopsByIdQuery = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -73618,7 +73668,7 @@ export type GetStopSearchResultDetailsForMapQuery = { readonly centroid?: GeoJSON.Geometry | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly priority?: string | null, + readonly priority?: number | null, readonly street_address?: string | null, readonly netexId?: string | null, readonly stop_place?: { @@ -74174,11 +74224,15 @@ export type SearchStopsQuery = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly scheduled_stop_point_instance?: { readonly __typename?: 'service_pattern_scheduled_stop_point', readonly scheduled_stop_point_id: UUID, @@ -74201,11 +74255,7 @@ export type SearchStopsQuery = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -74272,11 +74322,15 @@ export type StopTableRowQuayFragment = { readonly id?: any | null, readonly netex_id?: string | null, readonly public_code?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly centroid?: GeoJSON.Geometry | null, readonly description_value?: string | null, + readonly transport_modes?: any | null, + readonly active_transport_modes?: any | null, + readonly speed_tram_stop?: boolean | null, + readonly trunk_line_stop?: boolean | null, readonly scheduled_stop_point_instance?: { readonly __typename?: 'service_pattern_scheduled_stop_point', readonly scheduled_stop_point_id: UUID, @@ -74299,11 +74353,7 @@ export type StopTableRowQuayFragment = { readonly name_type?: string | null, readonly name_value?: string | null } - }> - } | null, - readonly stop_place_newest_version?: { - readonly __typename?: 'stops_database_stop_place_newest_version', - readonly id?: any | null, + }>, readonly TiamatStopPlace?: ReadonlyArray< | { readonly __typename?: 'stop_registry_ParentStopPlace' @@ -77073,8 +77123,8 @@ export type QuayChangeHistoryItemDetailsFragment = { export type GetTodaysNameForQuayQueryVariables = Exact<{ publicCode: Scalars['String']['input']; - priority: Scalars['String']['input']; - today: Scalars['String']['input']; + priority: Scalars['Int']['input']; + today: Scalars['date']['input']; }>; @@ -79197,9 +79247,9 @@ export type GetQuayVersionsQuery = { readonly __typename?: 'stops_database_quay_newest_version', readonly id?: any | null, readonly netex_id?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly public_code?: string | null, readonly centroid?: GeoJSON.Geometry | null, readonly created?: any | null, @@ -79220,9 +79270,9 @@ export type StopVersionInfoFragment = { readonly __typename?: 'stops_database_quay_newest_version', readonly id?: any | null, readonly netex_id?: string | null, - readonly validity_start?: string | null, - readonly validity_end?: string | null, - readonly priority?: string | null, + readonly validity_start?: luxon.DateTime | null, + readonly validity_end?: luxon.DateTime | null, + readonly priority?: number | null, readonly public_code?: string | null, readonly centroid?: GeoJSON.Geometry | null, readonly created?: any | null, @@ -84388,7 +84438,7 @@ export const StopFormStopAreaInfoFragmentDoc = {"kind":"Document","definitions": export const StopInfoTimingPlaceInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopInfoTimingPlaceInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"timing_pattern_timing_place"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"id"},"name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]} as unknown as DocumentNode; export const StopSelectionInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopSelectionInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"street_address"}},{"kind":"Field","alias":{"kind":"Name","value":"stop_place"},"name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]} as unknown as DocumentNode; export const MapMinimalStopAreaDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"mapMinimalStopAreaDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_stop_place_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"private_code_value"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}}]}}]} as unknown as DocumentNode; -export const MapStopMinimalDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MapStopMinimalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"stop_state"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"functional_area"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}}]}}]}}]} as unknown as DocumentNode; +export const MapStopMinimalDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MapStopMinimalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"stop_state"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"functional_area"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}}]}}]} as unknown as DocumentNode; export const MapMinimalTerminalDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MapMinimalTerminalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_stop_place_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"private_code_value"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"children"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"children_id"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"child"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"netexId"},"name":{"kind":"Name","value":"netex_id"}}]}}]}}]}}]} as unknown as DocumentNode; export const RouteMetadataFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"route_metadata"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"route_route"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_i18n"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"variant"}}]}}]} as unknown as DocumentNode; export const DisplayedRouteFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"displayed_route"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"route_route"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"route_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"variant"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"route_journey_patterns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_label"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_sequence"}}]}}]}}]}}]} as unknown as DocumentNode; @@ -84424,10 +84474,10 @@ export const StopPlaceChangeHistoryItemDetailsFragmentDoc = {"kind":"Document"," export const FindStopByLineRouteInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FindStopByLineRouteInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"route_route"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"route_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"name_i18n"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}}]}}]} as unknown as DocumentNode; export const FindStopByLineInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FindStopByLineInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"route_line"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"line_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"name_i18n"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"line_routes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_start"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validOn"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validOn"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_is_null"},"value":{"kind":"BooleanValue","value":true}}]}}]}]}}]}},{"kind":"Argument","name":{"kind":"Name","value":"order_by"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"direction"},"value":{"kind":"EnumValue","value":"desc"}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"priority"},"value":{"kind":"EnumValue","value":"desc"}}]}]}},{"kind":"Argument","name":{"kind":"Name","value":"distinct_on"},"value":{"kind":"ListValue","values":[{"kind":"EnumValue","value":"direction"},{"kind":"EnumValue","value":"priority"}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FindStopByLineRouteInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FindStopByLineRouteInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"route_route"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"route_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"name_i18n"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}}]}}]} as unknown as DocumentNode; export const StopTableRowScheduledStopPointDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}}]} as unknown as DocumentNode; -export const StopTableRowQuayDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const GetStopByRouteIdSearchResultFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}},{"kind":"Field","alias":{"kind":"Name","value":"quay"},"name":{"kind":"Name","value":"newest_quay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"journeyPatterns"},"name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","alias":{"kind":"Name","value":"sequence"},"name":{"kind":"Name","value":"scheduled_stop_point_sequence"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const StopTableRowQuayDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const GetStopByRouteIdSearchResultFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}},{"kind":"Field","alias":{"kind":"Name","value":"quay"},"name":{"kind":"Name","value":"newest_quay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"journeyPatterns"},"name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","alias":{"kind":"Name","value":"sequence"},"name":{"kind":"Name","value":"scheduled_stop_point_sequence"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const FindStopPlaceInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FindStopPlaceInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_stop_place_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","alias":{"kind":"Name","value":"private_code"},"name":{"kind":"Name","value":"private_code_value"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}}]}}]} as unknown as DocumentNode; -export const StopTableRowQuayFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const StopTableRowQuayFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const HistoricalStopAreaQuayDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HistoricalStopAreaQuayDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_Quay"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"publicCode"}}]}}]} as unknown as DocumentNode; export const HistoricalStopAreaTerminalDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HistoricalStopAreaTerminalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_ParentStopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"privateCode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]} as unknown as DocumentNode; export const HistoricalStopAreaDetailsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HistoricalStopAreaDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"alternativeNames"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nameType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"privateCode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"geometry"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"coordinates"}}]}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"keyValues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"values"}}]}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HistoricalStopAreaQuayDetails"}}]}},{"kind":"Field","name":{"kind":"Name","value":"parentStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HistoricalStopAreaTerminalDetails"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HistoricalStopAreaQuayDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_Quay"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"publicCode"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HistoricalStopAreaTerminalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_ParentStopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}},{"kind":"Field","name":{"kind":"Name","value":"privateCode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]} as unknown as DocumentNode; @@ -85099,7 +85149,7 @@ export type GetStopAreasByLocationQueryHookResult = ReturnType; export type GetStopAreasByLocationSuspenseQueryHookResult = ReturnType; export type GetStopAreasByLocationQueryResult = Apollo.QueryResult; -export const GetMapStopsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMapStops"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_bool_exp"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MapStopMinimalDetails"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MapStopMinimalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"stop_state"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"functional_area"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}}]}}]}}]} as unknown as DocumentNode; +export const GetMapStopsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMapStops"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_bool_exp"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MapStopMinimalDetails"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MapStopMinimalDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"stop_state"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"functional_area"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}}]}}]} as unknown as DocumentNode; /** * __useGetMapStopsQuery__ @@ -86321,7 +86371,7 @@ export type FindQuaysByQueryQueryHookResult = ReturnType; export type FindQuaysByQuerySuspenseQueryHookResult = ReturnType; export type FindQuaysByQueryQueryResult = Apollo.QueryResult; -export const DoesStopHaveNextValidAlternativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"DoesStopHaveNextValidAlternative"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"validAfter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"validPriorities"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"quays"},"name":{"kind":"Name","value":"stops_database_quay_newest_version_aggregate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_and"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"priority"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_in"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validPriorities"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_is_null"},"value":{"kind":"BooleanValue","value":true}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_gt"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validAfter"}}}]}}]}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"aggregate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const DoesStopHaveNextValidAlternativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"DoesStopHaveNextValidAlternative"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"validAfter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"date"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"validPriorities"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"quays"},"name":{"kind":"Name","value":"stops_database_quay_newest_version_aggregate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_and"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"priority"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_in"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validPriorities"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_is_null"},"value":{"kind":"BooleanValue","value":true}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_gt"},"value":{"kind":"Variable","name":{"kind":"Name","value":"validAfter"}}}]}}]}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"aggregate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}}]}}]} as unknown as DocumentNode; /** * __useDoesStopHaveNextValidAlternativeQuery__ @@ -86473,7 +86523,7 @@ export type GetLineRouteStopIdsQueryHookResult = ReturnType; export type GetLineRouteStopIdsSuspenseQueryHookResult = ReturnType; export type GetLineRouteStopIdsQueryResult = Apollo.QueryResult; -export const GetStopsByRouteIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getStopsByRouteId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stopPoints"},"name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}},{"kind":"Field","alias":{"kind":"Name","value":"quay"},"name":{"kind":"Name","value":"newest_quay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"journeyPatterns"},"name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","alias":{"kind":"Name","value":"sequence"},"name":{"kind":"Name","value":"scheduled_stop_point_sequence"}}]}}]}}]} as unknown as DocumentNode; +export const GetStopsByRouteIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getStopsByRouteId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stopPoints"},"name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GetStopByRouteIdSearchResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}},{"kind":"Field","alias":{"kind":"Name","value":"quay"},"name":{"kind":"Name","value":"newest_quay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"journeyPatterns"},"name":{"kind":"Name","value":"scheduled_stop_point_in_journey_patterns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"journey_pattern"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"on_route_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"routeId"}}}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"journey_pattern_id"}},{"kind":"Field","alias":{"kind":"Name","value":"sequence"},"name":{"kind":"Name","value":"scheduled_stop_point_sequence"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetStopsByRouteIdQuery__ @@ -86586,7 +86636,7 @@ export type FindStopPlacesQueryHookResult = ReturnType; export type FindStopPlacesSuspenseQueryHookResult = ReturnType; export type FindStopPlacesQueryResult = Apollo.QueryResult; -export const GetStopsByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getStopsById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"bigint"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stop_place_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stopPlaceParent"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stop_place_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}}}]}}]}}]}]}}]}},{"kind":"Argument","name":{"kind":"Name","value":"order_by"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"EnumValue","value":"asc"}}]}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"stop_table_row_quay"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}}]} as unknown as DocumentNode; +export const GetStopsByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getStopsById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"bigint"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stop_place_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stopPlaceParent"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"stop_place_id"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"stopPlaceId"}}}]}}]}}]}]}}]}},{"kind":"Argument","name":{"kind":"Name","value":"order_by"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"EnumValue","value":"asc"}}]}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"stop_table_row_quay"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetStopsByIdQuery__ @@ -86734,7 +86784,7 @@ export type GetStopPlaceAndRelatedQuaysQueryHookResult = ReturnType; export type GetStopPlaceAndRelatedQuaysSuspenseQueryHookResult = ReturnType; export type GetStopPlaceAndRelatedQuaysQueryResult = Apollo.QueryResult; -export const SearchStopsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SearchStops"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_bool_exp"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_order_by"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"order_by"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"stop_table_row_quay"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"resultCount"},"name":{"kind":"Name","value":"stops_database_quay_newest_version_aggregate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"aggregate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_newest_version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}}]} as unknown as DocumentNode; +export const SearchStopsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SearchStops"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_bool_exp"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version_order_by"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stops"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"order_by"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"stop_table_row_quay"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"resultCount"},"name":{"kind":"Name","value":"stops_database_quay_newest_version_aggregate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"aggregate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"service_pattern_scheduled_stop_point"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_id"}},{"kind":"Field","name":{"kind":"Name","value":"timing_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timing_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopTableRow_Quay_Details"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","name":{"kind":"Name","value":"public_code"}},{"kind":"Field","name":{"kind":"Name","value":"validity_start"}},{"kind":"Field","name":{"kind":"Name","value":"validity_end"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"centroid"}},{"kind":"Field","name":{"kind":"Name","value":"description_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"active_transport_modes"}},{"kind":"Field","name":{"kind":"Name","value":"speed_tram_stop"}},{"kind":"Field","name":{"kind":"Name","value":"trunk_line_stop"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"transport_mode"}},{"kind":"Field","name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"TiamatStopPlace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stop_registry_StopPlace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"transportMode"}},{"kind":"Field","name":{"kind":"Name","value":"quays"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityAssessment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"hslAccessibilityProperties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"accessibilityLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"placeEquipments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shelterEquipment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"shelterType"}},{"kind":"Field","name":{"kind":"Name","value":"shelterElectricity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"generalSign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"replacesRailSign"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lang"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"stop_table_row_quay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_quay_newest_version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_Quay_Details"}},{"kind":"Field","name":{"kind":"Name","value":"scheduled_stop_point_instance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopTableRow_ScheduledStopPoint_Details"}}]}}]}}]} as unknown as DocumentNode; /** * __useSearchStopsQuery__ @@ -87287,7 +87337,7 @@ export type GetStopChangeHistoryQueryHookResult = ReturnType; export type GetStopChangeHistorySuspenseQueryHookResult = ReturnType; export type GetStopChangeHistoryQueryResult = Apollo.QueryResult; -export const GetTodaysNameForQuayDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTodaysNameForQuay"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"priority"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"today"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stopsDb"},"name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stop"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"priority"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"priority"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"validity_start"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"today"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"today"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_is_null"},"value":{"kind":"BooleanValue","value":true}}]}}]}]}}]}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"stopPlace"},"name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"name"},"name":{"kind":"Name","value":"name_value"}},{"kind":"Field","alias":{"kind":"Name","value":"alternativeNames"},"name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopPlaceAlternativeNames"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopPlaceAlternativeNames"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_stop_place_alternative_names"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stop_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"alternative_names_id"}},{"kind":"Field","alias":{"kind":"Name","value":"alternativeName"},"name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}}]}}]}}]} as unknown as DocumentNode; +export const GetTodaysNameForQuayDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTodaysNameForQuay"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"priority"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"today"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"date"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stopsDb"},"name":{"kind":"Name","value":"stops_database"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stop"},"name":{"kind":"Name","value":"stops_database_quay_newest_version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"public_code"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"publicCode"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"priority"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"priority"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"validity_start"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"today"}}}]}},{"kind":"ObjectField","name":{"kind":"Name","value":"_or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"today"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"validity_end"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"_is_null"},"value":{"kind":"BooleanValue","value":true}}]}}]}]}}]}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"netex_id"}},{"kind":"Field","alias":{"kind":"Name","value":"stopPlace"},"name":{"kind":"Name","value":"stop_place"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"name"},"name":{"kind":"Name","value":"name_value"}},{"kind":"Field","alias":{"kind":"Name","value":"alternativeNames"},"name":{"kind":"Name","value":"stop_place_alternative_names"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StopPlaceAlternativeNames"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StopPlaceAlternativeNames"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"stops_database_stop_place_alternative_names"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stop_place_id"}},{"kind":"Field","name":{"kind":"Name","value":"alternative_names_id"}},{"kind":"Field","alias":{"kind":"Name","value":"alternativeName"},"name":{"kind":"Name","value":"alternative_name"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name_value"}},{"kind":"Field","name":{"kind":"Name","value":"name_lang"}},{"kind":"Field","name":{"kind":"Name","value":"name_type"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetTodaysNameForQuayQuery__ diff --git a/ui/src/locales/en-US/common.json b/ui/src/locales/en-US/common.json index f471a7acec..54127dc1b4 100644 --- a/ui/src/locales/en-US/common.json +++ b/ui/src/locales/en-US/common.json @@ -1695,7 +1695,20 @@ "addExternalLink": "Add external link", "openExternalLink": "Open external link {{ linkTitle }}", "editStopValidity": "Edit version for stop {{ stopLabel }}", - "stopTimetablesButton": "Show timetables for stop" + "stopTimetablesButton": "Show timetables for stop", + "transportMode": { + "unknownModeTitle": "Transport mode has not been defined", + "stopIconTitle": "Stop type: {{stopType}}. Stop status: {{stopTypeState}}", + "type_bus": "bus", + "type_trunkLine": "trunk line", + "type_tram": "tram", + "type_speedTram": "speed tram", + "type_metro": "metro", + "type_rail": "train", + "type_water": "ferry", + "status_inUse": "in use", + "status_outOfUse": "out of use" + } }, "stopAreas": { "showStopAreaDetails": "Show details for stop area {{ areaLabel }}" diff --git a/ui/src/locales/fi-FI/common.json b/ui/src/locales/fi-FI/common.json index 4a25f79140..3ccfed3d4a 100644 --- a/ui/src/locales/fi-FI/common.json +++ b/ui/src/locales/fi-FI/common.json @@ -1695,7 +1695,20 @@ "addExternalLink": "Lisää ulkoinen linkki", "openExternalLink": "Avaa ulkoinen linkki {{ linkTitle }}", "editStopValidity": "Muokkaa pysäkin {{ stopLabel }} versiota", - "stopTimetablesButton": "Näytä aikataulut pysäkille" + "stopTimetablesButton": "Näytä aikataulut pysäkille", + "transportMode": { + "unknownModeTitle": "Liikennemuotoa ei ole määritelty", + "stopIconTitle": "Pysäkin tyyppi: {{stopType}}. Pysäkin tila: {{stopTypeState}}", + "type_bus": "bussi", + "type_trunkLine": "runkolinja", + "type_tram": "raitiotie", + "type_speedTram": "pikaraitiotie", + "type_metro": "metro", + "type_rail": "juna", + "type_water": "lautta", + "status_inUse": "käytössä", + "status_outOfUse": "ei käytössä" + } }, "stopAreas": { "showStopAreaDetails": "Näytä pysäkkialueen {{ areaLabel }} tiedot" diff --git a/ui/src/utils/stop-registry/transportMode.ts b/ui/src/utils/stop-registry/transportMode.ts index a4e2ab8805..5ad39a52cf 100644 --- a/ui/src/utils/stop-registry/transportMode.ts +++ b/ui/src/utils/stop-registry/transportMode.ts @@ -5,9 +5,9 @@ import { const vehicleModeValues = Object.values(ReusableComponentsVehicleModeEnum); -export const parseVehicleMode = ( +export function parseVehicleMode( transportMode?: string | null, -): ReusableComponentsVehicleModeEnum | null => { +): ReusableComponentsVehicleModeEnum | null { if (!transportMode) { return null; } @@ -20,27 +20,80 @@ export const parseVehicleMode = ( } return null; -}; +} const stopRegistryTransportModeValues = Object.values( StopRegistryTransportModeType, ); -export const parseStopRegistryTransportMode = ( - transportMode?: string | StopRegistryTransportModeType | null, -): StopRegistryTransportModeType | null => { +export function parseStopRegistryTransportMode( + transportMode: unknown, + strict: true, +): StopRegistryTransportModeType; +export function parseStopRegistryTransportMode( + transportMode: unknown, + strict?: boolean, +): StopRegistryTransportModeType | null; +export function parseStopRegistryTransportMode( + transportMode: unknown, + strict?: boolean, +): StopRegistryTransportModeType | null { if (!transportMode) { return null; } - const normalizedTransportMode = transportMode.toLowerCase(); + if (typeof transportMode !== 'string') { + throw new TypeError( + `Expected transportMode to be a string! But was: typeof(${typeof transportMode})`, + ); + } + + const normalized = transportMode.toLowerCase(); if ( stopRegistryTransportModeValues.includes( - normalizedTransportMode as StopRegistryTransportModeType, + normalized as StopRegistryTransportModeType, ) ) { - return normalizedTransportMode as StopRegistryTransportModeType; + return normalized as StopRegistryTransportModeType; + } + + if (strict) { + throw new TypeError( + `Expected transportMode to be a valid StopRegistryTransportModeType. transportMode(${transportMode}); normalized(${normalized}); StopRegistryTransportModeType(${stopRegistryTransportModeValues})`, + ); } return null; -}; +} + +export function parseStopRegistryTransportModeJsonArray( + transportModes: unknown, +): Array { + if (!Array.isArray(transportModes)) { + throw new TypeError( + `Expected transportModes to be an array! But was: typeof(${typeof transportModes})`, + ); + } + + return transportModes + .map((it) => parseStopRegistryTransportMode(it, true)) + .sort(); +} + +const vehicleToTransportModeMap = { + [ReusableComponentsVehicleModeEnum.Bus]: StopRegistryTransportModeType.Bus, + [ReusableComponentsVehicleModeEnum.Ferry]: + StopRegistryTransportModeType.Water, + [ReusableComponentsVehicleModeEnum.Metro]: + StopRegistryTransportModeType.Metro, + [ReusableComponentsVehicleModeEnum.Train]: StopRegistryTransportModeType.Rail, + [ReusableComponentsVehicleModeEnum.Tram]: StopRegistryTransportModeType.Tram, +} as const satisfies Readonly< + Record +>; + +export function mapVehicleModeToTransportMode( + vehicleMode: ReusableComponentsVehicleModeEnum, +): StopRegistryTransportModeType { + return vehicleToTransportModeMap[vehicleMode]; +}