Skip to content
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
34 changes: 34 additions & 0 deletions src/lib/api/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ export interface components {
*/
type: 'RouteDeleteV1';
};
RouteDeleteV2Line: {
ack: string;
data: components['schemas']['SyncRouteDeleteV1'];
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
type: 'RouteDeleteV2';
};
RouteV1Line: {
ack: string;
data: components['schemas']['SyncRouteV1'];
Expand All @@ -228,6 +237,15 @@ export interface components {
*/
type: 'RouteV1';
};
RouteV2Line: {
ack: string;
data: components['schemas']['SyncRouteV2'];
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
type: 'RouteV2';
};
StopDeleteV1Line: {
ack: string;
data: components['schemas']['SyncStopDeleteV1'];
Expand Down Expand Up @@ -316,7 +334,9 @@ export interface components {
*/
SyncEntityType:
| 'RouteV1'
| 'RouteV2'
| 'RouteDeleteV1'
| 'RouteDeleteV2'
| 'DirectionV1'
| 'DirectionDeleteV1'
| 'StopV1'
Expand Down Expand Up @@ -383,6 +403,7 @@ export interface components {
/** @enum {string} */
SyncRequestType:
| 'RoutesV1'
| 'RoutesV2'
| 'DirectionsV1'
| 'StopsV1'
| 'AlertsV1'
Expand Down Expand Up @@ -414,6 +435,17 @@ export interface components {
longName: string;
shortName: string;
};
/** @description SyncRouteV2 schema */
SyncRouteV2: {
active: boolean;
darkColor: string;
/** Format: uuid */
id: string;
isLoop: boolean;
lightColor: string;
longName: string;
shortName: string;
};
/** @description SyncStopDeleteV1 schema */
SyncStopDeleteV1: {
/** Format: uuid */
Expand All @@ -436,7 +468,9 @@ export interface components {
};
SyncStreamLine:
| components['schemas']['RouteV1Line']
| components['schemas']['RouteV2Line']
| components['schemas']['RouteDeleteV1Line']
| components['schemas']['RouteDeleteV2Line']
| components['schemas']['DirectionV1Line']
| components['schemas']['DirectionDeleteV1Line']
| components['schemas']['StopV1Line']
Expand Down
1 change: 1 addition & 0 deletions src/lib/data/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function toRoute(row: RouteRow): Route {
darkColor: row.darkColor,
directions,
bounds: findBoundingBox(directions.flatMap((d) => d.pathPoints)),
isLoop: row.isLoop,
};
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface Route {
darkColor: string;
directions: Direction[];
bounds: Location[];
isLoop: boolean;
}

export interface Direction {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/db/migrations/0001_route_is_loop.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `route` ADD `is_loop` integer DEFAULT true NOT NULL;--> statement-breakpoint
DELETE FROM `sync_ack`;
Loading
Loading