import { Attr } from 'ts-framework' import * as constants from '../constants' import * as riderLocation from './rider-location' import * as userEmail from './user-email' import * as userPhones from './user-phones' import * as serviceMembership from './service-membership' import { SimpleLocationDTO } from './location' export class RiderFiltersDTO { @Attr({ type: String, optional: true }) orgId?: string @Attr({ type: Number, optional: true }) skip?: number @Attr({ type: Number, optional: true }) take?: number @Attr({ type: Boolean, optional: true }) isActive?: boolean @Attr({ type: Boolean, optional: true }) isArchived?: boolean @Attr({ type: String, optional: true }) membershipServiceIds: string[] @Attr({ type: String, optional: true }) search?: string @Attr({ type: String, optional: true }) sortBy: string[] } export class CreateRiderDTO { @Attr({ type: String, optional: true }) birthDate?: string @Attr({ type: String }) firstName: string @Attr({ type: String }) lastName: string @Attr({ type: String }) username: string @Attr({ type: Array, optional: true }) middleName?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) photo?: string @Attr({ type: userPhones.CreateUserPhoneDTO, optional: true }) phones?: userPhones.CreateUserPhoneDTO[] @Attr({ type: userEmail.CreateUserEmailDTO, optional: true }) email?: userEmail.CreateUserEmailDTO @Attr({ type: String }) ownerOrganization: string @Attr({ type: String }) notificationPreference: constants.NotificationPreferenceTypes @Attr({ type: String, optional: true }) externalId?: string } export class CreateRiderDetailsDTO { @Attr({ type: String }) id: string @Attr({ type: String }) notificationPreference: constants.NotificationPreferenceTypes @Attr({ type: String, optional: true }) externalId?: string @Attr({ type: String }) ownerOrganization: string } export class ChangeActiveStatusRiderDTO { @Attr({ type: String }) id: string @Attr({ type: Boolean }) isActive: boolean } export class ChangeArchiveStatusRiderDTO { @Attr({ type: String }) id: string @Attr({ type: Boolean }) isArchived: boolean } export class RiderDetailsDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) birthDate?: string @Attr({ type: userEmail.CreateUserEmailDTO, optional: true }) email?: userEmail.CreateUserEmailDTO @Attr({ type: String, optional: true }) firstName?: string @Attr({ type: String, optional: true }) lastName?: string @Attr({ type: Array, optional: true }) middleName?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) notificationPreference?: constants.NotificationPreferenceTypes @Attr({ type: userPhones.CreateUserPhoneDTO, optional: true }) phones?: userPhones.CreateUserPhoneDTO[] @Attr({ type: String, optional: true }) photo?: string @Attr({ type: String, optional: true }) username?: string @Attr({ type: String, optional: true }) externalId?: string } export class UpdateRiderAssistancesDTO { @Attr({ type: String }) id: string @Attr({ type: String }) assistances: string[] } export class UpdateRiderDetailsDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) notificationPreference?: constants.NotificationPreferenceTypes @Attr({ type: String, optional: true }) externalId?: string } export class UpdateRiderWithLocationDTO { @Attr({ type: String }) id: string @Attr({ type: riderLocation.CreateRiderLocationDTO }) location: riderLocation.CreateRiderLocationDTO } export class UpdateRiderLocationsDTO { @Attr({ type: String }) id: string @Attr({ type: riderLocation.UpdateRiderLocationDTO }) locations: riderLocation.UpdateRiderLocationDTO[] } export class UpdateRiderMembershipsDTO { @Attr({ type: String }) id: string @Attr({ type: serviceMembership.ServiceMembershipDTO }) memberships: serviceMembership.ServiceMembershipDTO[] } export class UpdateRiderMobilitiesDTO { @Attr({ type: String }) id: string @Attr({ type: String }) mobilities: string[] @Attr({ type: String, optional: true }) primaryMobilityId?: string } export class FindByFullNameOrPhoneNumberWithinOrganizationDTO { @Attr({ type: String }) organizationId: string @Attr({ type: String }) query: string @Attr({ type: String }) status: string } export class AvailabilityDTO { @Attr({ type: String, optional: true }) mobility?: string @Attr({ type: SimpleLocationDTO }) origin: SimpleLocationDTO @Attr({ type: SimpleLocationDTO }) destination: SimpleLocationDTO @Attr({ type: Date, optional: true }) scheduledPickupTime?: Date @Attr({ type: Date, optional: true }) scheduledDropoffTime?: Date @Attr({ type: Number, optional: true }) additionalRiders?: number }