@thepalaceproject/circulation-admin
    Preparing search index...

    A specialized DataFetcher that prevents caching of HTTP requests.

    This class extends the base DataFetcher and overrides the fetch method to add no-cache headers and set the cache option to "no-cache". This ensures that all requests made using this fetcher will not be cached.

    We use this to make sure that admin users always see the latest data when they are making changes to the system.

    Hierarchy

    • default
      • default
    Index

    Constructors

    • Parameters

      • Optionalconfig: DataFetcherConfig

      Returns default

    Properties

    authKey: string

    Methods

    • Determine a feed's type from the kind the server declares in the response content type (kind=acquisition or kind=navigation) rather than from opds-feed-parser's structural guess.

      The parser only sees the feed body, so it classifies a document as an acquisition feed when every entry has an acquisition link and otherwise falls back to a navigation feed. That heuristic misfires for valid acquisition feeds whose entries legitimately have no acquisition links — for instance a library with no patron authentication, where the Circulation Manager omits borrow links — so their books would render as navigation links instead of books with cover images.

      The content type is the authoritative, spec-defined source of the feed kind, so we trust it when present and fall back to the parser's classification only when no kind is declared. NavigationFeed and AcquisitionFeed share the same shape, so re-wrapping only changes the type the adapter keys off of.

      Parameters

      • parsedData: OPDSEntry | OPDSFeed
      • response: Response

      Returns OPDSEntry | OPDSFeed

    • Returns void

    • Parameters

      • url: string
      • __namedParameters: RequestInit = {}

      Returns Promise<Response>

    • Parameters

      • url: string

      Returns Promise<unknown>

    • Parameters

      • searchDescriptionUrl: string

      Returns Promise<unknown>

    • Returns AuthCredentials

    • Parameters

      • status: number

      Returns boolean

    • Parameters

      • Optionalheaders: any

      Returns any

    • Parameters

      • Optionalcredentials: AuthCredentials

      Returns void