import * as http from 'http'; import { ServerResponse } from 'http'; import { fetchAdapter } from '../types/types.js'; import DrupalState from '../DrupalState.js'; import 'jsona/lib/JsonaTypes'; import 'drupal-jsonapi-params'; import 'zustand/vanilla'; /** * fetch data from a JSON:API endpoint * @param apiUrl the api url for the JSON:API endpoint * @param requestInit fetch initialization object * @param onError custom error handler defaults to throw error * @param res response object * @param fetch fetch compatible function * @returns a promise containing the data for the JSON:API response */ declare const fetchJsonapiEndpoint: (apiUrl: string, requestInit?: {}, onError?: DrupalState['onError'], res?: boolean | ServerResponse | undefined, fetch?: fetchAdapter) => Promise; export { fetchJsonapiEndpoint as default };