import { Country, County } from './helpers/county'; declare enum BaseFilter { Equal = "EQ", Exists = "EXISTS", GreaterThan = "GT", GreaterThanOrEqual = "GTE", LessThan = "LT", LessThanOrEqual = "LTE", NotEqual = "NE", Like = "LIKE", NotLike = "NOTLIKE", In = "IN", NotIn = "NOTIN" } declare enum GeoFilter { Within = "WITHIN", Intersects = "INTERSECTS", Near = "NEAR" } declare enum ModifierFilter { ElementMatch = "ELEMENTMATCH", Not = "NOT", And = "AND", Or = "OR" } export declare type FilterType = BaseFilter | GeoFilter | ModifierFilter; export declare enum DataField { ActivityId = "ActivityId", ActivityType = "ActivityType", Advertised = "Advertised", AdvertisedTimeAtLocation = "AdvertisedTimeAtLocation", AdvertisedTrainIdent = "AdvertisedTrainIdent", Booking = "Booking", Code = "Code", Cancled = "Cancled", Deleted = "Deleted", Deviation = "Deviation", EstimatedTimeAtLocation = "EstimatedTimeAtLocation", EstimatedTimeIsPreliminary = "EstimatedTimeIsPreliminary", FromLocation = "FromLocation", GroupDescription = "GroupDescription", LocationSignature = "LocationSignature", Level1Description = "Level1Description", Level2Description = "Level2Description", Level3Description = "Level3Description", MobileWebLink = "MobileWebLink", ModifiedTime = "ModifiedTime", NewEquipment = "NewEquipment", Operator = "Operator", OtherInformation = "OtherInformation", PlannedEstimatedTimeAtLocation = "PlannedEstimatedTimeAtLocation", PlannedEstimatedTimeAtLocationIsValid = "PlannedEstimatedTimeAtLocationIsValid", ProductInformation = "ProductInformation", ScheduledDepartureDateTime = "ScheduledDepartureDateTime", Service = "Service", TechnicalDateTime = "TechnicalDateTime", TechnicalTrainIdent = "TechnicalTrainIdent", TimeAtLocation = "TimeAtLocation", TimeAtLocationWithSeconds = "TimeAtLocationWithSeconds", ToLocation = "ToLocation", TrackAtLocation = "TrackAtLocation", TrainComposition = "TrainComposition", TrainOwner = "TrainOwner", TypeOfTraffic = "TypeOfTraffic", WebLink = "WebLink", WebLinkName = "WebLinkName", ViaFromLocation = "ViaFromLocation", ViaToLocation = "ViaToLocation", AffectedLocation = "AffectedLocation", CountyNumber = "CountyNo", EndDateTime = "EndDateTime", EventId = "EventId", ExpectTrafficImpact = "ExpectTrafficImpact", ExternalDescription = "ExternalDescription", Geometry = "Geometry", Header = "Header", LastUpdateDateTime = "LastUpdateDateTime", PrognosticatedEndDateTimeTrafficImpact = "PrognosticatedEndDateTimeTrafficImpact", ReasonCodeText = "ReasonCodeText", StartDateTime = "StartDateTime", TrafficImpact = "TrafficImpact", AdvertisedLocationName = "AdvertisedLocationName", AdvertisedShortLocationName = "AdvertisedShortLocationName", CountryCode = "CountryCode", LocationInformationText = "LocationInformationText", PlatformLine = "PlatformLine", Prognosticated = "Prognosticated" } declare type DataFields = DataField | keyof typeof DataField; export declare enum GeoMode { SWEREF99TM = "Geometry.SWEREF99TM" } export declare enum GeoShape { Box = "box", Polygon = "polygon", Center = "center" } declare type GeoModes = GeoMode | keyof typeof GeoMode; declare type DataValue = T extends DataField.CountyNumber | 'CountyNumber' ? (County | number) : T extends DataField.CountryCode | 'CountryCode' ? (Country | string) : string; export declare class Filter { private type; private name; private shape; private value; private radius; private minDistance; private maxDistance; private subFilters; constructor(type: BaseFilter, name: string, value: string); constructor(type: GeoFilter.Within, name: string, shape: GeoShape.Center, value: string, radius: string); constructor(type: GeoFilter.Within, name: string, shape: GeoShape.Box | GeoShape.Polygon, value: string); constructor(type: GeoFilter.Intersects, name: string, shape: GeoShape.Center, value: string, radius: string); constructor(type: GeoFilter.Intersects, name: string, shape: GeoShape.Box | GeoShape.Polygon, value: string); constructor(type: GeoFilter.Near, name: string, value: string, minDistance: string, maxDistance: string); constructor(type: ModifierFilter, ...filters: Array>); toString(): string; static equal(dataField: T, value: DataValue): Filter; static exists(dataField: T, exists: boolean): Filter; static greaterThan(dataField: T, above: string | number): Filter; static greaterThanOrEqual(dataField: T, above: string | number): Filter; static lessThan(dataField: T, above: string | number): Filter; static lessThanOrEqual(dataField: T, above: string | number): Filter; static notEqual(dataField: T, value: DataValue): Filter; static like(dataField: T, value: RegExp): Filter; static like(dataField: T, value: string): Filter; static notLike(dataField: T, value: RegExp): Filter; static notLike(dataField: T, value: string): Filter; static in(dataField: T, value: DataValue): Filter; static notIn(dataField: T, value: DataValue): Filter; static within(dataField: T, shape: GeoShape.Center, value: string, radius: string | number): Filter; static within(dataField: T, shape: GeoShape.Box | GeoShape.Polygon, value: string): Filter; static intersects(dataField: T, shape: GeoShape.Center, value: string, radius: string | number): Filter; static intersects(dataField: T, shape: GeoShape.Box | GeoShape.Polygon, value: string): Filter; static near(dataField: T, value: string, minDistance: string | number, maxDistance: string | number): Filter; static not(...filters: Array>): Filter; static and(...filters: Array>): Filter; static or(...filters: Array>): Filter; static elementMatch(...filters: Array>): Filter; } export {};