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

feat(trusted-companions): Plan trip with mobility profile for self or on behalf of trusted companion #1302

Merged
merged 91 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 88 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
197c145
feat(advanced-settings-panel): add mobility profile section
josh-willis-arcadis Oct 23, 2024
cd9d023
feat(advanced-settings-panel): add dropdown selector for mobility pro…
josh-willis-arcadis Oct 23, 2024
14ea7a1
add more margin on dropdown selector
josh-willis-arcadis Oct 23, 2024
855b7e4
use right status. dont use userid
josh-willis-arcadis Oct 31, 2024
af428f4
start hooking up mobility selector to routing query
josh-willis-arcadis Nov 1, 2024
28e41e5
feat(advanced-settings-panel): add onChange event handling for mobili…
josh-willis-arcadis Nov 4, 2024
714d2e6
feat(advanced-settings-panel): add en i18n string for mobility profil…
josh-willis-arcadis Nov 7, 2024
a58f469
feat: Add confirmation and error landing pages.
binh-dam-ibigroup Oct 30, 2024
0bd5a77
refactor(confirmation.html): Merge error and confirmation pages
binh-dam-ibigroup Oct 31, 2024
368d0fa
refactor(user/types): add status values
josh-willis-arcadis Nov 4, 2024
afaa808
Fix code scanning alert no. 7: Client-side cross-site scripting
josh-willis-arcadis Nov 4, 2024
077b61f
feat(advanced-trip-form): Add autoplan
amy-corson-ibigroup Oct 16, 2024
86e6bf2
Prevent autoplan if there are validation errors
amy-corson-ibigroup Oct 16, 2024
cb18e6e
Pass plan trip through mobile
amy-corson-ibigroup Oct 16, 2024
201af4b
remove unnecessary props
amy-corson-ibigroup Oct 16, 2024
489a8d4
Fix mapstatetoprops incorrect destructure
amy-corson-ibigroup Oct 30, 2024
5856a97
Fix percy tests and add openEditIfNeeded function
amy-corson-ibigroup Oct 30, 2024
334004e
chore(deps): bump elliptic from 6.5.7 to 6.6.0
dependabot[bot] Oct 31, 2024
30158cb
fallback to departure time when `useArrivalTime` is true
miles-grant-ibigroup Oct 18, 2024
38c4641
only show routes from current service week
miles-grant-ibigroup Aug 21, 2024
54d47fe
chore(deps): update otp-ui
miles-grant-ibigroup Sep 16, 2024
fd92d03
make currentServiceWeek query in nearby query
miles-grant-ibigroup Sep 25, 2024
d838004
address pr feedback
miles-grant-ibigroup Oct 7, 2024
5305913
complete pr feedback addressing
miles-grant-ibigroup Oct 7, 2024
e1c6d82
correct types
miles-grant-ibigroup Oct 7, 2024
b94b3d2
update snapshots
miles-grant-ibigroup Oct 7, 2024
f8cc983
add missing `nearbyRoutes` to snapshots
miles-grant-ibigroup Oct 7, 2024
7967956
update snapshots
miles-grant-ibigroup Oct 7, 2024
ed1c057
update percy mocks
daniel-heppner-ibigroup Oct 25, 2024
6ff36e6
chore(craco): Update comment for graphql files
binh-dam-ibigroup Nov 1, 2024
0600483
refactor(main): Update comment regarding custom graphql query.
binh-dam-ibigroup Nov 1, 2024
7a61fa9
set correct hover index
miles-grant-ibigroup Oct 15, 2024
d913f52
remove dead code
miles-grant-ibigroup Oct 15, 2024
4ff3481
clean up
miles-grant-ibigroup Oct 15, 2024
e44e025
add missing typescript
miles-grant-ibigroup Nov 1, 2024
7ca2569
clean up miles's bad code
daniel-heppner-ibigroup Nov 4, 2024
16aef0e
respect mode text color
miles-grant-ibigroup Oct 9, 2024
715bf08
address pr feedback
miles-grant-ibigroup Nov 1, 2024
440d974
chore(i18n): Add FR translations
binh-dam-ibigroup Nov 7, 2024
0e71d55
refactor: use plural travelCompanions
josh-willis-arcadis Nov 7, 2024
3b09e8a
fix(en-us): fix spelling
josh-willis-arcadis Nov 7, 2024
1bc082d
refactor(status-badge): use implicit return syntax
josh-willis-arcadis Nov 7, 2024
23791f9
fix: don't zoom when clicking itinerary
daniel-heppner-ibigroup Oct 28, 2024
f470d95
feat(advanced-settings-panel): make api call to get dependent user info
josh-willis-arcadis Nov 15, 2024
d626c55
set correct hover index
miles-grant-ibigroup Oct 15, 2024
ad11fc1
remove dead code
miles-grant-ibigroup Oct 15, 2024
ed27d8c
clean up
miles-grant-ibigroup Oct 15, 2024
734aa58
add missing typescript
miles-grant-ibigroup Nov 1, 2024
4cd8ff3
clean up miles's bad code
daniel-heppner-ibigroup Nov 4, 2024
a9bea3f
respect mode text color
miles-grant-ibigroup Oct 9, 2024
1e4a6d7
address pr feedback
miles-grant-ibigroup Nov 1, 2024
85964b2
nearby: use stoptime headsigns if applicable
miles-grant-ibigroup Nov 7, 2024
6c46ae8
revert unneeded change
miles-grant-ibigroup Nov 13, 2024
1b2975d
only show routes from current service week
miles-grant-ibigroup Aug 21, 2024
5f5ba94
chore(deps): update otp-ui
miles-grant-ibigroup Sep 16, 2024
21c15f3
make currentServiceWeek query in nearby query
miles-grant-ibigroup Sep 25, 2024
e63f20d
address pr feedback
miles-grant-ibigroup Oct 7, 2024
d0566ba
complete pr feedback addressing
miles-grant-ibigroup Oct 7, 2024
928edbb
correct types
miles-grant-ibigroup Oct 7, 2024
feb9a97
add missing `nearbyRoutes` to snapshots
miles-grant-ibigroup Oct 7, 2024
0b01a32
update snapshots
miles-grant-ibigroup Oct 7, 2024
405040f
update snapshots
miles-grant-ibigroup Nov 13, 2024
56f035b
Merge branch 'dev' into plan-trip-on-behalf-of
josh-willis-arcadis Nov 15, 2024
721ef46
remove comment
josh-willis-arcadis Nov 15, 2024
c4bf3c9
remove weird check
josh-willis-arcadis Nov 15, 2024
c8d0d25
feat(advanced-settings-panel): set selected mobility profile in curre…
josh-willis-arcadis Nov 18, 2024
908ed59
feat(api-v2): get mobility profile from current query or from user
josh-willis-arcadis Nov 18, 2024
fef9147
feat(i18n): add missing strings and remove unused
josh-willis-arcadis Nov 18, 2024
1274bfe
fix(i18n): remove unused string from fr translations
josh-willis-arcadis Nov 18, 2024
5761a5e
address pr feedback
josh-willis-arcadis Nov 20, 2024
45b8140
feat: Add confirmation and error landing pages.
binh-dam-ibigroup Oct 30, 2024
2922f2e
refactor(confirmation.html): Merge error and confirmation pages
binh-dam-ibigroup Oct 31, 2024
8178e87
chore(i18n): Add FR translations
binh-dam-ibigroup Nov 7, 2024
f4ca59e
refactor: use plural travelCompanions
josh-willis-arcadis Nov 7, 2024
cd22a1b
refactor(existing-account-display): remove collapsible prop
josh-willis-arcadis Nov 15, 2024
50e09cb
refactor(saved-trip-editor): remove collapsible prop
josh-willis-arcadis Nov 15, 2024
5ba7b37
fix: consolidate stop times query, remove onlyRequestForOperators
amy-corson-ibigroup Oct 15, 2024
4e16499
fix query for stops
amy-corson-ibigroup Oct 16, 2024
4838464
fix: make transitIndex stops comprehensive list instead of rewriting …
amy-corson-ibigroup Oct 21, 2024
b67ba23
replace $set wtih $merge for FIND_STOP_TIMES_FOR_STOP
amy-corson-ibigroup Oct 21, 2024
86005cd
we only need one $merge actually
amy-corson-ibigroup Oct 21, 2024
21dd75b
Provide transiations for OTP-UI-stopsAndStations layer
amy-corson-ibigroup Oct 21, 2024
125ce26
restore missing otp1 fields
miles-grant-ibigroup Nov 8, 2024
ea08952
chore(deps): update otp-ui
miles-grant-ibigroup Nov 13, 2024
0b50f23
Merge branch 'dev' into plan-trip-on-behalf-of
josh-willis-arcadis Nov 20, 2024
44fb4b6
chore(i18n): Add FR text
binh-dam-ibigroup Nov 21, 2024
736d2d0
address pr feedback
josh-willis-arcadis Nov 21, 2024
7e5e75c
fix(i18n): remove extra space
josh-willis-arcadis Nov 22, 2024
fe2c134
fix(advanced-settings-panel): adjust spacing and indenting to be unif…
josh-willis-arcadis Dec 5, 2024
bb77913
Merge branch 'dev' into plan-trip-on-behalf-of
josh-willis-arcadis Dec 6, 2024
f5f8ebd
Merge branch 'dev' into plan-trip-on-behalf-of
josh-willis-arcadis Dec 10, 2024
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
7 changes: 6 additions & 1 deletion i18n/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ actions:
confirmDeletePlace: Would you like to remove this place?
emailVerificationResent: The email verification message has been resent.
genericError: "An error was encountered: {err}"
getDependentUserInfoFailed: Error getting mobility profile information.
itineraryExistenceCheckFailed: Error checking whether your selected trip is possible.
mustAcceptTermsToSavePlace: Please accept the Terms of Use (under My Account) to save locations.
mustBeLoggedInToSavePlace: Please log in to save locations.
Expand Down Expand Up @@ -195,7 +196,6 @@ components:
BatchSearchScreen:
advancedHeader: Advanced Preferences
header: Plan Your Trip
modeOptions: Mode Options
modeSelectorLabel: Select a travel mode
moreOptions: More options
saveAndReturn: Save and return
Expand Down Expand Up @@ -337,10 +337,15 @@ components:
header: Mobility Profile
mobilityDevices: "Mobility devices: "
mobilityLimitations: "Mobility limitations: "
planTripDescription: >-
If you have a travel companion, you can choose to plan this trip
according to their mobility profile.
visionLimitations: "Vision limitations: "
dropdownLabel: "User mobility profile:"
intro: >-
Please answer a few questions to customize the trip planning experience to
your needs and preferences.
myself: Myself
title: Define Your Mobility Profile
NarrativeItinerariesHeader:
changeSortDir: Change sort direction
Expand Down
8 changes: 7 additions & 1 deletion i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ actions:
Le message de vérification de votre adresse e-mail a été envoyé de
nouveau.
genericError: "Une erreur s'est produite : {err}"
getDependentUserInfoFailed: Erreur lors de l'obtention des profils de mobilité.
itineraryExistenceCheckFailed: Erreur lors de la vérification de la validité du trajet choisi.
mustAcceptTermsToSavePlace: >-
Veuillez accepter les conditions d'utilisation (dans Mon compte) pour
Expand Down Expand Up @@ -206,7 +207,6 @@ components:
BatchSearchScreen:
advancedHeader: Préférences avancées
header: Votre trajet
modeOptions: Choix du mode
modeSelectorLabel: Sélectionnez un mode de déplacement
moreOptions: Plus d'options
saveAndReturn: Enregistrer et fermer
Expand Down Expand Up @@ -354,10 +354,16 @@ components:
header: Profil mobilité
mobilityDevices: "Appareils d'aide : "
mobilityLimitations: "Handicaps moteurs : "
planTripDescription: >-
Vous pouvez rechercher des trajets adaptés au profil mobilité des
personnes que vous accompagnez. Pour ajouter des personnes
accompagnatrices, allez dans <manageLink>Préférences</manageLink>.
visionLimitations: "Handicaps visuels : "
dropdownLabel: "Profil à utiliser :"
intro: >-
Veuillez répondre a quelques questions pour personaliser vos recherches de
trajets selon vos besoins et préférences.
myself: Moi-même
title: Spécifiez votre profil de mobilité
NarrativeItinerariesHeader:
changeSortDir: Changer l'ordre de tri
Expand Down
4 changes: 3 additions & 1 deletion lib/actions/apiV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,9 @@ export function routingQuery(searchId = null, updateSearchInReducer) {
numItineraries: numItineraries || getDefaultNumItineraries(config)
}
if (config.mobilityProfile) {
baseQuery.mobilityProfile = loggedInUser?.mobilityProfile?.mobilityMode
baseQuery.mobilityProfile =
currentQuery.mobilityProfile ||
loggedInUser?.mobilityProfile?.mobilityMode
}
// Generate combinations if the modes for query are not specified in the query
// FIXME: BICYCLE_RENT does not appear in this list unless TRANSIT is also enabled.
Expand Down
24 changes: 24 additions & 0 deletions lib/actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const setCurrentUserMonitoredTrips = createAction(
const setCurrentUserTripRequests = createAction(
'SET_CURRENT_USER_TRIP_REQUESTS'
)
const setDependentUserInfo = createAction('SET_DEPENDENT_USER_INFO')
const setLastPhoneSmsRequest = createAction('SET_LAST_PHONE_SMS_REQUEST')
export const setPathBeforeSignIn = createAction('SET_PATH_BEFORE_SIGNIN')
export const clearItineraryExistence = createAction('CLEAR_ITINERARY_EXISTENCE')
Expand Down Expand Up @@ -693,6 +694,29 @@ export function checkItineraryExistence(trip, intl) {
}
}

export function getDependentUserInfo(userIds, intl) {
return async function (dispatch, getState) {
const state = getState()
const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(state)
const requestUrl = `${apiBaseUrl}${API_OTPUSER_PATH}/getdependentmobilityprofile?dependentuserids=${userIds}`

const { data, status } = await secureFetch(
requestUrl,
accessToken,
apiKey,
'GET'
)

if (status === 'success' && data) {
dispatch(setDependentUserInfo(data))
} else {
alert(
intl.formatMessage({ id: 'actions.user.getDependentUserInfoFailed' })
)
}
}
}

/**
* Plans a new trip for the current date given the query parameters in the given
* monitored trip
Expand Down
116 changes: 104 additions & 12 deletions lib/components/form/advanced-settings-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
import {
addSettingsToButton,
AdvancedModeSubsettingsContainer,
DropdownSelector,
ModeSettingRenderer,
populateSettingWithValue
} from '@opentripplanner/trip-form'
import { ArrowLeft } from '@styled-icons/fa-solid/ArrowLeft'
import { Check } from '@styled-icons/boxicons-regular'
import { connect } from 'react-redux'
import { decodeQueryParams, DelimitedArrayParam } from 'serialize-query-params'
import { FormattedMessage, useIntl } from 'react-intl'
import { FormattedMessage, IntlShape, useIntl } from 'react-intl'
import { invisibleCss } from '@opentripplanner/trip-form/lib/MetroModeSelector'
import {
ModeButtonDefinition,
ModeSetting,
ModeSettingValues
} from '@opentripplanner/types'
import React, { RefObject, useCallback, useContext, useState } from 'react'
import { QueryParamChangeEvent } from '@opentripplanner/trip-form/lib/types'
import React, {
RefObject,
useCallback,
useContext,
useEffect,
useMemo,
useState
} from 'react'
import styled from 'styled-components'

import * as formActions from '../../actions/form'
import * as userActions from '../../actions/user'
import { AppReduxState } from '../../util/state-types'
import { blue, getBaseColor } from '../util/colors'
import { ComponentContext } from '../../util/contexts'
import { generateModeSettingValues } from '../../util/api'
import { User } from '../user/types'
import Link from '../util/link'

import {
addCustomSettingLabels,
Expand Down Expand Up @@ -69,10 +81,18 @@ const HeaderContainer = styled.div`
height: 30px;
`

const Subheader = styled.h2`
const InvisibleSubheader = styled.h2`
${invisibleCss}
`

const VisibleSubheader = styled.h2`
display: block;
font-size: 18px;
font-weight: 700;
height: auto;
margin: 1em 0;
position: static;
width: auto;
`
const ReturnToTripPlanButton = styled.button`
align-items: center;
background-color: var(--main-base-color, ${blue[900]});
Expand Down Expand Up @@ -111,13 +131,28 @@ const DtSelectorContainer = styled.div`
}
`

const MobilityProfileContainer = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

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

The spacing and indenting here is looking really random. Can we

  1. Make the spacing even between d/t selector above and mode selector below (I think you can make this much higher, there's a lot of vertical space here you can use!)
  2. Make all the left-hand padding uniform and in line with the other elements around it
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in fe2c134

margin-bottom: 12px;
josh-willis-arcadis marked this conversation as resolved.
Show resolved Hide resolved
`

const UnderlinedLink = styled(Link)`
text-decoration: underline;
`
josh-willis-arcadis marked this conversation as resolved.
Show resolved Hide resolved

const MobilityProfileDropdown = styled(DropdownSelector)`
margin: 20px 0px;
`

const AdvancedSettingsPanel = ({
autoPlan,
closeAdvancedSettings,
currentQuery,
enabledModeButtons,
getDependentUserInfo,
handlePlanTrip,
innerRef,
loggedInUser,
mobilityProfile,
modeButtonOptions,
modeSettingDefinitions,
modeSettingValues,
Expand All @@ -129,20 +164,40 @@ const AdvancedSettingsPanel = ({
closeAdvancedSettings: () => void
currentQuery: any
enabledModeButtons: string[]
getDependentUserInfo: (userIds: string[], intl: IntlShape) => void
handlePlanTrip: () => void
innerRef: RefObject<HTMLDivElement>
loggedInUser?: User
mobilityProfile: boolean
modeButtonOptions: ModeButtonDefinition[]
modeSettingDefinitions: ModeSetting[]
modeSettingValues: ModeSettingValues
saveAndReturnButton?: boolean
setCloseAdvancedSettingsWithDelay: () => void
setQueryParam: (evt: any) => void
}): JSX.Element => {
const intl = useIntl()
const [closingBySave, setClosingBySave] = useState(false)
const [selectedMobilityProfile, setSelectedMobilityProfile] =
useState<string>(
currentQuery.mobilityProfile ||
loggedInUser?.mobilityProfile?.mobilityMode ||
''
)
const dependents = useMemo(
() => loggedInUser?.dependents || [],
[loggedInUser]
)

useEffect(() => {
if (mobilityProfile && dependents.length > 0) {
getDependentUserInfo(dependents, intl)
}
}, [dependents, getDependentUserInfo, intl, mobilityProfile])

const baseColor = getBaseColor()
const accentColor = baseColor || blue[900]

const intl = useIntl()
const closeButtonText = intl.formatMessage({
id: 'components.BatchSearchScreen.saveAndReturn'
})
Expand Down Expand Up @@ -184,7 +239,6 @@ const AdvancedSettingsPanel = ({
)
)


const tripFormErrors = tripPlannerValidationErrors(currentQuery, intl)

const closePanel = useCallback(() => {
Expand All @@ -208,6 +262,16 @@ const AdvancedSettingsPanel = ({
closePanel()
}, [closePanel, setCloseAdvancedSettingsWithDelay])

const onMobilityProfileChange = useCallback(
(evt: QueryParamChangeEvent) => {
const value = evt.mobilityProfile
setSelectedMobilityProfile(value as string)
setQueryParam({
mobilityProfile: value
})
},
[setSelectedMobilityProfile, setQueryParam]
)
return (
<PanelOverlay className="advanced-settings" ref={innerRef}>
<HeaderContainer>
Expand All @@ -228,17 +292,43 @@ const AdvancedSettingsPanel = ({
</DtSelectorContainer>
{processedGlobalSettings.length > 0 && (
<>
<Subheader>
<InvisibleSubheader>
<FormattedMessage id="components.BatchSearchScreen.tripOptions" />
</Subheader>
</InvisibleSubheader>
<GlobalSettingsContainer className="global-settings-container">
{globalSettingsComponents}
</GlobalSettingsContainer>
</>
)}
<Subheader>
<FormattedMessage id="components.BatchSearchScreen.modeOptions" />
</Subheader>
{loggedInUser?.dependentsInfo?.length && (
<MobilityProfileContainer>
<VisibleSubheader>
<FormattedMessage id="components.MobilityProfile.MobilityPane.header" />
</VisibleSubheader>
<FormattedMessage id="components.MobilityProfile.MobilityPane.planTripDescription" />
<MobilityProfileDropdown
label={intl.formatMessage({
id: 'components.MobilityProfile.dropdownLabel'
})}
name="mobilityProfile"
onChange={onMobilityProfileChange}
options={[
{
text: intl.formatMessage({
id: 'components.MobilityProfile.myself'
}),
value: loggedInUser.mobilityProfile?.mobilityMode || ''
},
...(loggedInUser.dependentsInfo?.map((user) => ({
text: user.name || user.email,
value: user.mobilityMode || ''
})) || [])
]}
value={selectedMobilityProfile}
/>
</MobilityProfileContainer>
)}

<AdvancedModeSubsettingsContainer
accentColor={accentColor}
fillModeIcons
Expand Down Expand Up @@ -268,7 +358,6 @@ const AdvancedSettingsPanel = ({
</PanelOverlay>
)
}

const queryParamConfig = { modeButtons: DelimitedArrayParam }

const mapStateToProps = (state: AppReduxState) => {
Expand All @@ -293,6 +382,8 @@ const mapStateToProps = (state: AppReduxState) => {
})?.modeButtons?.filter((mb): mb is string => mb !== null) ||
modes?.initialState?.enabledModeButtons ||
[],
loggedInUser: state.user.loggedInUser,
mobilityProfile: state.otp.config?.mobilityProfile || false,
modeButtonOptions: modes?.modeButtons || [],
modeSettingDefinitions: state.otp?.modeSettingDefinitions || [],
modeSettingValues,
Expand All @@ -301,6 +392,7 @@ const mapStateToProps = (state: AppReduxState) => {
}

const mapDispatchToProps = {
getDependentUserInfo: userActions.getDependentUserInfo,
setQueryParam: formActions.setQueryParam,
updateQueryTimeIfLeavingNow: formActions.updateQueryTimeIfLeavingNow
}
Expand Down
4 changes: 3 additions & 1 deletion lib/components/user/monitored-trip/saved-trip-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class SavedTripScreen extends Component {
render() {
const {
disableSingleItineraryDays,
hasMobilityProfile,
isCreating,
itinerary,
loggedInUser,
Expand Down Expand Up @@ -241,7 +242,7 @@ class SavedTripScreen extends Component {
<Form noValidate>
<SavedTripEditor
{...props}
hasMobilityProfile={Boolean(loggedInUser.mobilityProfile)}
hasMobilityProfile={hasMobilityProfile}
isCreating={isCreating}
notificationChannel={loggedInUser.notificationChannel}
onCancel={
Expand Down Expand Up @@ -283,6 +284,7 @@ const mapStateToProps = (state, ownProps) => {
const { disableSingleItineraryDays } = state.otp.config
return {
disableSingleItineraryDays,
hasMobilityProfile: state.otp.config.mobilityProfile,
homeTimezone: state.otp.config.homeTimezone,
isCreating: tripId === 'new',
itinerary: itineraries[activeItinerary],
Expand Down
11 changes: 11 additions & 0 deletions lib/components/user/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,26 @@ export interface MobilityProfile {
}

export interface CompanionInfo {
acceptKey?: string
email: string
nickname?: string
status?: 'PENDING' | 'CONFIRMED' | 'INVALID'
}

export interface DependentInfo {
email: string
mobilityMode: string
name?: string
userId: string
}

/**
* Type definition for an OTP-middleware (OTP-personas) user.
*/
export interface User {
accessibilityRoutingByDefault?: boolean
dependents?: string[]
dependentsInfo?: DependentInfo[]
// email always exists per Auth0.
email: string
hasConsentedToTerms?: boolean
Expand Down
Loading
Loading