openapi: 3.0.3
info:
  title: Driver Parent Tracking API
  description: |
    Laravel Sanctum API for driver ↔ parent tracking.

    **Interactive docs:** `/api/docs` · **Spec file:** `/api/docs/openapi.yaml`

    Authenticate with `Authorization: Bearer {token}` from `/auth/login` or `/auth/register`.
    Admin routes also require `role=admin`.
  version: 1.0.0
  contact:
    name: DriverParentApp
servers:
  - url: https://schoolse.makitsol.com/api
    description: Local development (artisan serve)
tags:
  - name: System
  - name: Auth
  - name: Children
  - name: Connections
  - name: Location
  - name: Messages
  - name: Notifications
  - name: Trips
  - name: Safety
  - name: Privacy
  - name: Admin
paths:
  /health:
    get:
      operationId: getHealth
      summary: Service health check
      tags: [System]
      responses:
        "200":
          description: Service is healthy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthResponse"
  /auth/register:
    post:
      operationId: register
      summary: Register a driver or parent
      tags: [Auth]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegisterRequest"
      responses:
        "201":
          description: Registered
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthResponse"
  /auth/login:
    post:
      operationId: login
      summary: Login with email or phone
      tags: [Auth]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginRequest"
      responses:
        "200":
          description: Authenticated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthResponse"
  /auth/logout:
    post:
      operationId: logout
      summary: Revoke current Sanctum token
      tags: [Auth]
      security:
        - sanctum: []
      responses:
        "200":
          description: Logged out
  /auth/me:
    get:
      operationId: me
      summary: Current user profile
      tags: [Auth]
      security:
        - sanctum: []
      responses:
        "200":
          description: Profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: "#/components/schemas/User"
  /auth/profile:
    put:
      operationId: updateProfile
      summary: Update profile (and driver vehicle details)
      tags: [Auth]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProfileRequest"
      responses:
        "200":
          description: Updated profile
  /children:
    get:
      operationId: listChildren
      summary: List children for the authenticated parent
      tags: [Children]
      security:
        - sanctum: []
      responses:
        "200":
          description: Children list
    post:
      operationId: createChild
      summary: Add a child
      tags: [Children]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [name]
              properties:
                name: { type: string }
                grade: { type: string, nullable: true }
                notes: { type: string, nullable: true }
      responses:
        "201":
          description: Child created
  /invites:
    post:
      operationId: createInvite
      summary: Driver generates an invite code + QR token
      tags: [Connections]
      security:
        - sanctum: []
      responses:
        "201":
          description: Invite created
  /connections/code:
    post:
      operationId: connectByCode
      summary: Parent connects using a driver invite code
      tags: [Connections]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [code]
              properties:
                code: { type: string }
      responses:
        "201":
          description: Active connection created
  /connections/qr:
    post:
      operationId: connectByQr
      summary: Parent connects using a QR / invite token
      tags: [Connections]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [qr_token]
              properties:
                qr_token: { type: string }
      responses:
        "201":
          description: Active connection created
  /connections/request:
    post:
      operationId: driverRequestConnection
      summary: Driver requests connection to a parent by email/phone
      tags: [Connections]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [login]
              properties:
                login: { type: string }
      responses:
        "201":
          description: Pending connection created
  /connections/parents:
    get:
      operationId: listConnectedParents
      summary: Driver lists connected/pending parents
      tags: [Connections]
      security:
        - sanctum: []
      responses:
        "200":
          description: Connection list
  /connections/drivers:
    get:
      operationId: listConnectedDrivers
      summary: Parent lists connected/pending drivers
      tags: [Connections]
      security:
        - sanctum: []
      responses:
        "200":
          description: Connection list
  /connections/{connection}/approve:
    post:
      operationId: approveConnection
      summary: Approve a pending connection
      tags: [Connections]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Connection activated
  /connections/{connection}/reject:
    post:
      operationId: rejectConnection
      summary: Reject a pending connection
      tags: [Connections]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Connection rejected
  /connections/{connection}:
    delete:
      operationId: removeConnection
      summary: Remove/disconnect a connection (either side)
      tags: [Connections]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Connection removed
  /location/sharing:
    post:
      operationId: setLocationSharing
      summary: Driver enables or disables live location sharing
      tags: [Location]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [enabled]
              properties:
                enabled: { type: boolean }
      responses:
        "200":
          description: Sharing state updated
  /location/pings:
    post:
      operationId: postLocationPing
      summary: Driver posts a location ping
      tags: [Location]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [latitude, longitude]
              properties:
                latitude: { type: number }
                longitude: { type: number }
                speed: { type: number, nullable: true }
                heading: { type: number, nullable: true }
                accuracy: { type: number, nullable: true }
                recorded_at: { type: string, format: date-time }
                trip_id: { type: integer, nullable: true }
      responses:
        "200":
          description: Ping accepted (cached, optionally persisted, broadcast)
  /drivers/{driver}/location:
    get:
      operationId: getDriverLocation
      summary: Parent (or driver) fetches current driver location
      tags: [Location]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: driver
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Current location payload
        "422":
          description: Not authorized (no active connection)
  /messages/broadcast:
    post:
      operationId: broadcastMessage
      summary: Driver sends a broadcast to all active connected parents
      tags: [Messages]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [body]
              properties:
                body: { type: string, maxLength: 2000 }
                trip_id: { type: integer, nullable: true }
      responses:
        "201":
          description: Broadcast created and fanned out
  /messages/sent:
    get:
      operationId: listSentMessages
      summary: Driver lists previously sent broadcasts
      tags: [Messages]
      security:
        - sanctum: []
      responses:
        "200":
          description: Sent messages
  /messages/inbox:
    get:
      operationId: listInbox
      summary: Parent message inbox
      tags: [Messages]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: driver_id
          schema: { type: integer }
      responses:
        "200":
          description: Inbox messages
  /messages/unread-count:
    get:
      operationId: unreadCount
      summary: Parent unread message count
      tags: [Messages]
      security:
        - sanctum: []
      responses:
        "200":
          description: Unread count
  /messages/{message}/read:
    post:
      operationId: markMessageRead
      summary: Mark one inbox message as read
      tags: [Messages]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: message
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Updated recipient
  /messages/read-all:
    post:
      operationId: markAllMessagesRead
      summary: Mark all (optionally per-driver) inbox messages as read
      tags: [Messages]
      security:
        - sanctum: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                driver_id: { type: integer, nullable: true }
      responses:
        "200":
          description: Count marked read
  /sos:
    post:
      operationId: triggerSos
      summary: Trigger an SOS alert (driver or parent)
      tags: [Safety]
      security:
        - sanctum: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                latitude: { type: number, nullable: true }
                longitude: { type: number, nullable: true }
                note: { type: string, nullable: true }
                trip_id: { type: integer, nullable: true }
      responses:
        "201":
          description: SOS created
  /attendance:
    post:
      operationId: recordAttendance
      summary: Driver marks child picked up or dropped off
      tags: [Safety]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [child_id, event_type]
              properties:
                child_id: { type: integer }
                event_type: { type: string, enum: [picked_up, dropped_off] }
                trip_id: { type: integer, nullable: true }
      responses:
        "201":
          description: Attendance event recorded
  /trips/{trip}/rating:
    post:
      operationId: rateTrip
      summary: Parent rates a completed trip
      tags: [Safety]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: trip
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [rating]
              properties:
                rating: { type: integer, minimum: 1, maximum: 5 }
                comment: { type: string, nullable: true }
      responses:
        "201":
          description: Rating saved
  /trips/start:
    post:
      operationId: startTrip
      summary: Driver starts a trip
      tags: [Trips]
      security:
        - sanctum: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                route_label: { type: string, nullable: true }
      responses:
        "201":
          description: Trip started
  /trips/end:
    post:
      operationId: endTrip
      summary: Driver ends the active trip
      tags: [Trips]
      security:
        - sanctum: []
      responses:
        "200":
          description: Trip ended
  /trips/active:
    get:
      operationId: activeTrip
      summary: Driver active trip
      tags: [Trips]
      security:
        - sanctum: []
      responses:
        "200":
          description: Active trip or null
  /trips:
    get:
      operationId: listTrips
      summary: List trips (driver own / parent connected)
      tags: [Trips]
      security:
        - sanctum: []
      responses:
        "200":
          description: Trip list
  /trips/{trip}:
    get:
      operationId: showTrip
      summary: Trip detail with route polyline (when authorized)
      tags: [Trips]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: trip
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Trip replay payload
  /drivers/{driver}/trip-status:
    get:
      operationId: driverTripStatus
      summary: Parent views connected driver trip status
      tags: [Trips]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: driver
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Status
  /drivers/{driver}/eta:
    get:
      operationId: driverEta
      summary: ETA to parent stop for a connected driver
      tags: [Location]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: driver
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: ETA payload
  /notification-preferences:
    get:
      operationId: getNotificationPreferences
      summary: Get notification preferences
      tags: [Notifications]
      security:
        - sanctum: []
      responses:
        "200":
          description: Preferences
    put:
      operationId: updateNotificationPreferences
      summary: Update notification preferences
      tags: [Notifications]
      security:
        - sanctum: []
      responses:
        "200":
          description: Updated
  /notifications:
    get:
      operationId: listNotifications
      summary: In-app notifications
      tags: [Notifications]
      security:
        - sanctum: []
      responses:
        "200":
          description: Notification list
  /notifications/{id}/read:
    post:
      operationId: markNotificationRead
      summary: Mark one notification read
      tags: [Notifications]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: id
          required: true
          schema: { type: string }
      responses:
        "200":
          description: Marked
  /notifications/read-all:
    post:
      operationId: markAllNotificationsRead
      summary: Mark all notifications read
      tags: [Notifications]
      security:
        - sanctum: []
      responses:
        "200":
          description: Marked
  /devices:
    post:
      operationId: registerDevice
      summary: Register FCM device token
      tags: [Notifications]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [token]
              properties:
                token: { type: string }
                platform: { type: string, nullable: true }
      responses:
        "201":
          description: Registered
    delete:
      operationId: unregisterDevice
      summary: Remove FCM device token
      tags: [Notifications]
      security:
        - sanctum: []
      responses:
        "200":
          description: Removed
  /admin/users:
    get:
      operationId: adminListUsers
      summary: List users (admin)
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: role
          schema: { type: string, enum: [driver, parent, admin] }
      responses:
        "200":
          description: Paginated users
  /admin/users/{user}/status:
    put:
      operationId: adminUpdateUserStatus
      summary: Suspend or activate a user
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: user
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [status]
              properties:
                status: { type: string, enum: [active, suspended] }
      responses:
        "200":
          description: Updated user
  /admin/users/{user}/verify:
    put:
      operationId: adminVerifyDriver
      summary: Set driver verification badge
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: user
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [verified]
              properties:
                verified: { type: boolean }
      responses:
        "200":
          description: Updated driver
  /admin/connections:
    get:
      operationId: adminListConnections
      summary: List connections
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Connections
  /admin/connections/{connection}:
    delete:
      operationId: adminForceRemoveConnection
      summary: Force-remove a connection
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Removed
  /admin/connections/{connection}/flag:
    post:
      operationId: adminFlagConnection
      summary: Flag a connection
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [reason]
              properties:
                reason: { type: string }
      responses:
        "200":
          description: Flagged
    delete:
      operationId: adminClearConnectionFlag
      summary: Clear connection flag
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: connection
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Flag cleared
  /admin/messages:
    get:
      operationId: adminListMessages
      summary: List broadcast messages
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Messages
  /admin/messages/{message}:
    delete:
      operationId: adminDeleteMessage
      summary: Delete a broadcast message
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: message
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Deleted
  /admin/messages/{message}/flag:
    post:
      operationId: adminFlagMessage
      summary: Flag a broadcast
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: message
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [reason]
              properties:
                reason: { type: string }
      responses:
        "200":
          description: Flagged
    delete:
      operationId: adminClearMessageFlag
      summary: Clear message flag
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: message
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Cleared
  /admin/announcements:
    get:
      operationId: adminListAnnouncements
      summary: List platform announcements
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Announcements
    post:
      operationId: adminSendAnnouncement
      summary: Send platform announcement
      tags: [Admin]
      security:
        - sanctum: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [title, body, audience]
              properties:
                title: { type: string }
                body: { type: string }
                audience: { type: string, enum: [all, drivers, parents] }
      responses:
        "201":
          description: Sent
  /admin/sos:
    get:
      operationId: adminListSos
      summary: List SOS alerts
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: status
          schema: { type: string, enum: [open, acknowledged, resolved] }
        - in: query
          name: search
          schema: { type: string }
      responses:
        "200":
          description: SOS alerts
  /admin/sos/{sosAlert}/acknowledge:
    post:
      operationId: adminAcknowledgeSos
      summary: Acknowledge an SOS alert
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: sosAlert
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Acknowledged
  /admin/sos/{sosAlert}/assign:
    post:
      operationId: adminAssignSos
      summary: Assign SOS to an admin
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: sosAlert
          required: true
          schema: { type: integer }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [assigned_to]
              properties:
                assigned_to: { type: integer }
      responses:
        "200":
          description: Assigned
  /admin/sos/{sosAlert}/resolve:
    post:
      operationId: adminResolveSos
      summary: Resolve an SOS alert
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: sosAlert
          required: true
          schema: { type: integer }
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                note: { type: string, nullable: true }
      responses:
        "200":
          description: Resolved
  /admin/speed-alerts:
    get:
      operationId: adminListSpeedAlerts
      summary: List speed alerts
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Speed alerts
  /admin/speed-alerts/{speedAlert}/review:
    post:
      operationId: adminReviewSpeedAlert
      summary: Mark speed alert reviewed
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: speedAlert
          required: true
          schema: { type: integer }
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                note: { type: string, nullable: true }
      responses:
        "200":
          description: Reviewed
  /admin/live/drivers:
    get:
      operationId: adminLiveDrivers
      summary: Active drivers for ops map
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Driver snapshots
  /admin/live/drivers/{driver}:
    get:
      operationId: adminLiveDriverDetail
      summary: Live detail for one driver
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: driver
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Detail
  /admin/trips:
    get:
      operationId: adminListTrips
      summary: Platform trip logs
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Trips
  /admin/trips/{trip}:
    get:
      operationId: adminTripReplay
      summary: Trip route replay
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: path
          name: trip
          required: true
          schema: { type: integer }
      responses:
        "200":
          description: Polyline + stats
  /admin/reports:
    get:
      operationId: adminReports
      summary: Trip analytics
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: days
          schema: { type: integer, default: 14 }
      responses:
        "200":
          description: Analytics
  /admin/reports/trips.csv:
    get:
      operationId: adminExportTripsCsv
      summary: Export trips CSV
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: CSV stream
          content:
            text/csv:
              schema: { type: string }
  /admin/audit:
    get:
      operationId: adminAuditLogs
      summary: Admin audit log
      tags: [Admin]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: search
          schema: { type: string }
        - in: query
          name: action
          schema: { type: string }
      responses:
        "200":
          description: Audit entries
  /admin/settings:
    get:
      operationId: adminGetSettings
      summary: Platform settings + role matrix
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Settings
    put:
      operationId: adminUpdateSettings
      summary: Update platform settings
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Updated settings map
  /admin/metrics:
    get:
      operationId: adminMetrics
      summary: Operational counts for dashboards
      tags: [Admin]
      security:
        - sanctum: []
      responses:
        "200":
          description: Metrics payload
  /privacy/location-history:
    delete:
      operationId: deleteLocationHistory
      summary: Driver deletes persisted location pings
      tags: [Privacy]
      security:
        - sanctum: []
      parameters:
        - in: query
          name: older_than_days
          schema: { type: integer }
      responses:
        "200":
          description: Deleted count
  /privacy/notifications:
    delete:
      operationId: deleteNotifications
      summary: Parent clears in-app notifications
      tags: [Privacy]
      security:
        - sanctum: []
      responses:
        "200":
          description: Deleted count
components:
  securitySchemes:
    sanctum:
      type: http
      scheme: bearer
      bearerFormat: Sanctum
  schemas:
    HealthResponse:
      type: object
      required: [status, service, database, timestamp]
      properties:
        status: { type: string, enum: [ok, degraded] }
        service: { type: string }
        database: { type: string, enum: [ok, error] }
        timestamp: { type: string, format: date-time }
    RegisterRequest:
      type: object
      required: [name, email, password, password_confirmation, role]
      properties:
        name: { type: string }
        email: { type: string, format: email }
        phone: { type: string, nullable: true }
        password: { type: string }
        password_confirmation: { type: string }
        role: { type: string, enum: [driver, parent] }
        driver_profile:
          $ref: "#/components/schemas/DriverProfileInput"
    LoginRequest:
      type: object
      required: [login, password]
      properties:
        login: { type: string, description: Email or phone }
        password: { type: string }
        device_name: { type: string }
    UpdateProfileRequest:
      type: object
      properties:
        name: { type: string }
        email: { type: string, format: email }
        phone: { type: string, nullable: true }
        avatar: { type: string, nullable: true }
        driver_profile:
          $ref: "#/components/schemas/DriverProfileInput"
    DriverProfileInput:
      type: object
      properties:
        vehicle_make: { type: string, nullable: true }
        vehicle_model: { type: string, nullable: true }
        vehicle_plate: { type: string, nullable: true }
        vehicle_color: { type: string, nullable: true }
        license_number: { type: string, nullable: true }
    AuthResponse:
      type: object
      required: [token, token_type, user]
      properties:
        token: { type: string }
        token_type: { type: string }
        user:
          $ref: "#/components/schemas/User"
    User:
      type: object
      properties:
        id: { type: integer }
        name: { type: string }
        email: { type: string }
        phone: { type: string, nullable: true }
        role: { type: string, enum: [driver, parent, admin] }
        avatar: { type: string, nullable: true }
        status: { type: string }
        driver_profile:
          $ref: "#/components/schemas/DriverProfile"
    DriverProfile:
      type: object
      properties:
        vehicle_make: { type: string, nullable: true }
        vehicle_model: { type: string, nullable: true }
        vehicle_plate: { type: string, nullable: true }
        vehicle_color: { type: string, nullable: true }
        license_number: { type: string, nullable: true }
        verified: { type: boolean }
        trip_status: { type: string }
