GeoLeaf Core API - v3.19.0
    Preparing search index...

    What this sub-module offers.

    interface RoutesAPI {
        saveRoute(entry: StoredRoute): Promise<void>;
        getRoute(id: string): Promise<StoredRoute | null>;
        listRoutes(): Promise<StoredRoute[]>;
        deleteRoute(id: string): Promise<void>;
    }
    Index
    • Writes a route, replacing any route with the same id.

      Parameters

      • entry: StoredRoute

        The route to persist.

      Returns Promise<void>

      Nothing. Rejects when the transaction fails.

    • Removes one route.

      Parameters

      • id: string

        Its identity.

      Returns Promise<void>

      Nothing. Resolves even when nothing was stored under id — a delete that reports "not found" makes callers write a read they do not need.