diff --git a/maas-schemas-ts/src/core/components/travel-mode.ts b/maas-schemas-ts/src/core/components/travel-mode.ts index 8ee18a554..0dcee77a9 100644 --- a/maas-schemas-ts/src/core/components/travel-mode.ts +++ b/maas-schemas-ts/src/core/components/travel-mode.ts @@ -185,7 +185,8 @@ export const SuperMode = t.brand( | 'CAR' | 'BICYCLE' | 'BICYCLE_RENT' - | 'UNKNOWN'), + | 'UNKNOWN' + ), SuperModeBrand > => true, 'SuperMode', diff --git a/maas-schemas-ts/src/core/itinerary.ts b/maas-schemas-ts/src/core/itinerary.ts index f699dad6b..d39b7a34c 100644 --- a/maas-schemas-ts/src/core/itinerary.ts +++ b/maas-schemas-ts/src/core/itinerary.ts @@ -93,6 +93,7 @@ export type Itinerary = t.Branded< label?: string; n?: number; isWhimRide?: boolean; + provider?: string; } & { startTime: Defined; endTime: Defined; @@ -125,6 +126,7 @@ export const Itinerary = t.brand( label: t.string, n: t.number, isWhimRide: t.boolean, + provider: t.string, }), t.type({ startTime: Defined, @@ -158,6 +160,7 @@ export const Itinerary = t.brand( label?: string; n?: number; isWhimRide?: boolean; + provider?: string; } & { startTime: Defined; endTime: Defined; diff --git a/maas-schemas-ts/src/core/leg.ts b/maas-schemas-ts/src/core/leg.ts index f1fbffc44..9802e23ea 100644 --- a/maas-schemas-ts/src/core/leg.ts +++ b/maas-schemas-ts/src/core/leg.ts @@ -161,6 +161,30 @@ export interface RouteLongNameBrand { export type AgencyId = Common_.AgencyId; export const AgencyId = Common_.AgencyId; +// AgencyName +// The purpose of this remains a mystery +export type AgencyName = t.Branded; +export const AgencyName = t.brand( + t.string, + (x): x is t.Branded => true, + 'AgencyName', +); +export interface AgencyNameBrand { + readonly AgencyName: unique symbol; +} + +// Co2 +// The purpose of this remains a mystery +export type Co2 = t.Branded; +export const Co2 = t.brand( + t.number, + (x): x is t.Branded => true, + 'Co2', +); +export interface Co2Brand { + readonly Co2: unique symbol; +} + // LegGeometry // The purpose of this remains a mystery export type LegGeometry = t.Branded< @@ -251,6 +275,8 @@ export type LegCore = t.Branded< routeShortName?: RouteShortName; routeLongName?: RouteLongName; agencyId?: AgencyId; + agencyName?: string; + co2?: number; legGeometry?: LegGeometry; tspProduct?: TspProduct; productOption?: ProductOption; @@ -281,6 +307,8 @@ export const LegCore = t.brand( routeShortName: RouteShortName, routeLongName: RouteLongName, agencyId: AgencyId, + agencyName: t.string, + co2: t.number, legGeometry: LegGeometry, tspProduct: TspProduct, productOption: ProductOption, @@ -312,6 +340,8 @@ export const LegCore = t.brand( routeShortName?: RouteShortName; routeLongName?: RouteLongName; agencyId?: AgencyId; + agencyName?: string; + co2?: number; legGeometry?: LegGeometry; tspProduct?: TspProduct; productOption?: ProductOption; diff --git a/maas-schemas-ts/translation.log b/maas-schemas-ts/translation.log index d67450d14..6ba7ef64a 100644 --- a/maas-schemas-ts/translation.log +++ b/maas-schemas-ts/translation.log @@ -176,12 +176,12 @@ WARNING: minLength field not supported outside top-level definitions in ./core/components/car-rental.json WARNING: maxLength field not supported outside top-level definitions in ./core/components/car-rental.json +INFO: missing description + in ./core/components/car-rental.json INFO: primitive type "string" used outside top-level definitions in ./core/components/common.json INFO: missing description in ./core/components/common.json -INFO: missing description - in ./core/components/car-rental.json INFO: missing description in ./core/components/common.json INFO: missing description @@ -618,6 +618,8 @@ INFO: primitive type "number" used outside top-level definitions in ./core/itinerary.json WARNING: minimum field not supported outside top-level definitions in ./core/itinerary.json +INFO: primitive type "string" used outside top-level definitions + in ./core/itinerary.json INFO: missing description in ./core/itinerary.json INFO: missing description @@ -664,6 +666,14 @@ WARNING: skipping examples handling for $ref object in ./core/leg.json WARNING: skipping default value handling for $ref object in ./core/leg.json +INFO: primitive type "string" used outside top-level definitions + in ./core/leg.json +INFO: primitive type "number" used outside top-level definitions + in ./core/leg.json +INFO: missing description + in ./core/leg.json +INFO: missing description + in ./core/leg.json INFO: missing description in ./core/leg.json INFO: missing description