Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nearby view support (types) #681

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,22 @@ export type Place = {
name: string;
networks?: string[];
rentalVehicle?: { network: string };
stop?: Stop;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopCode?: string;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopId?: string;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopIndex?: number;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopSequence?: number;
vertexType: string;
zoneId?: string;
Expand Down Expand Up @@ -460,6 +473,8 @@ export type StopLayerStop = LayerEntity & {
name: string;
};

export type StopEventHandler = (stop: Stop | { stopId: string }) => void;

/**
* This models data about a stop and it's associated routes that is obtained
* from a transit index API.
Expand All @@ -472,6 +487,7 @@ export type Stop = {
color?: string;
dist?: number;
geometries?: { geoJson?: GeoJSON.Polygon };
gtfsId: string;
id: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a type alias per https://github.com/opentripplanner/otp-ui/pull/655/files#r1387985351 if we are to avoid breaking compatibility in a whole bunch of packages in #655.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good suggestion, thank you

lat: number;
lon: number;
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3241,6 +3241,24 @@
resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca"
integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==

"@opentripplanner/[email protected]":
version "11.1.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.1.2.tgz#a99d1fa4fb1f587d58fae8fcfd70a3bfe4eed424"
integrity sha512-Rn1tBm5F+nt/A4/0cpq6cyNTprSsxfFslujMoZ4P4r6fZ7YTx0d25di+MZ/CZgSlCzHJIiGAfi8DsfJ7yStcTA==
dependencies:
"@conveyal/lonlat" "^1.4.1"
"@mapbox/polyline" "^1.1.0"
"@opentripplanner/geocoder" "^1.4.2"
"@styled-icons/foundation" "^10.34.0"
"@turf/along" "^6.0.1"
chroma-js "^2.4.2"
date-fns "^2.28.0"
date-fns-tz "^1.2.2"
graphql "^16.6.0"
lodash.clonedeep "^4.5.0"
lodash.isequal "^4.5.0"
qs "^6.9.1"

"@opentripplanner/[email protected]":
version "7.0.0-alpha.2"
resolved "https://registry.yarnpkg.com/@opentripplanner/types/-/types-7.0.0-alpha.2.tgz#d10c69f99b2da6d1e80ab5989520bde8e558627b"
Expand Down
Loading